[WIP] kotlin tests work!
This commit is contained in:
@@ -1,16 +1,32 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.5.10'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.2.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm'
|
||||
id "org.jetbrains.kotlin.jvm" version "$kotlin_version"
|
||||
id 'java-library'
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation platform('org.jetbrains.kotlin:kotlin-bom')
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
// implementation "net.java.dev.jna:jna:5.8.0"
|
||||
// implementation(project(':jvm'))
|
||||
implementation "net.java.dev.jna:jna:5.8.0"
|
||||
implementation "junit:junit:4.13.2"
|
||||
//implementation "org.mockito.kotlin:mockito-kotlin:3.2.0"
|
||||
// api "org.slf4j:slf4j-api:1.7.30"
|
||||
}
|
||||
|
||||
java {
|
||||
|
||||
23
targets/kotlin/gradle.properties
Normal file
23
targets/kotlin/gradle.properties
Normal file
@@ -0,0 +1,23 @@
|
||||
# Project-wide Gradle settings.
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx1536m
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app's APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Automatically convert third-party libraries to use AndroidX
|
||||
android.enableJetifier=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
jna.debug_load=true
|
||||
jna.debug_load.jna=true
|
||||
@@ -3,8 +3,6 @@ package uniffi.bdk
|
||||
import uniffi.bdk.OfflineWallet
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Test
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
@@ -19,6 +17,7 @@ class LibTest {
|
||||
fun walletNewAddress() {
|
||||
val wallet = OfflineWallet(desc)
|
||||
val address = wallet.getNewAddress()
|
||||
println("address:" + address)
|
||||
assertNotNull(address)
|
||||
// log.debug("address created from kotlin: $address")
|
||||
assertEquals(address, "tb1qzg4mckdh50nwdm9hkzq06528rsu73hjxxzem3e")
|
||||
|
||||
Reference in New Issue
Block a user