Move bdk-kotlin test-fixtures tests to jvm module
This commit is contained in:
parent
5ece17d67a
commit
e9f00dcb75
@ -62,8 +62,10 @@ dependencies {
|
||||
api "org.slf4j:slf4j-api:1.7.30"
|
||||
|
||||
androidTestImplementation 'com.github.tony19:logback-android:2.0.0'
|
||||
androidTestImplementation(project(':test-fixtures')) {
|
||||
androidTestImplementation(testFixtures(project(':jvm'))) {
|
||||
exclude group: 'net.java.dev.jna', module: 'jna'
|
||||
exclude group: 'ch.qos.logback', module: 'logback-core'
|
||||
exclude group: 'ch.qos.logback', module: 'logback-classic'
|
||||
}
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||||
|
@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm'
|
||||
id 'java-library'
|
||||
id 'java-test-fixtures'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
@ -19,11 +20,10 @@ 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 "junit:junit:4.13.2"
|
||||
api "org.slf4j:slf4j-api:1.7.30"
|
||||
testImplementation "ch.qos.logback:logback-classic:1.2.3"
|
||||
testImplementation "ch.qos.logback:logback-core:1.2.3"
|
||||
testImplementation(project(':test-fixtures'))
|
||||
testFixturesImplementation "junit:junit:4.13.2"
|
||||
testFixturesImplementation "ch.qos.logback:logback-classic:1.2.3"
|
||||
testFixturesImplementation "ch.qos.logback:logback-core:1.2.3"
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
@ -52,7 +52,15 @@ abstract class LibTest {
|
||||
@Test
|
||||
fun onlineWalletInMemory() {
|
||||
val db = DatabaseConfig.Memory("")
|
||||
val client = BlockchainConfig.Electrum(ElectrumConfig("ssl://electrum.blockstream.info:60002", null, 5u, null, 100u))
|
||||
val client = BlockchainConfig.Electrum(
|
||||
ElectrumConfig(
|
||||
"ssl://electrum.blockstream.info:60002",
|
||||
null,
|
||||
5u,
|
||||
null,
|
||||
100u
|
||||
)
|
||||
)
|
||||
val wallet = OnlineWallet(desc, Network.TESTNET, db, client)
|
||||
assertNotNull(wallet)
|
||||
val network = wallet.getNetwork()
|
||||
@ -70,7 +78,15 @@ abstract class LibTest {
|
||||
@Test
|
||||
fun onlineWalletSyncGetBalance() {
|
||||
val db = DatabaseConfig.Memory("")
|
||||
val client = BlockchainConfig.Electrum(ElectrumConfig("ssl://electrum.blockstream.info:60002", null, 5u, null, 100u))
|
||||
val client = BlockchainConfig.Electrum(
|
||||
ElectrumConfig(
|
||||
"ssl://electrum.blockstream.info:60002",
|
||||
null,
|
||||
5u,
|
||||
null,
|
||||
100u
|
||||
)
|
||||
)
|
||||
val wallet = OnlineWallet(desc, Network.TESTNET, db, client)
|
||||
wallet.sync(LogProgress(), null)
|
||||
val balance = wallet.getBalance()
|
@ -1,4 +1,4 @@
|
||||
rootProject.name = 'bdk-kotlin'
|
||||
|
||||
include ':jvm',':demo',':test-fixtures',':android'
|
||||
include ':jvm',':demo',':android'
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm'
|
||||
id 'java-library'
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation platform('org.jetbrains.kotlin:kotlin-bom')
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
|
||||
implementation(project(':jvm'))
|
||||
implementation "junit:junit:4.13.2"
|
||||
api "org.slf4j:slf4j-api:1.7.30"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user