Skip to content

Commit

Permalink
Merge pull request #17 from palantir/feature/gradle-2.8
Browse files Browse the repository at this point in the history
Upgrade to Gradle 2.8
  • Loading branch information
markelliot committed Oct 26, 2015
2 parents 45ace54 + 5c14873 commit 641e3ca
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 19 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'com.gradle.plugin-publish' version '0.9.1'
id 'com.jfrog.bintray' version '1.2'
id 'com.palantir.git-version' version '0.1.3'
id 'com.palantir.git-version' version '0.3.0'
id 'eclipse'
id 'groovy'
id 'idea'
Expand All @@ -26,10 +26,10 @@ repositories {

dependencies {
compile gradleApi()
compile localGroovy()
compile 'org.codehaus.groovy:groovy-all:2.4.4'

testCompile gradleTestKit()
testCompile('org.spockframework:spock-core:1.0-groovy-2.3') {
testCompile('org.spockframework:spock-core:1.0-groovy-2.4') {
exclude module: 'groovy-all'
}
testCompile files(createClasspathManifest)
Expand Down
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Jul 10 17:19:31 BST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-bin.zip
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ class JavaDistributionPluginTests extends Specification {

File projectDir
File buildFile
List<File> pluginClasspath

def 'produce distribution bundle and check start, stop and restart behavior' () {
given:
buildFile << '''
apply plugin: 'com.palantir.java-distribution'
apply plugin: 'java'
plugins {
id 'com.palantir.java-distribution'
id 'java'
}
version '0.1'
Expand Down Expand Up @@ -97,7 +100,10 @@ class JavaDistributionPluginTests extends Specification {
}

private GradleRunner run(String... tasks) {
GradleRunner.create().withProjectDir(projectDir).withArguments(tasks)
GradleRunner.create()
.withPluginClasspath(pluginClasspath)
.withProjectDir(projectDir)
.withArguments(tasks)
}

private String exec(String... tasks) {
Expand All @@ -117,18 +123,9 @@ class JavaDistributionPluginTests extends Specification {
throw new IllegalStateException("Did not find plugin classpath resource, run `testClasses` build task.")
}

def pluginClasspath = pluginClasspathResource.readLines()
pluginClasspath = pluginClasspathResource.readLines()
.collect { it.replace('\\', '\\\\') } // escape backslashes in Windows paths
.collect { "'$it'" }
.join(", ")

buildFile << """
buildscript {
dependencies {
classpath files($pluginClasspath)
}
}
""".stripIndent()
.collect { new File(it) }
}

}

0 comments on commit 641e3ca

Please sign in to comment.