Skip to content

Commit d47ca34

Browse files
authored
Fix Gradle configuration in idea for :libs:simdvec (#114251)
1 parent 9cfe679 commit d47ca34

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libs/simdvec/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ dependencies {
2323
}
2424
}
2525

26-
tasks.named("compileMain21Java").configure {
26+
// compileMain21Java does not exist within idea (see MrJarPlugin) so we cannot reference directly by name
27+
tasks.matching { it.name == "compileMain21Java" }.configureEach {
2728
options.compilerArgs << '--add-modules=jdk.incubator.vector'
2829
// we remove Werror, since incubating suppression (-Xlint:-incubating)
2930
// is only support since JDK 22
3031
options.compilerArgs -= '-Werror'
3132
}
3233

33-
test {
34+
tasks.named('test').configure {
3435
if (JavaVersion.current().majorVersion.toInteger() >= 21) {
3536
jvmArgs '--add-modules=jdk.incubator.vector'
3637
}

0 commit comments

Comments
 (0)