Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #142 from novoda/update-gradle-4
Browse files Browse the repository at this point in the history
Gets the plugin working with the latest versions of Gradle
  • Loading branch information
Xavi Rigau authored Oct 31, 2017
2 parents 6afac1b + 12afe61 commit 7d76c39
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ publish {
userOrg = 'novoda'
groupId = 'com.novoda'
artifactId = 'bintray-release'
publishVersion = '0.3.4'
publishVersion = '0.6.1'
desc = 'Oh hi, this is a nice description for a project, right?'
website = 'https://github.com/novoda/bintray-release'
}
Expand Down
13 changes: 3 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.novoda:bintray-release:0.4.0'
}
}


allprojects {
repositories {
google()
jcenter()
}
version = "0.5.0"
version = "0.6.1"
}
19 changes: 18 additions & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,27 @@ apply plugin: 'com.novoda.bintray-release'
apply plugin: 'groovy'
apply plugin: 'maven'

buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.novoda:bintray-release:0.6.0'
}
}

repositories {
google()
jcenter()
}


dependencies {
compile gradleApi()
compile localGroovy()
compile 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.2'
compile 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'

testCompile gradleTestKit()
testCompile 'junit:junit:4.12'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
package com.novoda.gradle.release

import org.gradle.testkit.runner.BuildResult
import org.gradle.testkit.runner.BuildTask
import org.gradle.testkit.runner.GradleRunner
import org.gradle.testkit.runner.TaskOutcome
import org.junit.Test

import static org.gradle.testkit.runner.TaskOutcome.SUCCESS

public class TestBintrayUploadTask {

@Test
public void testBintrayUploadTask() {
BuildResult result = runTasksOnBintrayReleasePlugin('-PbintrayUser=U', '-PbintrayKey=K', "bintrayUpload")

assert result.tasks(SUCCESS).collect { it.path }.contains(":core:bintrayUpload")
TaskOutcome success = TaskOutcome.SUCCESS
List<BuildTask> tasks = result.tasks(success)

List<String> successfulTaskPaths = new ArrayList<>();
for (BuildTask task : tasks) {
successfulTaskPaths.add(task.path)
}
// List<BuildTask> successfulTasks = tasks.collect {
// BuildTask buildTask = it
// String path = buildTask.path
// return path
// }
assert successfulTaskPaths.contains(":bintrayUpload")
assert result.getOutput().contains("BUILD SUCCESSFUL")
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

0 comments on commit 7d76c39

Please sign in to comment.