$ ./gradlew buildSrcVersions generating Libs.kt
See original GitHub issueUpdate: Pull request open https://github.com/jmfayard/refreshVersions/pull/245
Context
buildSrcVersions
had two features
buildSrc/.../Versions.kt
now replaced byversions.properties
and the pluginrefreshVersions-core
buildSrc/.../Libs.kt
which provided auto-completion of the dependency notations in all Gradle modules for both the Kotlin and the Groovy DSL.
The plugin de.fayard.refreshVersions
now contains dependencies constants for common libraries, which is a better solution especially for single-module Gradle projects using the Kotlin DSL.
But the buildSrc/.../Libs.kt
alternative is still a good one for multi-modules projects, especially if they are large (we can’t have all the libraries in mavenCentral) or of they use the Groovy DSL - for the auto-completion currently does not work there and it would be a while until they fix Android Studio and IntelliJ.
Describe the solution you’d like
Proposal is to do a resurrection of buildSrcVersions
in its version 0.7.0, keeping just Libs.kt
, using the place holder version _
instead of Versions.kt
https://github.com/jmfayard/refreshVersions/tree/v0.7.0/plugin
Describe alternatives you’ve considered
The task should probably be called :buildSrcLibs
with an alias :buildSrcVersions
to not disturb the habits.
In which Gradle plugin should the code be? In the de.fayard.refreshVersions
plugin or in the existing de.fayard.buildSrcVersions
plugin? Latter is cleaner, former adds more configuration to do. Should the plugin versions be synchronized with refreshVersions or independant?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:7 (3 by maintainers)
Top GitHub Comments
tl;dr: great idea!
Bringing this back would be fantastic. I work in a rather large multi-module codebase with 250+ dependencies. We are still stuck at the old “buildSrcVersion” and one of the issues holding us back is the missing auto-completion for library names in the IDE. Another aspect is that I want to have a central place where all the libs are listed. That allows to have an automatically testable rule which mandates that modules are only allowed to use named dependencies.
There’s some remaining stuff to do. I’ll try to get to it next month or before and make a release.