Add both libraries as git submodules and resolve them through Gradle composite builds instead of remote publications, so local changes to either library are picked up by the app build directly. Submodules: * secp256k1-frost-kmp (github.com/ac-cord-ac/secp256k1-frost-kmp) at 2478403 -- BIP-327 FROTH/FROST signing over secp256k1, KMP. * lightning-kmp-app (github.com/kngako/lightning-kmp-app) at 6745d88 -- phoenix business logic on top of lightning-kmp-core. Both submodules carry a local commit aligning them with this build's AGP 9.1.1 / Kotlin 2.4.10 (AGP version must match across a composite build or the android variants fail attribute matching). settings.gradle.kts: * includeBuild() both submodule checkouts. * lightning-kmp-app's project stays named ':library' (compose-resources derives its Res package from the project name), so an explicit dependencySubstitution maps the coordinate the app declares, fr.acinq.phoenix:lightning-kmp-app, onto that project. * Drop the jitpack.io repository: it only served com.github.kngako, which is no longer consumed as a binary. composeApp/build.gradle.kts: * commonMain gains ac.cord.auxiliary:library:1.0.0 (secp256k1-frost-kmp, substituted by the composite build). * commonMain replaces com.github.kngako.lightning-kmp-app:library (via JitPack) with fr.acinq.phoenix:lightning-kmp-app:1.0.0 (substituted by the composite build). lightning-kmp-core still comes from Maven Central. * Remove the RestoreJitPackClassifier component-metadata rule and the javax.inject import: it only existed to repair the artifact classifiers JitPack drops from the apple metadata variants, which no longer applies. gradle/libs.versions.toml: * Remove the now-unused lightningKmpApp version and the com.github.kngako lightning-kmp-app catalog entry. Verified: ./gradlew :composeApp:compileCommonMainKotlinMetadata :composeApp:compileDebugKotlinAndroid
206 lines
6.3 KiB
Kotlin
206 lines
6.3 KiB
Kotlin
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
plugins {
|
|
alias(libs.plugins.androidApplication)
|
|
// alias(libs.plugins.androidx.room)
|
|
alias(libs.plugins.androidx.room3)
|
|
alias(libs.plugins.kotlinMultiplatform)
|
|
alias(libs.plugins.composeMultiplatform)
|
|
alias(libs.plugins.composeCompiler)
|
|
alias(libs.plugins.composeHotReload)
|
|
alias(libs.plugins.kotlinPluginSerialization)
|
|
alias(libs.plugins.ksp)
|
|
alias(libs.plugins.sqldelight)
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
freeCompilerArgs.add("-Xexpect-actual-classes")
|
|
}
|
|
|
|
androidTarget {
|
|
compilerOptions {
|
|
jvmTarget.set(JvmTarget.JVM_21)
|
|
}
|
|
}
|
|
|
|
listOf(
|
|
iosArm64(),
|
|
iosSimulatorArm64()
|
|
).forEach { iosTarget ->
|
|
iosTarget.binaries.framework {
|
|
baseName = "ComposeApp"
|
|
isStatic = true
|
|
}
|
|
}
|
|
|
|
// jvm()
|
|
|
|
sourceSets {
|
|
androidMain.dependencies {
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.work.runtime.ktx)
|
|
// implementation(libs.androidx.room.sqlite.wrapper)
|
|
implementation(libs.compose.uiToolingPreview)
|
|
implementation(libs.okhttp.coroutines)
|
|
|
|
implementation(libs.sqldelight.android.driver)
|
|
}
|
|
commonMain.dependencies {
|
|
implementation(libs.androidx.datastore)
|
|
implementation(libs.androidx.datastore.preferences)
|
|
|
|
implementation(libs.androidx.lifecycle.viewmodelCompose)
|
|
implementation(libs.androidx.lifecycle.runtimeCompose)
|
|
|
|
implementation(libs.androidx.paging.common)
|
|
implementation(libs.androidx.paging.compose)
|
|
|
|
// implementation(libs.androidx.room.runtime)
|
|
implementation(libs.androidx.room3.runtime)
|
|
implementation(libs.androidx.sqlite.bundled)
|
|
|
|
implementation(libs.coil.compose)
|
|
implementation(libs.coil.network.ktor3)
|
|
|
|
implementation(libs.compose.runtime)
|
|
implementation(libs.compose.foundation)
|
|
implementation(libs.compose.material3)
|
|
implementation (libs.compose.material.icons.core)
|
|
implementation (libs.compose.material.icons.extended)
|
|
implementation(libs.compose.ui)
|
|
implementation(libs.compose.components.resources)
|
|
implementation(libs.compose.uiToolingPreview)
|
|
|
|
|
|
implementation(libs.kermit)
|
|
|
|
implementation(libs.kotlinx.datetime)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
implementation(libs.kotlinx.serialization.cbor)
|
|
|
|
|
|
implementation(libs.ktor.client.core)
|
|
implementation(libs.ktor.client.cio)
|
|
implementation(libs.ktor.client.websockets)
|
|
implementation(libs.ktor.serialization.kotlinx.json)
|
|
|
|
|
|
|
|
// implementation(libs.lightning.kmp.core)
|
|
|
|
// resolved via the lightning-kmp-app composite build (see settings.gradle.kts)
|
|
implementation("fr.acinq.phoenix:lightning-kmp-app:1.0.0")
|
|
|
|
implementation(libs.navigation.compose)
|
|
|
|
implementation(libs.okio)
|
|
|
|
implementation(libs.qrose)
|
|
|
|
implementation(libs.sqldelight.runtime)
|
|
implementation(libs.sqldelight.coroutines.extensions)
|
|
|
|
implementation(libs.vitorpamplona.quartz)
|
|
|
|
implementation("com.ionspin.kotlin:bignum:0.3.10")
|
|
|
|
// resolved via the secp256k1-frost-kmp composite build (see settings.gradle.kts)
|
|
implementation("ac.cord.auxiliary:library:1.0.0")
|
|
|
|
implementation("no.synth:kmp-zip:0.8.0")
|
|
implementation("no.synth:kmp-zip-okio:0.8.0")
|
|
}
|
|
commonTest.dependencies {
|
|
implementation(libs.kotlin.test)
|
|
}
|
|
jvmMain.dependencies {
|
|
implementation(compose.desktop.currentOs)
|
|
implementation(libs.kotlinx.coroutinesSwing)
|
|
}
|
|
iosMain.dependencies {
|
|
implementation(libs.sqldelight.native.driver)
|
|
}
|
|
}
|
|
}
|
|
|
|
android {
|
|
namespace = "press.mantra.android"
|
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
|
|
|
buildFeatures {
|
|
buildConfig = true
|
|
}
|
|
defaultConfig {
|
|
applicationId = "press.mantra.android"
|
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
|
targetSdk = libs.versions.android.targetSdk.get().toInt()
|
|
versionCode = 1
|
|
versionName = "0.1.0"
|
|
}
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
excludes += "META-INF/versions/9/OSGI-INF/MANIFEST.MF"
|
|
}
|
|
}
|
|
buildTypes {
|
|
getByName("release") {
|
|
isMinifyEnabled = false
|
|
}
|
|
getByName("debug") {
|
|
applicationIdSuffix = ".debug"
|
|
versionNameSuffix = "-DEBUG"
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
debugImplementation(libs.compose.uiTooling)
|
|
// ksp(libs.androidx.room3.compiler)
|
|
add("kspAndroid", libs.androidx.room3.compiler)
|
|
add("kspIosSimulatorArm64", libs.androidx.room3.compiler)
|
|
// add("kspIosX64", libs.androidx.room.compiler)
|
|
add("kspIosArm64", libs.androidx.room3.compiler)
|
|
// add("kspJvm", libs.androidx.room3.compiler)
|
|
// Add any other platform target you use in your project, for example kspDesktop
|
|
}
|
|
|
|
room3 {
|
|
schemaDirectory("$projectDir/schemas")
|
|
}
|
|
|
|
sqldelight {
|
|
databases {
|
|
create("ChannelsDatabase") {
|
|
packageName.set("fr.acinq.phoenix.db.sqldelight")
|
|
srcDirs.from("src/commonMain/sqldelight/channelsdb")
|
|
}
|
|
create("PaymentsDatabase") {
|
|
packageName.set("fr.acinq.phoenix.db.sqldelight")
|
|
srcDirs.from("src/commonMain/sqldelight/paymentsdb")
|
|
}
|
|
create("AppDatabase") {
|
|
packageName.set("fr.acinq.phoenix.db.sqldelight")
|
|
srcDirs.from("src/commonMain/sqldelight/appdb")
|
|
}
|
|
}
|
|
}
|
|
|
|
compose.desktop {
|
|
application {
|
|
mainClass = "press.mantra.desktop.MainKt"
|
|
|
|
nativeDistributions {
|
|
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
|
packageName = "press.mantra.desktop"
|
|
packageVersion = "1.0.0"
|
|
}
|
|
}
|
|
}
|