summaryrefslogtreecommitdiff
path: root/wallet/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'wallet/build.gradle')
-rw-r--r--wallet/build.gradle56
1 files changed, 21 insertions, 35 deletions
diff --git a/wallet/build.gradle b/wallet/build.gradle
index 2e58d15..a050b01 100644
--- a/wallet/build.gradle
+++ b/wallet/build.gradle
@@ -17,28 +17,38 @@
plugins {
id 'org.jetbrains.kotlin.multiplatform'
id 'org.jetbrains.kotlin.plugin.serialization'
+ id 'com.android.library'
}
group 'net.taler'
version '0.0.1'
-apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
kotlin {
+ explicitApi()
+
android {
repositories {
google()
maven { url "https://dl.bintray.com/terl/lazysodium-maven" }
}
+ compilations.all {
+ kotlinOptions.jvmTarget = '1.8'
+ }
}
js {
browser {
+ testTask {
+ useKarma {
+ useChromeHeadless()
+ }
+ }
}
nodejs {
}
}
- // For ARM, should be changed to iosArm32 or iosArm64
+
ios {
compilations.main.cinterops {
sodium {
@@ -52,9 +62,6 @@ kotlin {
}
}
}
- // For Linux, should be changed to e.g. linuxX64
- // For MacOS, should be changed to e.g. macosX64
- // For Windows, should be changed to e.g. mingwX64
linuxX64("linux") {
compilations.main.cinterops {
sodium {
@@ -64,8 +71,8 @@ kotlin {
}
sourceSets {
- def coroutines_version = "1.3.8"
- def ktor_version = "1.3.2"
+ def coroutines_version = "1.3.8-native-mt-1.4.0-rc"
+ def ktor_version = "1.4.0"
all {
languageSettings {
progressiveMode = true
@@ -74,10 +81,9 @@ kotlin {
}
commonMain {
dependencies {
- implementation kotlin('stdlib-common')
api project(path: ":common")
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:$coroutines_version"
+ implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "io.ktor:ktor-client-core:$ktor_version"
implementation "io.ktor:ktor-client-logging:$ktor_version"
implementation "io.ktor:ktor-client-serialization:$ktor_version"
@@ -92,11 +98,7 @@ kotlin {
}
androidMain {
dependencies {
- implementation kotlin('stdlib-jdk8')
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
- implementation "io.ktor:ktor-client-android:$ktor_version"
- implementation "io.ktor:ktor-client-logging-jvm:$ktor_version"
- implementation "io.ktor:ktor-client-serialization-jvm:$ktor_version"
+ implementation "io.ktor:ktor-client-okhttp:$ktor_version"
// TODO Android
// implementation("com.goterl.lazycode:lazysodium-android:4.2.0@aar") {
implementation("com.goterl.lazycode:lazysodium-java:4.3.0") {
@@ -107,26 +109,13 @@ kotlin {
}
androidTest {
dependencies {
- implementation kotlin('test')
implementation kotlin('test-junit')
- implementation "io.ktor:ktor-client-mock-jvm:$ktor_version"
implementation "org.slf4j:slf4j-simple:1.7.30"
}
}
jsMain {
dependencies {
- implementation kotlin('stdlib-js')
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-js:$coroutines_version"
implementation "io.ktor:ktor-client-js:$ktor_version"
- implementation "io.ktor:ktor-client-logging-js:$ktor_version"
- implementation "io.ktor:ktor-client-serialization-js:$ktor_version"
- // bug: https://github.com/ktorio/ktor/issues/1822
- api npm("text-encoding", '0.7.0') // work-around for above bug
- api npm("bufferutil", '4.0.1') // work-around for above bug
- api npm("utf-8-validate", '5.0.2') // work-around for above bug
- api npm("abort-controller", '3.0.0') // work-around for above bug
- api npm("node-fetch", '2.6.0') // work-around for above bug
- api npm("fs", '*') // work-around for above bug
implementation npm('tweetnacl', '1.0.3')
implementation npm('ed2curve', '0.3.0')
@@ -136,21 +125,16 @@ kotlin {
jsTest {
dependencies {
implementation kotlin('test-js')
- implementation "io.ktor:ktor-client-mock-js:$ktor_version"
}
}
nativeMain {
dependsOn commonMain
dependencies {
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$coroutines_version"
- implementation "io.ktor:ktor-client-logging-native:$ktor_version"
- implementation "io.ktor:ktor-client-serialization-native:$ktor_version"
}
}
nativeTest {
dependsOn commonTest
dependencies {
- implementation "io.ktor:ktor-client-mock-native:$ktor_version"
}
}
linuxMain {
@@ -159,15 +143,17 @@ kotlin {
implementation "io.ktor:ktor-client-curl:$ktor_version"
}
}
+ linuxTest {
+ dependsOn nativeTest
+ }
iosMain {
dependsOn nativeMain
dependencies {
implementation "io.ktor:ktor-client-ios:$ktor_version"
}
}
- configure([targets.linux, targets.iosArm64, targets.iosX64]) {
- compilations.main.source(sourceSets.nativeMain)
- compilations.test.source(sourceSets.nativeTest)
+ iosTest {
+ dependsOn nativeTest
}
}
}