Skip to content

Commit

Permalink
Use plugin themself to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
StefMa committed Jul 10, 2018
1 parent 8820504 commit ddd3cd6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 5 additions & 3 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
plugins {
id 'com.novoda.bintray-release' version "0.8.0"
id 'groovy'
id 'java-gradle-plugin'
id 'java-library'
id 'guru.stefma.bintrayrelease' version "1.0.0" apply false
id 'maven'
}
apply plugin: "guru.stefma.bintrayrelease"

repositories {
google()
Expand Down Expand Up @@ -33,12 +35,12 @@ gradlePlugin {
}
}

version = "1.0.0"
group = "guru.stefma.bintrayrelease"
publish {
userOrg = 'stefma'
groupId = 'guru.stefma.bintrayrelease'
artifactId = "bintrayrelease"
uploadName = "BintrayRelease"
publishVersion = '1.0.0'
desc = 'Super duper easy way to release your Android and other artifacts to bintray'
website = "https://github.com/stefma/bintray-release"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import org.junit.Test

public class TestBintrayUploadTask {

@Ignore("Ignored since the 'pase project' don't use *this* plugin as dependency")
@Test
public void testBintrayUploadTask() {
BuildResult result = runTasksOnBintrayReleasePlugin('-PbintrayUser=U', '-PbintrayKey=K', "bintrayUpload")
Expand Down
9 changes: 7 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ pluginManagement {
repositories {
// TODO: Update later to gradlePluginPortal() if gradle updated
maven { url 'https://plugins.gradle.org/m2/' }
mavenLocal()
google()
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == "com.novoda.bintray-release") {
useModule("com.novoda:bintray-release:${requested.version}")
if (requested.id.id == "guru.stefma.bintrayrelease") {
useModule("guru.stefma.bintrayrelease:bintrayrelease:${requested.version}")
}
if(requested.id.id.startsWith("com.android.")) {
useModule("com.android.tools.build:gradle:$requested.id.version")
}
}
}
Expand Down

0 comments on commit ddd3cd6

Please sign in to comment.