Support for Gradle plugins using "id"
See original GitHub issueI am using Kotlin as language and adding plugins by calling:
id("de.fayard.buildSrcVersions") version "0.4."
I am able to use the generated version number by calling:
id("de.fayard.buildSrcVersions") version Versions.de_fayard_buildsrcversions_gradle_plugin
Unfortunately the string “de.fayard.buildSrcVersions” is not created in Libs. What about creating a third object named “Plugins”?
Wish:
id(Plugins.buildSrcVersions) version Versions.de_fayard_buildsrcversions_gradle_plugin
PS: Great plugin - I love the idea of autogenerating the files and adding comments for newer versions! That is really great!
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Using Gradle Plugins
You apply plugins by their plugin id, which is a globally unique identifier, or name, for plugins. Core Gradle plugins are special in...
Read more >What the difference in applying gradle plugin - Stack Overflow
The plugins block is the newer method of applying plugins, and they must be available in the Gradle plugin repository. The apply approach...
Read more >Gradle - Plugins - Tutorialspoint
Most of the plugins need the configuration support from the build script. The Gradle project has an associated ExtensionContainer object that helps to...
Read more >Introduction to writing Gradle plugins - Tom Gregory
Gradle plugin configuration – sets an id of com.tomgregory.file-diff which we can use to reference the plugin in tests and in other projects ......
Read more >5. Add Gradle Plugin with Dependencies - Spring Cloud
build.gradle plugins { id "groovy" // this will work only for GA versions of ... JUNIT ) and JUnit 5 are supported with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well, it does work with build.gradle.kts files.
I am creating the Plugins object currently. This is what I find very, very helpful:
You get the idea? I use the string constants with “apply” and the extension methods within a “plugins” block
@jschneider I have no plans to have the plug-in generate a
Plugins.kt
file. Seems too hard to do correctly in all cases. Writing it manually like in your example is the best solution imho