'Where is the documentation for build.gradle's `android` block?
In a build.gradle, we have the android block. From my limited understanding of Android Gradle Plugin (and Groovy/ Kotlin), this is a method/ (or function?) called android
which accepts 1 argument, a closure.
android {
compileSdkVersion(AppConfig.compileSdkVersion)
buildToolsVersion(AppConfig.buildToolsVersion)
}
I was not able to find any documentation about android
, both on the Google Developer website and Gradle.org. It doesn't help that the function has the same name as the whole operating system. Any documentation about Android Gradle plugin would be helpful, as it seems like information about it is pepperred all over Android docs. So far, I can search what each property means (e.g. applicationId
, testInstrumentationRunner
), but I want to see all the properties which android
has, which is where the documentation comes in handy.
What sparked all these questions was this "Introduction to Groovy and Gradle"
I was able to get the "package name" (maybe) for the android
method with autocomplete in Android Studio: com.android.build.gradle.internal.dsl.BaseAppModule
, but cannot find source code or documentation...
Solution 1:[1]
It is described in android gradle plugin documentation under the class name AppExtension. Here's a link //google.github.io/android-gradle-dsl/3.3/com.android.build.gradle.AppExtension.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Tom Rutchik |