mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-07 21:51:07 +01:00
Fix 'test' dependencies
The previously used approach of
project(':smack-core').sourceSets.test.runtimeClasspath
caused the 'eclipse' target to produce duplicate classpath entries in
.classpath when run with Gradle >= 2.6. It also relied on Gradle
internals.
Instead we now use
project(path: ":smack-core", configuration: "testRuntime")
project(path: ":smack-core", configuration: "archives")
to be able to use test classes from other subprojects (usually
smack-core) in e.g. smack-extensions. The 'archives' configuration
includes the test jar.
See also https://discuss.gradle.org/t/11784
Thanks to Lari Hotari for helping with this issue.
This commit is contained in:
parent
f571b6ef5b
commit
529e1eb058
11 changed files with 20 additions and 11 deletions
|
|
@ -274,7 +274,7 @@ subprojects {
|
|||
classifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
task testJar(type: Jar) {
|
||||
task testJar(type: Jar, dependsOn: testClasses) {
|
||||
classifier = 'tests'
|
||||
from sourceSets.test.output
|
||||
}
|
||||
|
|
@ -293,6 +293,10 @@ subprojects {
|
|||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
archivesOutput.extendsFrom (testCompile)
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue