Specify gradle build tools version and relocate jvmTarget to top-level config

This commit is contained in:
Robert Stone 2022-12-08 22:34:57 -08:00
parent 0b786cd44d
commit 20dc62fc72
11 changed files with 19 additions and 17 deletions

View File

@ -1,14 +1,14 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
packagingOptions {
jniLibs {
pickFirsts += ['lib/armeabi-v7a/libc++_shared.so', 'lib/armeabi/libc++_shared.so', 'lib/arm64-v8a/libc++_shared.so', 'lib/x86/libc++_shared.so', 'lib/x86_64/libc++_shared.so']
@ -22,11 +22,8 @@ android {
enabled = true
}
compileSdkVersion rootProject.ext.compileSdkVersion
flavorDimensions "abi"
defaultConfig {
applicationId rootProject.ext.appId
minSdkVersion rootProject.ext.minSdkVersion

View File

@ -27,6 +27,7 @@ apply plugin: 'kotlin-android'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
dataBinding {
enabled = true

View File

@ -24,8 +24,10 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion

View File

@ -25,10 +25,11 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
kotlinOptions.jvmTarget = "1.8"
packagingOptions {
jniLibs {
pickFirsts += ['**/*.so']

View File

@ -4,8 +4,7 @@ apply plugin: 'kotlin-kapt'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
kotlinOptions.jvmTarget = "1.8"
buildToolsVersion rootProject.ext.buildToolsVersion
dataBinding {
enabled = true

View File

@ -3,8 +3,8 @@ apply plugin: 'kotlin-android'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
kotlinOptions.jvmTarget = "1.8"
packagingOptions {
jniLibs {
pickFirsts += ['**/*.so']

View File

@ -2,16 +2,17 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
packagingOptions {
jniLibs {
pickFirsts += ['**/*.so']
}
}
kotlinOptions.jvmTarget = "1.8"
viewBinding.enabled = true
dataBinding.enabled = true

View File

@ -3,8 +3,7 @@ apply plugin: 'kotlin-android'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
kotlinOptions.jvmTarget = "1.8"
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion

View File

@ -4,10 +4,8 @@ apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-parcelize'
android {
kotlinOptions.jvmTarget = "1.8"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
dataBinding {
enabled = true

View File

@ -31,6 +31,7 @@ allprojects {
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
freeCompilerArgs += ['-opt-in=kotlin.RequiresOptIn']
}
}
@ -46,6 +47,7 @@ ext {
minSdkVersion = 17
targetSdkVersion = 33
compileSdkVersion = 33
buildToolsVersion = '33.0.1'
androidxLegacyVersion = '1.0.0'
androidxCoreVersion = '1.7.0'
appCompatVersion = '1.4.1'

View File

@ -33,6 +33,8 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion