Skip to content

Commit 8316649

Browse files
authored
Fix ignite-2.0 latestDepTest compilation (#8433)
1 parent 19ce7f1 commit 8316649

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

dd-java-agent/instrumentation/ignite-2.0/build.gradle

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
ext {
22
// See https://ignite.apache.org/docs/latest/quick-start/java#running-ignite-with-java-11-or-later
3+
// FIXME: Because of this condition, tests only run in Java 8, and latestDepTest never run, as they require Java 11+.
34
maxJavaVersionForTests = JavaVersion.VERSION_1_8
5+
// ignite 2.17.0+ requires Java 11+
6+
latestDepTestMinJavaVersionForTests = JavaVersion.VERSION_11
7+
latestDepForkedTestMinJavaVersionForTests = JavaVersion.VERSION_11
48
}
59

610
muzzle {
@@ -21,13 +25,26 @@ muzzle {
2125
apply from: "$rootDir/gradle/java.gradle"
2226

2327
addTestSuiteForDir('latestDepTest', 'test')
28+
addTestSuiteExtendingForDir('latestDepForkedTest', 'latestDepTest', 'test')
29+
// ignite 2.16.0 latest version compatible with Java 8
30+
addTestSuiteForDir('ignite216Test', 'test')
31+
addTestSuiteExtendingForDir('ignite216ForkedTest', 'ignite216Test', 'test')
2432

2533
dependencies {
2634
compileOnly group: 'org.apache.ignite', name: 'ignite-core', version: '2.0.0'
2735

2836
testImplementation group: 'org.apache.ignite', name: 'ignite-core', version: '2.0.0'
2937
testImplementation group: 'org.apache.ignite', name: 'ignite-indexing', version: '2.0.0'
3038

39+
ignite216TestImplementation group: 'org.apache.ignite', name: 'ignite-core', version: '2.16.0'
40+
ignite216TestImplementation group: 'org.apache.ignite', name: 'ignite-indexing', version: '2.16.0'
41+
3142
latestDepTestImplementation group: 'org.apache.ignite', name: 'ignite-core', version: '2.+'
3243
latestDepTestImplementation group: 'org.apache.ignite', name: 'ignite-indexing', version: '2.+'
3344
}
45+
46+
for (task in ['compileLatestDepTestGroovy', 'compileLatestDepForkedTestGroovy']) {
47+
tasks.named(task, GroovyCompile) {
48+
it.javaLauncher = getJavaLauncherFor(11)
49+
}
50+
}

0 commit comments

Comments
 (0)