mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-10 20:33:47 +02:00
Revert to using androidLibrary plugin until KMP publishing guidance is updated. Use default sourcesets for Android.
This commit is contained in:
@@ -1,47 +1,56 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.kotlinMultiplatform)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
alias(libs.plugins.androidKotlinMultiplatformLibrary)
|
alias(libs.plugins.androidLibrary)
|
||||||
|
// id("maven-publish")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "com.vitorpamplona.quartz"
|
||||||
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
||||||
|
targetSdk = libs.versions.android.targetSdk.get().toInt()
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
consumerProguardFiles("consumer-rules.pro")
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = true
|
||||||
|
proguardFiles (getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||||
|
}
|
||||||
|
create("benchmark") {
|
||||||
|
initWith(getByName("release"))
|
||||||
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_21
|
||||||
|
targetCompatibility = JavaVersion.VERSION_21
|
||||||
|
}
|
||||||
|
packaging {
|
||||||
|
resources {
|
||||||
|
excludes.add("**/libscrypt.dylib")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publishing {
|
||||||
|
this.multipleVariants { singleVariant("release") }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvm {
|
compilerOptions {
|
||||||
compilerOptions {
|
freeCompilerArgs.add("-Xstring-concat=inline")
|
||||||
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
jvm()
|
||||||
|
|
||||||
// Target declarations - add or remove as needed below. These define
|
// Target declarations - add or remove as needed below. These define
|
||||||
// which platforms this KMP module supports.
|
// which platforms this KMP module supports.
|
||||||
// See: https://kotlinlang.org/docs/multiplatform-discover-project.html#targets
|
// See: https://kotlinlang.org/docs/multiplatform-discover-project.html#targets
|
||||||
androidLibrary {
|
androidTarget {
|
||||||
namespace = "com.vitorpamplona.quartz"
|
publishLibraryVariants("release")
|
||||||
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
|
||||||
minSdk = libs.versions.android.minSdk.get().toInt()
|
|
||||||
|
|
||||||
withHostTestBuilder {
|
|
||||||
}
|
|
||||||
|
|
||||||
withDeviceTestBuilder {
|
|
||||||
sourceSetTreeName = "test"
|
|
||||||
}.configure {
|
|
||||||
instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
}
|
|
||||||
|
|
||||||
optimization {
|
|
||||||
consumerKeepRules.publish = true
|
|
||||||
consumerKeepRules.files.add(File(project.projectDir, "proguard-rules.pro"))
|
|
||||||
}
|
|
||||||
|
|
||||||
packaging {
|
|
||||||
resources {
|
|
||||||
excludes.add("**/libscrypt.dylib")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
compilerOptions {
|
|
||||||
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
|
|
||||||
freeCompilerArgs.add("-Xstring-concat=inline")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// For iOS targets, this is also where you should
|
// For iOS targets, this is also where you should
|
||||||
@@ -89,6 +98,12 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
commonTest {
|
||||||
|
dependencies {
|
||||||
|
implementation(libs.kotlin.test)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
jvmMain {
|
jvmMain {
|
||||||
dependencies {
|
dependencies {
|
||||||
// Bitcoin secp256k1 bindings
|
// Bitcoin secp256k1 bindings
|
||||||
@@ -111,11 +126,10 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
commonTest {
|
jvmTest {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.kotlin.test)
|
|
||||||
// Bitcoin secp256k1 bindings
|
// Bitcoin secp256k1 bindings
|
||||||
api(libs.secp256k1.kmp.jni.jvm)
|
implementation(libs.secp256k1.kmp.jni.jvm)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -150,7 +164,9 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getByName("androidDeviceTest") {
|
androidUnitTest.configure { dependsOn(jvmTest.get()) }
|
||||||
|
|
||||||
|
androidInstrumentedTest {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.androidx.runner)
|
implementation(libs.androidx.runner)
|
||||||
implementation(libs.androidx.core)
|
implementation(libs.androidx.core)
|
||||||
|
Reference in New Issue
Block a user