build: simplify config
This commit is contained in:
+8
-8
@@ -2,12 +2,10 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
id "com.android.application"
|
||||
id "kotlin-android"
|
||||
id "androidx.navigation.safeargs.kotlin"
|
||||
id "kotlin-parcelize"
|
||||
id "dagger.hilt.android.plugin"
|
||||
id "com.google.devtools.ksp"
|
||||
id "org.jetbrains.kotlin.android"
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -22,7 +20,8 @@ android {
|
||||
versionCode 69
|
||||
|
||||
minSdk min_sdk
|
||||
// for some reason this is """"deprecated""""" yet my gradle flips out when its not there
|
||||
// randomly flickers between deprecated and required depending on what mood my gradle is in
|
||||
// keep it for safety
|
||||
compileSdk target_sdk
|
||||
targetSdk target_sdk
|
||||
|
||||
@@ -31,13 +30,13 @@ android {
|
||||
|
||||
compileOptions {
|
||||
coreLibraryDesugaringEnabled true
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
sourceCompatibility JavaVersion.VERSION_21
|
||||
targetCompatibility JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(17)
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,8 +75,9 @@ android {
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
jvmTarget = JvmTarget.JVM_17
|
||||
freeCompilerArgs.add("-Xjvm-default=all")
|
||||
jvmTarget = JvmTarget.JVM_21
|
||||
freeCompilerArgs.add("-jvm-default=enable")
|
||||
freeCompilerArgs.add("-Xannotation-default-target=param-property")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -29,8 +29,8 @@ plugins {
|
||||
id "androidx.navigation.safeargs.kotlin" version "$navigation_version" apply false
|
||||
//noinspection GradlePluginVersion
|
||||
id 'com.android.library' version "$agp_version" apply false
|
||||
id "org.jetbrains.kotlin.android" version "$kotlin_version" apply false
|
||||
id "com.google.devtools.ksp" version '2.3.2' apply false
|
||||
id "org.jetbrains.kotlin.plugin.parcelize" version "$kotlin_version" apply false
|
||||
id "com.google.devtools.ksp" version '2.3.6' apply false
|
||||
// We use spotless in the root build.gradle to apply to all modules.
|
||||
id "com.diffplug.spotless" version "8.4.0" apply true
|
||||
}
|
||||
|
||||
@@ -31,13 +31,5 @@ org.gradle.parallel=false
|
||||
org.gradle.workers.max=2
|
||||
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
|
||||
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
|
||||
android.defaults.buildfeatures.resvalues=true
|
||||
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
|
||||
android.enableAppCompileTimeRClass=false
|
||||
android.usesSdkInManifest.disallowed=false
|
||||
android.uniquePackageNames=false
|
||||
android.dependency.useConstraints=true
|
||||
android.r8.strictFullModeForKeepRules=false
|
||||
android.r8.optimizedResourceShrinking=false
|
||||
android.builtInKotlin=false
|
||||
android.newDsl=false
|
||||
|
||||
+9
-15
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user