mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2026-09-07 00:39:44 +00:00
migrate onto new android dsl
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
kotlin {
|
||||
sourceSets {
|
||||
androidUnitTest {
|
||||
androidHostTest {
|
||||
dependencies {
|
||||
implementation compose.uiTest
|
||||
}
|
||||
|
||||
@@ -1,34 +1,18 @@
|
||||
apply plugin: 'com.getkeepsafe.dexcount'
|
||||
|
||||
android {
|
||||
compileSdkVersion libs.versions.android.props.compileSdk.get().toInteger()
|
||||
buildToolsVersion libs.versions.android.props.buildTools.get()
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion libs.versions.android.props.minSdk.get().toInteger()
|
||||
compileSdkVersion libs.versions.android.props.compileSdk.get().toInteger()
|
||||
targetSdkVersion libs.versions.android.props.compileSdk.get().toInteger()
|
||||
versionCode "${android_code_version}".toInteger()
|
||||
versionName "$version"
|
||||
namespace "${project.group}.${project.name}"
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
}
|
||||
debug {
|
||||
debuggable true
|
||||
ext.configureAndroidTarget = { target ->
|
||||
target.compileSdk = libs.versions.android.props.compileSdk.get().toInteger()
|
||||
target.buildToolsVersion = libs.versions.android.props.buildTools.get()
|
||||
target.minSdk = libs.versions.android.props.minSdk.get().toInteger()
|
||||
target.namespace = "${project.group}.${project.name}"
|
||||
target.packaging {
|
||||
resources {
|
||||
excludes.add 'META-INF/kotlinx-serialization-runtime.kotlin_module'
|
||||
excludes.add 'META-INF/kotlinx-serialization-cbor.kotlin_module'
|
||||
excludes.add 'META-INF/kotlinx-serialization-properties.kotlin_module'
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude 'META-INF/kotlinx-serialization-runtime.kotlin_module'
|
||||
exclude 'META-INF/kotlinx-serialization-cbor.kotlin_module'
|
||||
exclude 'META-INF/kotlinx-serialization-properties.kotlin_module'
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
target.compilerOptions.jvmTarget.set(
|
||||
target.compilerOptions.jvmTarget.get().class.fromTarget("17")
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,25 +1,31 @@
|
||||
apply from: "$defaultAndroidSettings"
|
||||
|
||||
kotlin {
|
||||
androidTarget {
|
||||
publishLibraryVariants(
|
||||
"release",
|
||||
"debug",
|
||||
)
|
||||
compilations.all {
|
||||
kotlinOptions {
|
||||
jvmTarget = "17"
|
||||
}
|
||||
}
|
||||
android {
|
||||
project.ext.configureAndroidTarget(delegate)
|
||||
withHostTest {}
|
||||
withDeviceTest {}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
androidUnitTest {
|
||||
jvmAndAndroidMain {
|
||||
dependsOn commonMain
|
||||
kotlin.srcDir("src/jvmMain/kotlin")
|
||||
resources.srcDir("src/jvmMain/resources")
|
||||
}
|
||||
jvmMain {
|
||||
dependsOn jvmAndAndroidMain
|
||||
kotlin.setSrcDirs([])
|
||||
resources.setSrcDirs([])
|
||||
}
|
||||
androidHostTest {
|
||||
dependencies {
|
||||
implementation kotlin('test-junit')
|
||||
implementation libs.android.test.junit
|
||||
implementation libs.android.espresso
|
||||
}
|
||||
}
|
||||
androidInstrumentedTest {
|
||||
androidDeviceTest {
|
||||
dependencies {
|
||||
implementation kotlin('test-junit')
|
||||
implementation libs.android.test.junit
|
||||
@@ -27,8 +33,6 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
androidMain.dependsOn jvmMain
|
||||
androidMain.dependsOn jvmAndAndroidMain
|
||||
}
|
||||
}
|
||||
|
||||
apply from: "$defaultAndroidSettings"
|
||||
|
||||
Reference in New Issue
Block a user