Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAR size is up from 1.7MB at version 1.17.0 #92

Open
lognaturel opened this issue Sep 9, 2024 · 2 comments
Open

JAR size is up from 1.7MB at version 1.17.0 #92

lognaturel opened this issue Sep 9, 2024 · 2 comments

Comments

@lognaturel
Copy link
Member

lognaturel commented Sep 9, 2024

Software versions

Validate v1.19.0, Java v1.8, macOS

Problem description

Update: we could still reduce the size by removing most classes form the CSV parsing library and Kotlin. I'll leave this issue open for now.

Background, most addressed by #93
The jar produced by ./gradlew jar at version 1.17.0 was 1.7MB. For version 1.18.0, it grew to 5.6MB because of the inclusion of jackson to support geoJSON parsing. This is only applicable for external secondary instances so is not necessary. For version 1.19.0, it grew to 13MB, primarily because of the inclusion of bouncycastle for the extract-signed function. The function doesn't really need to be evaluated when running Validate but if the dependency is just excluded, it will crash. There's also a kotlin folder that adds 1.5MB for annotations.

Ideally we could reduce that size.

@lognaturel
Copy link
Member Author

GradleUp/shadow#489 suggests that bouncycastle should never be included in a fat jar.

@lognaturel
Copy link
Member Author

lognaturel commented Sep 9, 2024

jackson is the only straightforward exclude, PR at #93 It can't currently be removed without some more work to make it optional.

I also identified the bouncycastle classes needed and included just those.

@lognaturel lognaturel changed the title Jar is now 13MB, up from 1.7MB at version 1.17.0 JAR size is up from 1.7MB at version 1.17.0 Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant