Use native sbt-dependency-tree plugin for all compatible versions
What does this MR do?
To improve the support for sbt and partialy address Gemnasium fails when running sbt dependencyDot:... (gitlab-org/gitlab#390287 - closed) this MR adjusts what plugin we use to generate the list of dependencies for sbt prjects. Additionally this revisits the support of offline environments for sbt 1.6.2 to align with what we currently use for sbt 1.9.7 (JAVA 21).
- bundle the
sbt-dependency-tree
plugin in our image on top of the existingsbt-dependency-graph
plugin - specify which plugin to use based on the version of sbt:
- sbt versions below 1.4 are not bundled in the image and don't support offline environments.These versioon are not compatible with the
sbt-dependency-tree
plugin so we keep using the deprecatedsbt-dependency-graph
plugin. - sbt 1.6.2 is the default version that we bundle in the image and it must support offline environments. We now use the
sbt-dependency-tree
plugin and the compatible compiler-bridge version that allows to support offline environments by providing the necessary build dependencies locally. - for all other versions of sbt we install the
sbt-dependency-tree
plugin and the compiler-bridge version that is compatible with sbt 1.9.7. This allows to support JAVA 21 offline environments by providing the necessary build dependencies locally for 1.9.7 and it doesn't impact other versions of sbt that are not supported in offline environements since they will be fetching their necessary dependencies at runtime.
- sbt versions below 1.4 are not bundled in the image and don't support offline environments.These versioon are not compatible with the
- Increase
MAX_IMAGE_SIZE_MB
by ~125MB to account for additional bundled dependencies
What are the relevant issue numbers?
gitlab-org/gitlab#390287 (closed)
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by Olivier Gonzalez