tony
12/29/2020, 7:36 PM* What went wrong:
An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.android', version: '1.4.21']
> Failed to apply plugin 'org.jetbrains.kotlin.android'.
> Extension with name 'android' does not exist. Currently registered extension names: [ext, kotlin, kotlinTestRegistry]
which is a result of the following setup:
// root build.gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.0-alpha15"
}
}
// app/build.gradle
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android' version '1.4.21'
}
and then executing ./gradlew help
. Build scan: https://scans.gradle.com/s/t7w3bwv3pingm/build-dependencies?toggled=W1swXSxbMV0sWzEsMF0sWzAsMF0sWzAsMV1d
I recognize, btw, that this is a non-standard setup. To reiterate, my goal is to understand what that error means and why it happens.tony
12/29/2020, 7:37 PMtony
12/29/2020, 7:50 PMtony
12/29/2020, 8:08 PMandroid
extension in the example above? It looks like, if KGP and AGP are loaded on the same classpath in the same script context, then there's no problem, but if KGP is in a child, then it barfs, and I don't understand why. If there's some ordering problem, I also don't understand that, since I apply AGP before I apply KGP, so android
should exist, right?jrod
12/30/2020, 4:09 PMandroid {}
below the plugins block? i’d expect the error to go away or change slightly.tony
12/30/2020, 7:52 PM