Support for the newer Gradle "plugins {}" block #43
Mario-paul
started this conversation in
General
Replies: 1 comment 1 reply
-
|
The problem with the new way to apply plugins is that you can't define the project version before applying the plugin, unless you do what you did: apply false and then manually apply it. The plugin needs a version defined before the apply to work. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So I am a relatively newbie developer, and due to an issue with Gradle Plugin version in Android Studio Chipmunk, I was unable to use this plugin. So I upgraded to AS Dolphin, and created a new test project to learn how to use this plugin. When trying to apply the plugin, I noticed the root build.gradle looks completely different than that of the readme in this repo or of my older projects made in previous AS versions.
It seems that the newer AS releases now use the "newer" Gradle
plugins {}block in project build.gradle, instead of the legacybuildScript{}block. After much research and fiddling around, I was able to make it work. But it doesn't look like anything in the official Gradle Documentation.Nothing else I tried seemed to work. I am using both the
plugins{}block as well as the oldapply plugin: ""statement/method, which seems a bit hacky. Is it possible you can support the plugins{} block with an update? Or at the very least, document how to workaround like I did in the Readme since I lost a ton of hours researching this issue. I'm sure a lot of new users of this plugin would benefit greatly.Sources:
https://stackoverflow.com/questions/74534360/my-build-gradle-project-level-looks-different-android-studio-dolphin
https://stackoverflow.com/questions/71247686/explain-new-format-of-top-level-gradle-file
https://stackoverflow.com/questions/32352816/what-the-difference-in-applying-gradle-plugin
https://stefma.medium.com/its-time-to-ditch-the-buildscript-block-a1ab12e0d9ce
Beta Was this translation helpful? Give feedback.
All reactions