Android Plugin DSL Reference 参考文档 : https://google.github.io/android-gradle-dsl/2.3/
在 build.gradle 中配置了 android 闭包块 , 但是无法跳转到 android 方法位置 , 该方法不是 Project 中的方法 , 而是 com.android.application 插件中提供的方法 ;
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.aop"
minSdkVersion 18
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
android 方法原型 :
com.android.build.gradle.internal.dsl.BaseAppModuleExtension android (groovy.lang.Closure configuration)
该 android 方法定义在 AppExtension 扩展类型中 , 下面简单介绍该扩展类型 ;
android 方法中的配置参考 https://google.github.io/android-gradle-dsl/2.3/com.android.build.gradle.AppExtension.html 文档 ;