Closed tomaszrykala closed 5 years ago
WDYM it doesn't work? What's the error?
Oh wait, you applied it to the root module. That's incorrect, please apply it in the build file for your app module (usually app
).
I don't want to suggest classpath because that breaks Kotlin DSLs if done incorrectly.
Hmm, maybe I don't follow.
plugins {
id 'com.android.application'
id 'com.github.triplet.play' version '2.3.0'
}
android {
... }
produces
> startup failed:
build file '.../app/build.gradle': 18: only buildscript {} and other plugins {} script blocks are allowed before plugins {} blocks, no other statements are allowed
See https://docs.gradle.org/5.4.1/userguide/plugins.html#sec:plugins_block for information on the plugins {} block
that link doesn't quite explain why and where should we put the plugins section
What's in your settings.gradle file?
This format in my root
build.gradle
doesn't work:I've had to change to the one that works for every other dependency in my project:
Wouldn't it be better to provide this example in the documentation?
Optionally, simply add it as an additional example next to the
plugins
format, for users who want to eschew snapshot releases.