diff --git a/resources/CutOffCoreServicesDependencies.java b/resources/CutOffCoreServicesDependencies.java new file mode 100644 index 00000000..50f316b1 --- /dev/null +++ b/resources/CutOffCoreServicesDependencies.java @@ -0,0 +1,19 @@ +import org.graalvm.nativeimage.Platform; +import org.graalvm.nativeimage.Platforms; +import com.oracle.svm.core.annotate.TargetClass; +import com.oracle.svm.core.annotate.Delete; + +public final class CutOffCoreServicesDependencies { +} + +// @Platforms(Platform.DARWIN.class) +// @TargetClass(className = "sun.net.spi.DefaultProxySelector") +// @Delete +// final class Target_sun_net_spi_DefaultProxySelector { +// } + +@Platforms(Platform.DARWIN.class) +@TargetClass(className = "apple.security.KeychainStore") +@Delete +final class Target_apple_security_KeychainStore { +} diff --git a/script/compile b/script/compile index 97d41852..fb040df0 100755 --- a/script/compile +++ b/script/compile @@ -17,6 +17,8 @@ BABASHKA_VERSION=$(cat resources/BABASHKA_VERSION) export JAVA_HOME=$GRAALVM_HOME +$GRAALVM_HOME/bin/javac -cp $GRAALVM_HOME/jre/lib/svm/builder/svm.jar resources/CutOffCoreServicesDependencies.java + lein with-profiles +reflection do run lein do clean, uberjar @@ -37,6 +39,7 @@ args=( -jar target/babashka-$BABASHKA_VERSION-standalone.jar \ --verbose \ --no-fallback \ --no-server \ + --report-unsupported-elements-at-runtime \ "$BABASHKA_XMX" ) if [ "$BABASHKA_STATIC" = "true" ]; then