Commit 60c1e36
authored
Revise management of Eclipse-related Java versions (#1866)
The `com.ibm.wala.jdk-version` Gradle property determines the Java
toolchain used for compiling and testing Java code. Previously, it also
influenced the Java release used when compiling Eclipse-_dependent_ Java
code. However, this property does _not_ influence the Java release used
when compiling Elipse-_independent_ code. Rather, [the latter is always
hard-coded to release
11](https://github.com/wala/WALA/blob/c9fdc915544051266700e0cacaea0e0ab7bd5877/build-logic/src/main/kotlin/com/ibm/wala/gradle/java.gradle.kts#L62).
Now we hard-code the Java release used when compiling Eclipse-dependent
code too: 17, not 11, because some Eclipse dependencies use 17.
When using the ECJ batch compiler, set the Java release using `--release
N` instead of `-source N -target N` or simply `-N`. [The documentation
on how these flags interact is
poor](https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-using_batch_compiler.htm).
But after experimenting and examining [the ECJ
implementation](https://github.com/eclipse-jdt/eclipse.jdt.core/blob/5da60278fd97d15570cbbc07219a6ab525d91feb/org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/batch/Main.java),
I believe that `--release N` does everything that `-N -source N -target
N` would do.1 parent c9fdc91 commit 60c1e36
File tree
2 files changed
+6
-4
lines changed- build-logic/src/main/kotlin/com/ibm/wala/gradle
2 files changed
+6
-4
lines changedLines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 55 | + | |
| 56 | + | |
59 | 57 | | |
60 | 58 | | |
61 | 59 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
0 commit comments