@@ -122,6 +122,64 @@ jobs:
122122 - name : scip-kotlinc tests
123123 run : gradle :scip-kotlinc:test --no-daemon
124124
125+ jdk25-plugin :
126+ runs-on : ubuntu-latest
127+ name : scip-javac plugin (JDK 25)
128+ steps :
129+ - uses : actions/checkout@v4
130+
131+ - uses : DeterminateSystems/nix-installer-action@v22
132+ with :
133+ summarize : false
134+
135+ - uses : DeterminateSystems/magic-nix-cache-action@v13
136+
137+ # The plugin jar targets `--release 11`, so it is built with the default
138+ # toolchain (Gradle 8.14 cannot run on JDK 25) and then exercised against a
139+ # JDK 25 `javac` below.
140+ - name : Build scip-javac plugin jar
141+ run : gradle :scip-javac:shadowJar --no-daemon
142+
143+ - name : Index a fixture with JDK 25 javac
144+ env :
145+ NIX_DEVELOP : ${{ github.workspace }}#jdk25
146+ run : |
147+ java -version
148+ javac -version
149+ shopt -s nullglob
150+ jars=(scip-javac/target/gradle/libs/scip-javac-*-all.jar)
151+ if [ "${#jars[@]}" -eq 0 ]; then
152+ echo "scip-javac shadow jar not found" >&2
153+ exit 1
154+ fi
155+ jar="${jars[0]}"
156+ work="$(mktemp -d)"
157+ mkdir -p "$work/src" "$work/out" "$work/classes"
158+ printf '%s\n' \
159+ 'public class Hello {' \
160+ ' public static void main(String[] args) {' \
161+ ' System.out.println("hello from JDK 25");' \
162+ ' }' \
163+ '}' > "$work/src/Hello.java"
164+ javac \
165+ -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
166+ -J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
167+ -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED \
168+ -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
169+ -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
170+ -cp "$jar" \
171+ -processorpath "$jar" \
172+ -d "$work/classes" \
173+ "-Xplugin:scip -sourceroot:$work/src -targetroot:$work/out" \
174+ "$work/src/Hello.java"
175+ shards=("$work"/out/META-INF/scip/*.scip)
176+ if [ "${#shards[@]}" -eq 0 ]; then
177+ echo "no SCIP shard produced under $work/out" >&2
178+ find "$work/out" -type f >&2 || true
179+ exit 1
180+ fi
181+ echo "SCIP shard generated: ${shards[0]}"
182+
125183 snapshots :
126184 runs-on : ubuntu-latest
127185 name : Snapshots
0 commit comments