build: simplify config
This commit is contained in:
+8
-8
@@ -2,12 +2,10 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "com.android.application"
|
id "com.android.application"
|
||||||
id "kotlin-android"
|
|
||||||
id "androidx.navigation.safeargs.kotlin"
|
id "androidx.navigation.safeargs.kotlin"
|
||||||
id "kotlin-parcelize"
|
id "kotlin-parcelize"
|
||||||
id "dagger.hilt.android.plugin"
|
id "dagger.hilt.android.plugin"
|
||||||
id "com.google.devtools.ksp"
|
id "com.google.devtools.ksp"
|
||||||
id "org.jetbrains.kotlin.android"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
@@ -22,7 +20,8 @@ android {
|
|||||||
versionCode 69
|
versionCode 69
|
||||||
|
|
||||||
minSdk min_sdk
|
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
|
compileSdk target_sdk
|
||||||
targetSdk target_sdk
|
targetSdk target_sdk
|
||||||
|
|
||||||
@@ -31,13 +30,13 @@ android {
|
|||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
coreLibraryDesugaringEnabled true
|
coreLibraryDesugaringEnabled true
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility JavaVersion.VERSION_21
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility JavaVersion.VERSION_21
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain {
|
toolchain {
|
||||||
languageVersion = JavaLanguageVersion.of(17)
|
languageVersion = JavaLanguageVersion.of(21)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,8 +75,9 @@ android {
|
|||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget = JvmTarget.JVM_17
|
jvmTarget = JvmTarget.JVM_21
|
||||||
freeCompilerArgs.add("-Xjvm-default=all")
|
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
|
id "androidx.navigation.safeargs.kotlin" version "$navigation_version" apply false
|
||||||
//noinspection GradlePluginVersion
|
//noinspection GradlePluginVersion
|
||||||
id 'com.android.library' version "$agp_version" apply false
|
id 'com.android.library' version "$agp_version" apply false
|
||||||
id "org.jetbrains.kotlin.android" version "$kotlin_version" apply false
|
id "org.jetbrains.kotlin.plugin.parcelize" version "$kotlin_version" apply false
|
||||||
id "com.google.devtools.ksp" version '2.3.2' 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.
|
// We use spotless in the root build.gradle to apply to all modules.
|
||||||
id "com.diffplug.spotless" version "8.4.0" apply true
|
id "com.diffplug.spotless" version "8.4.0" apply true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,13 +31,5 @@ org.gradle.parallel=false
|
|||||||
org.gradle.workers.max=2
|
org.gradle.workers.max=2
|
||||||
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
|
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
|
||||||
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
|
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.uniquePackageNames=false
|
||||||
android.dependency.useConstraints=true
|
|
||||||
android.r8.strictFullModeForKeepRules=false
|
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 {
|
plugins {
|
||||||
id 'com.android.library'
|
id 'com.android.library'
|
||||||
id 'org.jetbrains.kotlin.android'
|
|
||||||
id "com.google.devtools.ksp"
|
id "com.google.devtools.ksp"
|
||||||
id "com.diffplug.spotless"
|
id "com.diffplug.spotless"
|
||||||
id "kotlin-parcelize"
|
id "kotlin-parcelize"
|
||||||
@@ -42,13 +41,8 @@ android {
|
|||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
coreLibraryDesugaringEnabled true
|
coreLibraryDesugaringEnabled true
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility JavaVersion.VERSION_21
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility JavaVersion.VERSION_21
|
||||||
}
|
|
||||||
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = "17"
|
|
||||||
freeCompilerArgs += "-Xjvm-default=all"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
@@ -80,15 +74,15 @@ dependencies {
|
|||||||
|
|
||||||
// Testing
|
// Testing
|
||||||
testImplementation "junit:junit:4.13.2"
|
testImplementation "junit:junit:4.13.2"
|
||||||
testImplementation "io.mockk:mockk:1.13.7"
|
testImplementation "io.mockk:mockk:1.14.9"
|
||||||
testImplementation "org.robolectric:robolectric:4.11"
|
testImplementation "org.robolectric:robolectric:4.16.1"
|
||||||
testImplementation 'androidx.test:core-ktx:1.6.1'
|
testImplementation 'androidx.test:core-ktx:1.7.0'
|
||||||
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlin_coroutines_version"
|
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlin_coroutines_version"
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
|
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
task assembleTaglib(type: Exec) {
|
tasks.register("assembleTaglib", Exec, {
|
||||||
def jniDir = "$projectDir/src/main/cpp"
|
def jniDir = "$projectDir/src/main/cpp"
|
||||||
def libs = new File("$jniDir/taglib/pkg")
|
def libs = new File("$jniDir/taglib/pkg")
|
||||||
if (libs.exists()) {
|
if (libs.exists()) {
|
||||||
@@ -96,7 +90,7 @@ task assembleTaglib(type: Exec) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
commandLine "sh", "-c", "$jniDir/build_taglib.sh $jniDir $android.ndkDirectory"
|
commandLine "sh", "-c", "$jniDir/build_taglib.sh $jniDir $android.ndkDirectory"
|
||||||
}
|
})
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
preDebugBuild.dependsOn assembleTaglib
|
preDebugBuild.dependsOn assembleTaglib
|
||||||
|
|||||||
Reference in New Issue
Block a user