-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
707 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
lib/ls-sdk-bindings/bindings-kotlin-multiplatform/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Created by https://www.toptal.com/developers/gitignore/api/android | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=android | ||
|
||
### Android ### | ||
# Gradle files | ||
.gradle/ | ||
build/ | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
|
||
# Log/OS Files | ||
*.log | ||
|
||
# Android Studio generated files and folders | ||
captures/ | ||
.externalNativeBuild/ | ||
.cxx/ | ||
*.apk | ||
output.json | ||
|
||
# IntelliJ | ||
*.iml | ||
.idea/ | ||
misc.xml | ||
deploymentTargetDropDown.xml | ||
render.experimental.xml | ||
|
||
# Keystore files | ||
*.jks | ||
*.keystore | ||
|
||
# Google Services (e.g. APIs or Firebase) | ||
google-services.json | ||
|
||
# Android Profiling | ||
*.hprof | ||
|
||
### Android Patch ### | ||
gen-external-apklibs | ||
|
||
# Replacement of .externalNativeBuild directories introduced | ||
# with Android Studio 3.5. | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/android | ||
|
||
breez-liquid-sdk-kmp/src/androiddMain/jniLibs/ | ||
breez-liquid-sdk-kmp/src/jvmMain/jniLibs/ | ||
|
||
breez-liquid-sdk-kmp/src/commonMain/kotlin/breez_liquid_sdk | ||
breez-liquid-sdk-kmp/src/jvmMain/kotlin/breez_liquid_sdk | ||
breez-liquid-sdk-kmp/src/androidMain/kotlin/breez_liquid_sdk | ||
breez-liquid-sdk-kmp/src/nativeMain/kotlin/breez_liquid_sdk | ||
breez-liquid-sdk-kmp/src/nativeInterop/cinterop/headers/breez_liquid_sdk |
135 changes: 135 additions & 0 deletions
135
lib/ls-sdk-bindings/bindings-kotlin-multiplatform/breez-liquid-sdk-kmp/build.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
plugins { | ||
kotlin("multiplatform") | ||
id("com.android.library") | ||
id("maven-publish") | ||
} | ||
|
||
apply(plugin = "kotlinx-atomicfu") | ||
|
||
kotlin { | ||
// Enable the default target hierarchy | ||
applyDefaultHierarchyTemplate() | ||
|
||
androidTarget { | ||
compilations.all { | ||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_17.majorVersion | ||
} | ||
} | ||
|
||
publishLibraryVariants("release") | ||
} | ||
|
||
jvm { | ||
compilations.all { | ||
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.majorVersion | ||
} | ||
} | ||
|
||
listOf( | ||
iosX64(), | ||
iosArm64(), | ||
iosSimulatorArm64() | ||
).forEach { | ||
val platform = when (it.targetName) { | ||
"iosSimulatorArm64" -> "ios_simulator_arm64" | ||
"iosArm64" -> "ios_arm64" | ||
"iosX64" -> "ios_x64" | ||
else -> error("Unsupported target $name") | ||
} | ||
|
||
it.compilations["main"].cinterops { | ||
create("breezCInterop") { | ||
defFile(project.file("src/nativeInterop/cinterop/breez.def")) | ||
includeDirs(project.file("src/nativeInterop/cinterop/headers/breez_liquid_sdk"), project.file("src/libs/$platform")) | ||
} | ||
} | ||
} | ||
|
||
sourceSets { | ||
all { | ||
languageSettings.apply { | ||
optIn("kotlinx.cinterop.ExperimentalForeignApi") | ||
} | ||
} | ||
|
||
val commonMain by getting { | ||
dependencies { | ||
implementation("com.squareup.okio:okio:3.6.0") | ||
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.5.0") | ||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0") | ||
} | ||
} | ||
|
||
val jvmMain by getting { | ||
dependsOn(commonMain) | ||
dependencies { | ||
implementation("net.java.dev.jna:jna:5.13.0") | ||
} | ||
} | ||
|
||
val androidMain by getting { | ||
dependsOn(commonMain) | ||
dependencies { | ||
implementation("net.java.dev.jna:jna:5.13.0@aar") | ||
implementation("org.jetbrains.kotlinx:atomicfu:0.23.1") | ||
} | ||
} | ||
} | ||
} | ||
|
||
android { | ||
namespace = "technology.breez" | ||
compileSdk = 33 | ||
|
||
defaultConfig { | ||
minSdk = 21 | ||
consumerProguardFiles("consumer-rules.pro") | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
} | ||
|
||
val libraryVersion: String by project | ||
|
||
group = "technology.breez" | ||
version = libraryVersion | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
name = "breezReposilite" | ||
url = uri("https://mvn.breez.technology/releases") | ||
credentials(PasswordCredentials::class) | ||
authentication { | ||
create<BasicAuthentication>("basic") | ||
} | ||
} | ||
} | ||
|
||
publications { | ||
this.forEach { | ||
(it as MavenPublication).apply { | ||
pom { | ||
name.set("breez-liquid-sdk-kmp") | ||
description.set("The Breez Liquid SDK enables mobile developers to integrate Liquid swaps into their apps with a very shallow learning curve.") | ||
url.set("https://breez.technology") | ||
licenses { | ||
license { | ||
name.set("MIT") | ||
url.set("https://github.com/breez/breez-liquid-sdk/blob/main/LICENSE") | ||
} | ||
} | ||
scm { | ||
connection.set("scm:git:github.com/breez/breez-liquid-sdk.git") | ||
developerConnection.set("scm:git:ssh://github.com/breez/breez-liquid-sdk.git") | ||
url.set("https://github.com/breez/breez-liquid-sdk") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.