-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from pivotal-jbarrett/feature/uber-jar
Build an über jar using the standard jar plugin.
- Loading branch information
Showing
10 changed files
with
113 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,67 @@ | ||
/* | ||
* Copyright 2014-2017 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
sourceSets { | ||
functionalTest { | ||
groovy.srcDir file('src/funcTest/groovy') | ||
resources.srcDir file('src/funcTest/resources') | ||
compileClasspath += sourceSets.main.output + configurations.testRuntimeClasspath | ||
runtimeClasspath += output + compileClasspath | ||
} | ||
} | ||
|
||
task createClasspathManifest { | ||
def outputDir = sourceSets.functionalTest.output.resourcesDir | ||
|
||
inputs.files sourceSets.test.runtimeClasspath | ||
outputs.dir outputDir | ||
|
||
doLast { | ||
outputDir.mkdirs() | ||
file("$outputDir/plugin-classpath.txt").text = files(sourceSets.test.runtimeClasspath, jar.archivePath).join("\n") | ||
} | ||
} | ||
|
||
dependencies { | ||
functionalTestCompile gradleTestKit() | ||
functionalTestCompile files(createClasspathManifest) | ||
} | ||
|
||
compileFunctionalTestJava.dependsOn createClasspathManifest | ||
|
||
task functionalTest(type: Test, dependsOn: [jar]) { | ||
description = 'Runs the functional tests.' | ||
group = 'verification' | ||
testClassesDirs = sourceSets.functionalTest.output.classesDirs | ||
classpath = sourceSets.functionalTest.runtimeClasspath | ||
mustRunAfter test | ||
|
||
reports { | ||
html.destination = project.file("$html.destination/functional") | ||
junitXml.destination = project.file("$junitXml.destination/functional") | ||
} | ||
} | ||
|
||
check.dependsOn functionalTest | ||
|
||
idea.module { | ||
sourceSets.functionalTest.allSource.srcDirs.each { | ||
testSourceDirs += it | ||
} | ||
|
||
scopes.TEST.plus += [configurations.functionalTestCompile] | ||
scopes.TEST.plus += [configurations.functionalTestRuntime] | ||
/* | ||
* Copyright 2014-2017 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
sourceSets { | ||
functionalTest { | ||
groovy.srcDir file('src/funcTest/groovy') | ||
resources.srcDir file('src/funcTest/resources') | ||
compileClasspath += sourceSets.main.output + configurations.testRuntimeClasspath | ||
runtimeClasspath += output + compileClasspath | ||
} | ||
} | ||
|
||
task createClasspathManifest { | ||
def outputDir = sourceSets.functionalTest.output.resourcesDir | ||
|
||
inputs.files sourceSets.test.runtimeClasspath | ||
outputs.dir outputDir | ||
|
||
doLast { | ||
outputDir.mkdirs() | ||
file("$outputDir/plugin-classpath.txt").text = files(sourceSets.test.runtimeClasspath, jar.archivePath).join("\n") | ||
} | ||
} | ||
|
||
dependencies { | ||
functionalTestImplementation gradleTestKit() | ||
functionalTestImplementation files(createClasspathManifest) | ||
} | ||
|
||
compileFunctionalTestJava.dependsOn createClasspathManifest | ||
|
||
task functionalTest(type: Test, dependsOn: [jar]) { | ||
description = 'Runs the functional tests.' | ||
group = 'verification' | ||
testClassesDirs = sourceSets.functionalTest.output.classesDirs | ||
classpath = sourceSets.functionalTest.runtimeClasspath | ||
mustRunAfter test | ||
|
||
reports { | ||
html.destination = project.file("$html.destination/functional") | ||
junitXml.destination = project.file("$junitXml.destination/functional") | ||
} | ||
} | ||
|
||
check.dependsOn functionalTest | ||
|
||
idea.module { | ||
sourceSets.functionalTest.allSource.srcDirs.each { | ||
testSourceDirs += it | ||
} | ||
|
||
scopes.TEST.plus += [configurations.functionalTestCompileClasspath] | ||
scopes.TEST.plus += [configurations.functionalTestRuntimeClasspath] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-rc-1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters