|
@@ -12,6 +12,30 @@ plugins {
|
|
|
id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
|
|
|
}
|
|
|
|
|
|
+project.ext {
|
|
|
+ // SDK and Tools
|
|
|
+ compileSdkVersion = 33
|
|
|
+ targetSdkVersion = 33
|
|
|
+ buildToolsVersion = "30.0.3"
|
|
|
+ minSdkVersion = 21
|
|
|
+ versionCode = 1
|
|
|
+ versionName = "1.0"
|
|
|
+
|
|
|
+ setDefaultConfig = {
|
|
|
+ extension ->
|
|
|
+ extension.compileSdkVersion project.ext.compileSdkVersion
|
|
|
+ extension.buildToolsVersion project.ext.buildToolsVersion
|
|
|
+ extension.defaultConfig {
|
|
|
+// applicationId project.ext.applicationId
|
|
|
+ // 使用project.ext.minSdkVersion 代替minsdkVersion,直接使用minsdkVersion 引不到
|
|
|
+ minSdkVersion project.ext.minSdkVersion
|
|
|
+ targetSdkVersion project.ext.targetSdkVersion
|
|
|
+ versionCode project.ext.versionCode
|
|
|
+ versionName project.ext.versionName
|
|
|
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
task clean(type: Delete) {
|
|
|
delete rootProject.buildDir
|