File tree 1 file changed +14
-1
lines changed
src/test/groovy/org/gradlex/jvm/dependency/conflict/test
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ package org.gradlex.jvm.dependency.conflict.test
3
3
import org.gradlex.jvm.dependency.conflict.test.fixture.GradleBuild
4
4
import spock.lang.Specification
5
5
6
+ import static org.gradlex.jvm.dependency.conflict.test.fixture.GradleBuild.GRADLE6_TEST
7
+
6
8
class CapabilityWithDifferentVersionsTest extends Specification {
7
9
8
10
@Delegate
@@ -37,6 +39,7 @@ class CapabilityWithDifferentVersionsTest extends Specification {
37
39
println(configurations.compileClasspath.get().files.joinToString("\\ n") { it.name })
38
40
}
39
41
"""
42
+ if (GRADLE6_TEST ) { configureEnvAttribute() }
40
43
41
44
expect :
42
45
printJars()
@@ -50,7 +53,7 @@ class CapabilityWithDifferentVersionsTest extends Specification {
50
53
id("java-library")
51
54
}
52
55
tasks.withType<JavaCompile>().configureEach {
53
- options.release = 17
56
+ options.release.set(17)
54
57
}
55
58
repositories.mavenCentral()
56
59
dependencies {
@@ -62,8 +65,18 @@ class CapabilityWithDifferentVersionsTest extends Specification {
62
65
println(configurations.compileClasspath.get().files.joinToString("\\ n") { it.name })
63
66
}
64
67
"""
68
+ if (GRADLE6_TEST ) { configureEnvAttribute() }
65
69
66
70
expect :
67
71
printJars()
68
72
}
73
+
74
+ void configureEnvAttribute () {
75
+ buildFile << """
76
+ val envAttribute = Attribute.of("org.gradle.jvm.environment", String::class.java)
77
+ configurations.compileClasspath {
78
+ attributes.attribute(envAttribute, "standard-jvm")
79
+ }
80
+ """
81
+ }
69
82
}
You can’t perform that action at this time.
0 commit comments