From ed1123feb0e12aaa270ddf9081a3778dd217c89c Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 1 Jul 2020 11:53:30 -0400 Subject: [PATCH] Define SDK/build tool versions in buildSrc --- app/build.gradle | 12 ++++++------ buildSrc/src/main/kotlin/AndroidConfig.kt | 6 ++++++ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 buildSrc/src/main/kotlin/AndroidConfig.kt diff --git a/app/build.gradle b/app/build.gradle index 3b7fe3218..09e0f2397 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,13 +32,13 @@ ext { } android { - compileSdkVersion 29 - buildToolsVersion '29.0.3' + compileSdkVersion AndroidConfig.compileSdk + buildToolsVersion AndroidConfig.buildTools defaultConfig { applicationId "eu.kanade.tachiyomi" - minSdkVersion 21 - targetSdkVersion 29 + minSdkVersion AndroidConfig.minSdk + targetSdkVersion AndroidConfig.targetSdk testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" versionCode 45 versionName "0.9.2" @@ -108,8 +108,8 @@ android { } compileOptions { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { diff --git a/buildSrc/src/main/kotlin/AndroidConfig.kt b/buildSrc/src/main/kotlin/AndroidConfig.kt new file mode 100644 index 000000000..8fde6b8fe --- /dev/null +++ b/buildSrc/src/main/kotlin/AndroidConfig.kt @@ -0,0 +1,6 @@ +object AndroidConfig { + const val compileSdk = 29 + const val minSdk = 21 + const val targetSdk = 29 + const val buildTools = "29.0.3" +}