Define compileSdkVersion, minSdkVersion and targetSdkVersion properties at the project level

This commit is contained in:
Shinokuni 2019-12-21 21:46:02 +01:00
parent 1e9ebd898e
commit cae41ad576
3 changed files with 12 additions and 6 deletions

View File

@ -4,11 +4,11 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
android { android {
compileSdkVersion 29 compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig { defaultConfig {
applicationId "com.readrops.app" applicationId "com.readrops.app"
minSdkVersion 21 minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion 29 targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 6 versionCode 6
versionName "1.1.0" versionName "1.1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@ -26,6 +26,12 @@ allprojects {
} }
} }
ext {
compileSdkVersion = 29
minSdkVersion = 21
targetSdkVersion = 29
}
task clean(type: Delete) { task clean(type: Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }

View File

@ -3,11 +3,11 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
android { android {
compileSdkVersion 29 compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig { defaultConfig {
minSdkVersion 21 minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion 29 targetSdkVersion rootProject.ext.targetSdkVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }