From c7923300c6e58454b32cec0a0487a5b445ff13fd Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 22 Jun 2023 07:54:48 +0200 Subject: [PATCH] update kmp-tor to v1.4.3, fix storage tests --- build.gradle | 37 ++++++------------- .../com/sparrowwallet/sparrow/io/IoTest.java | 3 +- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/build.gradle b/build.gradle index c2d32629..91a27182 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,7 @@ if(System.getProperty("os.arch") == "aarch64") { def headless = "true".equals(System.getProperty("java.awt.headless")) def vTor = '4.7.13-4' -def vKmpTor = '1.4.2' +def vKmpTor = '1.4.3' def kmpOs = osName if(os.macOsX) { kmpOs = "macos" @@ -105,7 +105,7 @@ dependencies { } implementation("io.matthewnelson.kotlin-components:kmp-tor-binary-extract:${vTor}") implementation("io.matthewnelson.kotlin-components:kmp-tor-ext-callback-manager:${vKmpTor}") - implementation('org.jetbrains.kotlinx:kotlinx-coroutines-javafx:1.6.4') + implementation('org.jetbrains.kotlinx:kotlinx-coroutines-javafx:1.7.1') implementation('de.codecentric.centerdevice:centerdevice-nsmenufx:2.1.7') implementation('org.controlsfx:controlsfx:11.1.0' ) { exclude group: 'org.openjfx', module: 'javafx-base' @@ -182,7 +182,7 @@ run { "--add-opens=java.base/java.net=com.sparrowwallet.sparrow", "--add-opens=java.base/java.io=com.google.gson", "--add-opens=java.smartcardio/sun.security.smartcardio=com.sparrowwallet.sparrow", - "--add-reads=kotlin.stdlib=kotlinx.coroutines.core.jvm"] + "--add-reads=kotlin.stdlib=kotlinx.coroutines.core"] if(os.macOsX) { applicationDefaultJvmArgs += ["-Dprism.lcdtext=false", "-Xdock:name=Sparrow", "-Xdock:icon=/Users/scy/git/sparrow/src/main/resources/sparrow-large.png", @@ -241,7 +241,7 @@ jlink { "--add-reads=com.sparrowwallet.merged.module=com.fasterxml.jackson.annotation", "--add-reads=com.sparrowwallet.merged.module=com.fasterxml.jackson.core", "--add-reads=com.sparrowwallet.merged.module=co.nstant.in.cbor", - "--add-reads=kotlin.stdlib=kotlinx.coroutines.core.jvm"] + "--add-reads=kotlin.stdlib=kotlinx.coroutines.core"] if(os.windows) { jvmArgs += ["-Djavax.accessibility.assistive_technologies", "-Djavax.accessibility.screen_magnifier_present=false"] @@ -605,19 +605,6 @@ extraJavaModuleInfo { requires('javafx.graphics') requires('java.xml') } - module('kotlinx-coroutines-core-jvm-1.6.4.jar', 'kotlinx.coroutines.core.jvm', '1.6.4') { - exports('kotlinx.coroutines') - requires('kotlin.stdlib') - requires('java.instrument') - uses('kotlinx.coroutines.CoroutineExceptionHandler') - uses('kotlinx.coroutines.internal.MainDispatcherFactory') - } - module('kotlinx-coroutines-javafx-1.6.4.jar', 'kotlinx.coroutines.javafx', '1.6.4') { - exports('kotlinx.coroutines.javafx') - requires('kotlinx.coroutines.core.jvm') - requires('kotlin.stdlib') - requires('javafx.graphics') - } module("kmp-tor-jvm-${vKmpTor}.jar", 'kmp.tor.jvm', "${vTor}-${vKmpTor}") { exports('io.matthewnelson.kmp.tor') requires('kmp.tor.binary.extract.jvm') @@ -625,7 +612,7 @@ extraJavaModuleInfo { requires('kmp.tor.manager.common.jvm') requires('kmp.tor.controller.common.jvm') requires('kotlin.stdlib') - requires('kotlinx.coroutines.core.jvm') + requires('kotlinx.coroutines.core') requires('java.management') } if(kmpOs == "linux" && kmpArch == "arm64") { @@ -652,7 +639,7 @@ extraJavaModuleInfo { requires('kmp.tor.controller.common.jvm') requires('kmp.tor.manager.common.jvm') requires('kotlin.stdlib') - requires('kotlinx.coroutines.core.jvm') + requires('kotlinx.coroutines.core') requires('kotlinx.atomicfu') requires('kmp.tor.controller.jvm') requires('kmp.tor.common.jvm') @@ -685,7 +672,7 @@ extraJavaModuleInfo { exports('io.matthewnelson.kmp.tor.controller.internal.controller') requires('kmp.tor.common.jvm') requires('kmp.tor.controller.common.jvm') - requires('kotlinx.coroutines.core.jvm') + requires('kotlinx.coroutines.core') requires('kotlin.stdlib') requires('kotlinx.atomicfu') requires('encoding.core.jvm') @@ -703,7 +690,7 @@ extraJavaModuleInfo { requires('kmp.tor.manager.common.jvm') requires('kmp.tor.controller.common.jvm') requires('kotlin.stdlib') - requires('kotlinx.coroutines.core.jvm') + requires('kotlinx.coroutines.core') } module("kmp-tor-ext-callback-manager-common-jvm-${vKmpTor}.jar", 'kmp.tor.ext.callback.manager.common.jvm', "${vKmpTor}") { exports('io.matthewnelson.kmp.tor.ext.callback.manager.common') @@ -717,14 +704,14 @@ extraJavaModuleInfo { exports('io.matthewnelson.kmp.tor.binary.geoip') exports('kmptor') } - module("encoding-base16-jvm-1.2.1.jar", 'encoding.base16.jvm', "1.2.1") { + module("base16-jvm-2.0.0.jar", 'encoding.base16.jvm', "2.0.0") { exports('io.matthewnelson.encoding.base16') requires('encoding.core.jvm') requires('kotlin.stdlib') } - module("encoding-base32-jvm-1.2.1.jar", 'encoding.base32.jvm', "1.2.1") - module("encoding-base64-jvm-1.2.1.jar", 'encoding.base64.jvm', "1.2.1") - module("encoding-core-jvm-1.2.1.jar", 'encoding.core.jvm', "1.2.1") { + module("base32-jvm-2.0.0.jar", 'encoding.base32.jvm', "2.0.0") + module("base64-jvm-2.0.0.jar", 'encoding.base64.jvm', "2.0.0") + module("core-jvm-2.0.0.jar", 'encoding.core.jvm', "2.0.0") { exports('io.matthewnelson.encoding.core') requires('kotlin.stdlib') } diff --git a/src/test/java/com/sparrowwallet/sparrow/io/IoTest.java b/src/test/java/com/sparrowwallet/sparrow/io/IoTest.java index f0cc1458..4a7acc93 100644 --- a/src/test/java/com/sparrowwallet/sparrow/io/IoTest.java +++ b/src/test/java/com/sparrowwallet/sparrow/io/IoTest.java @@ -12,7 +12,8 @@ public class IoTest { protected File getFile(String filename) { try { - Path tempFile = Files.createTempFile(filename, null); + Path tempDir = Files.createTempDirectory(null); + Path tempFile = Files.createTempFile(tempDir, filename, null); Files.copy(getInputStream(filename), tempFile, StandardCopyOption.REPLACE_EXISTING); return tempFile.toFile(); } catch(IOException e) {