Migrates to AGP 9
@@ -2,7 +2,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.androidApplication)
|
||||
alias(libs.plugins.jetbrainsKotlinAndroid)
|
||||
alias(libs.plugins.googleServices)
|
||||
alias(libs.plugins.jetbrainsComposeCompiler)
|
||||
alias(libs.plugins.serialization)
|
||||
@@ -192,6 +191,7 @@ android {
|
||||
buildFeatures {
|
||||
compose = true
|
||||
buildConfig = true
|
||||
resValues = true
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
|
||||
@@ -2,7 +2,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.androidLibrary)
|
||||
alias(libs.plugins.jetbrainsKotlinAndroid)
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
@@ -20,12 +20,8 @@
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
# preserve the line number information for debugging stack traces.
|
||||
-dontobfuscate
|
||||
-keepattributes LocalVariableTable
|
||||
-keepattributes LocalVariableTypeTable
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes SourceFile
|
||||
-keepattributes LineNumberTable
|
||||
-keepattributes Signature
|
||||
-keepattributes Exceptions
|
||||
-keepattributes InnerClasses
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
|
||||
-dontobfuscate
|
||||
|
||||
-ignorewarnings
|
||||
|
||||
-keepattributes *Annotation*
|
||||
|
||||
@@ -2,7 +2,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.androidLibrary)
|
||||
alias(libs.plugins.jetbrainsKotlinAndroid)
|
||||
alias(libs.plugins.androidBenchmark)
|
||||
}
|
||||
|
||||
@@ -24,7 +23,7 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
sourceSets.androidTest.resources.srcDirs += ["../quartz/src/androidInstrumentedTest/resources"]
|
||||
sourceSets.androidTest.resources.srcDirs += ["../quartz/src/androidDeviceTest/resources"]
|
||||
|
||||
testBuildType = "benchmark"
|
||||
buildTypes {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
alias(libs.plugins.androidApplication) apply false
|
||||
alias(libs.plugins.jetbrainsKotlinAndroid) apply false
|
||||
alias(libs.plugins.androidLibrary) apply false
|
||||
alias(libs.plugins.jetbrainsKotlinJvm) apply false
|
||||
alias(libs.plugins.androidBenchmark) apply false
|
||||
|
||||
@@ -1,40 +1,13 @@
|
||||
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
alias(libs.plugins.androidLibrary)
|
||||
alias(libs.plugins.androidKotlinMultiplatformLibrary)
|
||||
alias(libs.plugins.jetbrainsComposeCompiler)
|
||||
alias(libs.plugins.composeMultiplatform)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.vitorpamplona.amethyst.commons"
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xstring-concat=inline")
|
||||
@@ -47,10 +20,20 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
androidTarget {
|
||||
androidLibrary {
|
||||
namespace = "com.vitorpamplona.amethyst.commons"
|
||||
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||||
minSdk = libs.versions.android.minSdk.get().toInt()
|
||||
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_21)
|
||||
}
|
||||
|
||||
withHostTest {}
|
||||
|
||||
withDeviceTest {
|
||||
instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
@@ -124,13 +107,13 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
androidUnitTest {
|
||||
getByName("androidHostTest") {
|
||||
dependencies {
|
||||
implementation(libs.junit)
|
||||
}
|
||||
}
|
||||
|
||||
androidInstrumentedTest {
|
||||
getByName("androidDeviceTest") {
|
||||
dependencies {
|
||||
implementation(libs.androidx.junit)
|
||||
implementation(libs.androidx.espresso.core)
|
||||
|
||||
|
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 90 B |
|
Before Width: | Height: | Size: 233 B After Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 391 B After Width: | Height: | Size: 391 B |
@@ -22,7 +22,6 @@ kotlin.code.style=official
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
android.enableR8.fullMode=true
|
||||
android.nonFinalResIds=false
|
||||
|
||||
kotlin.daemon.jvmargs=-Xmx12g -XX:MaxMetaspaceSize=3g
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
accompanistAdaptive = "0.37.3"
|
||||
composeMultiplatform = "1.9.3"
|
||||
activityCompose = "1.12.2"
|
||||
agp = "8.13.2"
|
||||
agp = "9.0.0"
|
||||
android-compileSdk = "36"
|
||||
android-minSdk = "26"
|
||||
android-targetSdk = "36"
|
||||
@@ -10,8 +10,7 @@ androidKotlinGeohash = "b481c6a64e"
|
||||
androidxJunit = "1.3.0"
|
||||
appcompat = "1.7.1"
|
||||
audiowaveform = "1.1.2"
|
||||
benchmark = "1.4.1"
|
||||
benchmarkJunit4 = "1.4.1"
|
||||
benchmark = "1.5.0-alpha01"
|
||||
biometricKtx = "1.2.0-alpha05"
|
||||
coil = "3.3.0"
|
||||
composeBom = "2025.12.01"
|
||||
@@ -72,7 +71,7 @@ accompanist-adaptive = { group = "com.google.accompanist", name = "accompanist-a
|
||||
accompanist-permissions = { group = "com.google.accompanist", name = "accompanist-permissions", version.ref = "accompanistAdaptive" }
|
||||
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
|
||||
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
|
||||
androidx-benchmark-junit4 = { group = "androidx.benchmark", name = "benchmark-junit4", version.ref = "benchmarkJunit4" }
|
||||
androidx-benchmark-junit4 = { group = "androidx.benchmark", name = "benchmark-junit4", version.ref = "benchmark" }
|
||||
androidx-biometric-ktx = { group = "androidx.biometric", name = "biometric-ktx", version.ref = "biometricKtx" }
|
||||
androidx-camera-camera2 = { module = "androidx.camera:camera-camera2", version.ref = "androidxCamera" }
|
||||
androidx-camera-core = { module = "androidx.camera:camera-core", version.ref = "androidxCamera" }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#Wed Jan 04 09:23:50 EST 2023
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -3,47 +3,11 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
alias(libs.plugins.androidLibrary)
|
||||
alias(libs.plugins.androidKotlinMultiplatformLibrary)
|
||||
alias(libs.plugins.serialization)
|
||||
alias(libs.plugins.vanniktech.mavenPublish)
|
||||
}
|
||||
|
||||
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 {
|
||||
singleVariant("release")
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xstring-concat=inline")
|
||||
@@ -55,14 +19,27 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
// Target declarations - add or remove as needed below. These define
|
||||
// which platforms this KMP module supports.
|
||||
// See: https://kotlinlang.org/docs/multiplatform-discover-project.html#targets
|
||||
androidTarget {
|
||||
publishLibraryVariants("release")
|
||||
androidLibrary {
|
||||
namespace = "com.vitorpamplona.quartz"
|
||||
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||||
minSdk = libs.versions.android.minSdk.get().toInt()
|
||||
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_21)
|
||||
}
|
||||
|
||||
optimization {
|
||||
consumerKeepRules.apply {
|
||||
publish = true
|
||||
file("consumer-rules.pro")
|
||||
}
|
||||
}
|
||||
|
||||
withHostTest {}
|
||||
|
||||
withDeviceTest {
|
||||
instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
}
|
||||
|
||||
// For iOS targets, this is also where you should
|
||||
@@ -191,14 +168,14 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
androidUnitTest.configure {
|
||||
getByName("androidHostTest") {
|
||||
dependencies {
|
||||
// Bitcoin secp256k1 bindings
|
||||
implementation(libs.secp256k1.kmp.jni.jvm)
|
||||
}
|
||||
}
|
||||
|
||||
androidInstrumentedTest {
|
||||
getByName("androidDeviceTest") {
|
||||
dependencies {
|
||||
implementation(libs.androidx.runner)
|
||||
implementation(libs.androidx.core)
|
||||
@@ -216,15 +193,15 @@ kotlin {
|
||||
}
|
||||
|
||||
val iosX64Main by getting {
|
||||
dependsOn(iosMain.get()) // iosX64Main depends on iosMain
|
||||
dependsOn(iosMain.get())
|
||||
}
|
||||
|
||||
val iosArm64Main by getting {
|
||||
dependsOn(iosMain.get()) // iosArm64Main depends on iosMain
|
||||
dependsOn(iosMain.get())
|
||||
}
|
||||
|
||||
val iosSimulatorArm64Main by getting {
|
||||
dependsOn(iosMain.get()) // iosSimulatorArm64Main depends on iosMain
|
||||
dependsOn(iosMain.get())
|
||||
}
|
||||
|
||||
iosTest {
|
||||
@@ -235,15 +212,15 @@ kotlin {
|
||||
}
|
||||
|
||||
val iosX64Test by getting {
|
||||
dependsOn(iosTest.get()) // iosX64Test depends on iosTest
|
||||
dependsOn(iosTest.get())
|
||||
}
|
||||
|
||||
val iosArm64Test by getting {
|
||||
dependsOn(iosTest.get()) // iosArm64Test depends on iosTest
|
||||
dependsOn(iosTest.get())
|
||||
}
|
||||
|
||||
val iosSimulatorArm64Test by getting {
|
||||
dependsOn(iosTest.get()) // iosSimulatorArm64Test depends on iosTest
|
||||
dependsOn(iosTest.get())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -255,9 +232,6 @@ mavenPublishing {
|
||||
KotlinMultiplatform(
|
||||
// whether to publish a sources jar
|
||||
sourcesJar = true,
|
||||
// configure which Android library variants to publish if this project has an Android target
|
||||
// defaults to "release" when using the main plugin and nothing for the base plugin
|
||||
androidVariantsToPublish = listOf("release"),
|
||||
)
|
||||
)
|
||||
|
||||
@@ -268,7 +242,6 @@ mavenPublishing {
|
||||
)
|
||||
|
||||
// Configure publishing to Maven Central
|
||||
//publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, automaticRelease = true)
|
||||
publishToMavenCentral(automaticRelease = true)
|
||||
|
||||
// Enable GPG signing for all publications
|
||||
|
||||
@@ -5,20 +5,6 @@
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# preserve the line number information for debugging stack traces.
|
||||
-dontobfuscate
|
||||
-keepattributes LocalVariableTable
|
||||
-keepattributes LocalVariableTypeTable
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes SourceFile
|
||||
-keepattributes LineNumberTable
|
||||
-keepattributes Signature
|
||||
-keepattributes Exceptions
|
||||
-keepattributes InnerClasses
|
||||
-keepattributes EnclosingMethod
|
||||
-keepattributes MethodParameters
|
||||
-keepparameternames
|
||||
|
||||
-keepdirectories libs
|
||||
|
||||
# Keep all names
|
||||
|
||||