JAR size is up from 1.7MB at version 1.17.0

Open
#92 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
java, kotlin
Domain
build-system

Research direction

Start by running ./gradlew jar and inspecting the generated JAR and its dependency contents. Review the Jackson, Bouncy Castle, CSV parsing, and Kotlin-related inclusions described in the issue, then identify which are unnecessary for Validate. Done means the JAR is smaller without breaking the relevant application functions.

Written by the indexing model from the issue text.

Description

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 https://github.com/getodk/validate/pull/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.

Dominant language
Java
Stars
14
Forks
32
Avg merge
14h 15m
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getodk/validate

All issues in getodk/validate

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.