1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02: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:
Florian Schmaus 2016-02-10 12:39:18 +01:00
parent f571b6ef5b
commit 529e1eb058
11 changed files with 20 additions and 11 deletions

View file

@ -6,5 +6,5 @@ Connect your favourite slf4j backend of choice to get output inside of it"""
dependencies {
compile project(':smack-core')
compile 'org.slf4j:slf4j-api:[1.7,1.8)'
testCompile project(':smack-core').sourceSets.test.runtimeClasspath
testCompile project(path: ":smack-core", configuration: "testRuntime")
}