update kmp-tor to v1.4.3, fix storage tests

This commit is contained in:
Craig Raw 2023-06-22 07:54:48 +02:00
parent c4651025be
commit c7923300c6
2 changed files with 14 additions and 26 deletions

View file

@ -24,7 +24,7 @@ if(System.getProperty("os.arch") == "aarch64") {
def headless = "true".equals(System.getProperty("java.awt.headless")) def headless = "true".equals(System.getProperty("java.awt.headless"))
def vTor = '4.7.13-4' def vTor = '4.7.13-4'
def vKmpTor = '1.4.2' def vKmpTor = '1.4.3'
def kmpOs = osName def kmpOs = osName
if(os.macOsX) { if(os.macOsX) {
kmpOs = "macos" kmpOs = "macos"
@ -105,7 +105,7 @@ dependencies {
} }
implementation("io.matthewnelson.kotlin-components:kmp-tor-binary-extract:${vTor}") implementation("io.matthewnelson.kotlin-components:kmp-tor-binary-extract:${vTor}")
implementation("io.matthewnelson.kotlin-components:kmp-tor-ext-callback-manager:${vKmpTor}") 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('de.codecentric.centerdevice:centerdevice-nsmenufx:2.1.7')
implementation('org.controlsfx:controlsfx:11.1.0' ) { implementation('org.controlsfx:controlsfx:11.1.0' ) {
exclude group: 'org.openjfx', module: 'javafx-base' 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.net=com.sparrowwallet.sparrow",
"--add-opens=java.base/java.io=com.google.gson", "--add-opens=java.base/java.io=com.google.gson",
"--add-opens=java.smartcardio/sun.security.smartcardio=com.sparrowwallet.sparrow", "--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) { if(os.macOsX) {
applicationDefaultJvmArgs += ["-Dprism.lcdtext=false", "-Xdock:name=Sparrow", "-Xdock:icon=/Users/scy/git/sparrow/src/main/resources/sparrow-large.png", 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.annotation",
"--add-reads=com.sparrowwallet.merged.module=com.fasterxml.jackson.core", "--add-reads=com.sparrowwallet.merged.module=com.fasterxml.jackson.core",
"--add-reads=com.sparrowwallet.merged.module=co.nstant.in.cbor", "--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) { if(os.windows) {
jvmArgs += ["-Djavax.accessibility.assistive_technologies", "-Djavax.accessibility.screen_magnifier_present=false"] jvmArgs += ["-Djavax.accessibility.assistive_technologies", "-Djavax.accessibility.screen_magnifier_present=false"]
@ -605,19 +605,6 @@ extraJavaModuleInfo {
requires('javafx.graphics') requires('javafx.graphics')
requires('java.xml') 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}") { module("kmp-tor-jvm-${vKmpTor}.jar", 'kmp.tor.jvm', "${vTor}-${vKmpTor}") {
exports('io.matthewnelson.kmp.tor') exports('io.matthewnelson.kmp.tor')
requires('kmp.tor.binary.extract.jvm') requires('kmp.tor.binary.extract.jvm')
@ -625,7 +612,7 @@ extraJavaModuleInfo {
requires('kmp.tor.manager.common.jvm') requires('kmp.tor.manager.common.jvm')
requires('kmp.tor.controller.common.jvm') requires('kmp.tor.controller.common.jvm')
requires('kotlin.stdlib') requires('kotlin.stdlib')
requires('kotlinx.coroutines.core.jvm') requires('kotlinx.coroutines.core')
requires('java.management') requires('java.management')
} }
if(kmpOs == "linux" && kmpArch == "arm64") { if(kmpOs == "linux" && kmpArch == "arm64") {
@ -652,7 +639,7 @@ extraJavaModuleInfo {
requires('kmp.tor.controller.common.jvm') requires('kmp.tor.controller.common.jvm')
requires('kmp.tor.manager.common.jvm') requires('kmp.tor.manager.common.jvm')
requires('kotlin.stdlib') requires('kotlin.stdlib')
requires('kotlinx.coroutines.core.jvm') requires('kotlinx.coroutines.core')
requires('kotlinx.atomicfu') requires('kotlinx.atomicfu')
requires('kmp.tor.controller.jvm') requires('kmp.tor.controller.jvm')
requires('kmp.tor.common.jvm') requires('kmp.tor.common.jvm')
@ -685,7 +672,7 @@ extraJavaModuleInfo {
exports('io.matthewnelson.kmp.tor.controller.internal.controller') exports('io.matthewnelson.kmp.tor.controller.internal.controller')
requires('kmp.tor.common.jvm') requires('kmp.tor.common.jvm')
requires('kmp.tor.controller.common.jvm') requires('kmp.tor.controller.common.jvm')
requires('kotlinx.coroutines.core.jvm') requires('kotlinx.coroutines.core')
requires('kotlin.stdlib') requires('kotlin.stdlib')
requires('kotlinx.atomicfu') requires('kotlinx.atomicfu')
requires('encoding.core.jvm') requires('encoding.core.jvm')
@ -703,7 +690,7 @@ extraJavaModuleInfo {
requires('kmp.tor.manager.common.jvm') requires('kmp.tor.manager.common.jvm')
requires('kmp.tor.controller.common.jvm') requires('kmp.tor.controller.common.jvm')
requires('kotlin.stdlib') 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}") { 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') exports('io.matthewnelson.kmp.tor.ext.callback.manager.common')
@ -717,14 +704,14 @@ extraJavaModuleInfo {
exports('io.matthewnelson.kmp.tor.binary.geoip') exports('io.matthewnelson.kmp.tor.binary.geoip')
exports('kmptor') 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') exports('io.matthewnelson.encoding.base16')
requires('encoding.core.jvm') requires('encoding.core.jvm')
requires('kotlin.stdlib') requires('kotlin.stdlib')
} }
module("encoding-base32-jvm-1.2.1.jar", 'encoding.base32.jvm', "1.2.1") module("base32-jvm-2.0.0.jar", 'encoding.base32.jvm', "2.0.0")
module("encoding-base64-jvm-1.2.1.jar", 'encoding.base64.jvm', "1.2.1") module("base64-jvm-2.0.0.jar", 'encoding.base64.jvm', "2.0.0")
module("encoding-core-jvm-1.2.1.jar", 'encoding.core.jvm', "1.2.1") { module("core-jvm-2.0.0.jar", 'encoding.core.jvm', "2.0.0") {
exports('io.matthewnelson.encoding.core') exports('io.matthewnelson.encoding.core')
requires('kotlin.stdlib') requires('kotlin.stdlib')
} }

View file

@ -12,7 +12,8 @@ public class IoTest {
protected File getFile(String filename) { protected File getFile(String filename) {
try { 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); Files.copy(getInputStream(filename), tempFile, StandardCopyOption.REPLACE_EXISTING);
return tempFile.toFile(); return tempFile.toFile();
} catch(IOException e) { } catch(IOException e) {