Skip to content

Add slim shadowJar variant for key.ui and fix dist build - #3987

Open
wadoon wants to merge 1 commit into
mainfrom
weigl/dist
Open

wadoon wants to merge 1 commit into
mainfrom
weigl/dist

Conversation

@wadoon

@wadoon wadoon commented Sep 26, 2026

Copy link
Copy Markdown
Member

Summary

Adds a new configuration to key.ui that produces a slim version of the shadow jar, complementing the existing fat jar:

  • Fat jar (unchanged): key-*-exe.jar — everything incl. the optional keyext extensions and examples.zip.
  • Slim jar (new): key-*-slim-exe.jar — a minimal executable jar without the optional keyext extension modules (testgen, caching, exploration, slicing, proofmanagement, isabelletranslation) and without the bundled examples.zip.

Implementation

  • New slimRuntimeClasspath configuration in key.ui/build.gradle: the full runtimeClasspath minus the six keyext runtime extensions (and their transitive deps such as scala-isabelle/stringtemplate).
  • New slimJar ShadowJar task: same wiring as shadowJar (mergeServiceFiles, Main-Class), but built from the slim configuration and excluding examples.zip.
  • slimJar is wired into assemble, so a normal build produces both jars.
  • Weekly build/deploy workflow (.github/workflows/nightlydeploy.yml) and scripts/jenkins/deployAll.sh now build/upload the slim jar as well.

Fixes

The :dist project referenced the removed key.core.rifl and key.removegenerics modules and was missing a description, which broke Gradle configuration of every build. Both issues are fixed.

Verification

  • ./gradlew :key.ui:assemble produces both jars:
    • key-3.1.0-dev-exe.jar (fat, ~58 MB, 22 881 classes)
    • key-3.1.0-dev-slim-exe.jar (slim, ~24 MB, 12 943 classes)
  • Slim jar contains no keyext/scala/isabelle/testgen classes and no examples.zip; service files merged with the built-in key.ui/key.core extensions only.
  • Smoke test: java -jar key-*-slim-exe.jar --help starts KeY's CLI.

@wadoon wadoon self-assigned this Sep 26, 2026
@wadoon
wadoon requested review from mattulbrich and unp1 and removed request for mattulbrich September 26, 2026 18:35

@unp1 unp1 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Two issues:

  1. Starting the slimJar (GUI) fails with:
    Caused by: java.lang.reflect.InvocationTargetException
    at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1303)
    at java.desktop/java.awt.EventQueue.invokeAndWait(EventQueue.java:1278)
    at java.desktop/javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1464)
    at de.uka.ilkd.key.gui.MainWindow.getInstance(MainWindow.java:437)
    ... 13 more
    Caused by: java.lang.NullPointerException: Cannot invoke "java.nio.file.Path.resolve(String)" because "this.exampleDir" is null
    at de.uka.ilkd.key.gui.actions.RunAllProofsAction.lambda$loadFiles$1(RunAllProofsAction.java:93)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:214)

I think we can provide the examples.zip in the slimJar (should prevent that error and does not enlarge the distribution by too much)

  1. Building via ./gradlew shadowJar fails with
    Could not determine the dependencies of task ':dist:shadowJar'.

Could not resolve all dependencies for configuration ':dist:runtimeClasspath'.
Could not resolve all dependencies for configuration ':dist:runtimeClasspath'.
> Could not find io.github.wadoon.key:key-citool:1.7.0-SNAPSHOT.
Searched in the following locations:
- https://central.sonatype.com/repository/maven-snapshots/io/github/wadoon/key/key-citool/1.7.0-SNAPSHOT/maven-metadata.xml
- https://central.sonatype.com/repository/maven-snapshots/io/github/wadoon/key/key-citool/1.7.0-SNAPSHOT/key-citool-1.7.0-SNAPSHOT.pom
Required by:
project ':dist'

@wadoon
wadoon force-pushed the weigl/dist branch 2 times, most recently from de31f2c to a6d9524 Compare October 2, 2026 19:46
Add a slimRuntimeClasspath configuration and a slimJar ShadowJar task
that produce a minimal executable jar (key-*-slim-exe.jar) without the
optional keyext extensions, alongside the existing fat shadowJar
(key-*-exe.jar). Both jars are built as part of assemble, and the weekly
build/release workflow deploy script upload the slim jar, too.

Also fix the dist project which referenced the removed key.core.rifl and
key.removegenerics modules and was missing a description, which broke
Gradle configuration of every build.
@wadoon
wadoon requested a review from unp1 October 2, 2026 19:49
@wadoon
wadoon enabled auto-merge October 2, 2026 19:50
@wadoon

wadoon commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

Removed dist folder and added examples.zip in slim version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants