build: simplify config

This commit is contained in:
Alexander Capehart
2026-04-05 13:36:26 -06:00
parent 90a1ac71eb
commit 381deaa001
4 changed files with 19 additions and 33 deletions
+9 -15
View File
@@ -2,7 +2,6 @@ import org.apache.tools.ant.taskdefs.condition.Os
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id "com.google.devtools.ksp"
id "com.diffplug.spotless"
id "kotlin-parcelize"
@@ -42,13 +41,8 @@ android {
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
freeCompilerArgs += "-Xjvm-default=all"
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
buildFeatures {
@@ -80,15 +74,15 @@ dependencies {
// Testing
testImplementation "junit:junit:4.13.2"
testImplementation "io.mockk:mockk:1.13.7"
testImplementation "org.robolectric:robolectric:4.11"
testImplementation 'androidx.test:core-ktx:1.6.1'
testImplementation "io.mockk:mockk:1.14.9"
testImplementation "org.robolectric:robolectric:4.16.1"
testImplementation 'androidx.test:core-ktx:1.7.0'
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlin_coroutines_version"
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
}
task assembleTaglib(type: Exec) {
tasks.register("assembleTaglib", Exec, {
def jniDir = "$projectDir/src/main/cpp"
def libs = new File("$jniDir/taglib/pkg")
if (libs.exists()) {
@@ -96,7 +90,7 @@ task assembleTaglib(type: Exec) {
return
}
commandLine "sh", "-c", "$jniDir/build_taglib.sh $jniDir $android.ndkDirectory"
}
})
afterEvaluate {
preDebugBuild.dependsOn assembleTaglib