Gradle versions prior to v7 produce lockfiles differently than the newer v7 and v8 releases. These legacy versions produce multiple lockfiles and store them in a gradle/dependency-locks directory with *.lockfile names. Each file is named by the configuration it locks and has the lockfile extension. The CLI, parser, and lockfile generator should be updated to account for these legacy Gradle lockfiles.
Are versions of Gradle prior to v6 targeted for inclusion in this issue?
Answer: Yes. Specifically v5.5.1 and newer.
If an older version of gradle is in use and a lockfile does not exist for the CLI to parse, should the lockfile generator be updated (if needed) to ensure it creates a lockfile in the older/matching format?
It appears the command for generating lockfiles has remained constant: gradle dependencies --write-locks
Still need to confirm if the --init-script option is also consistent
Can we get real-world examples of lockfiles generated with Gradle v6?
Acceptance Criteria
[x] Lockfiles generated with Gradle v5 are recognized
[x] Lockfiles generated with Gradle v5 can be parsed
[ ] Lockfiles generated with Gradle v6 are recognized
[ ] Lockfiles generated with Gradle v6 can be parsed
[x] Lockfiles generated with Gradle v7 and v8 continue to be recognized and parsed
[x] ~Test fixture(s) are added to account for the older format~
The format did not change, only the path/name
[x] Documentation is updated to reflect the additional supported lockfile(s)
Overview
Gradle versions prior to v7 produce lockfiles differently than the newer v7 and v8 releases. These legacy versions produce multiple lockfiles and store them in a
gradle/dependency-locks
directory with*.lockfile
names. Each file is named by the configuration it locks and has thelockfile
extension. The CLI, parser, and lockfile generator should be updated to account for these legacy Gradle lockfiles.Additional Info
Possible CLI changes required:
lockfile/src/java.rs
lockfile/src/parsers/gradle_dep.rs
lockfile_path
plus maybe some other differenceslockfile_generator/src/gradle.rs
docs/supported_lockfiles.md
Resources
Questions
gradle
is in use and a lockfile does not exist for the CLI to parse, should the lockfile generator be updated (if needed) to ensure it creates a lockfile in the older/matching format?gradle dependencies --write-locks
--init-script
option is also consistentAcceptance Criteria