Upgrade to kotlin 1.5 (#27)

* Upgrade to kotlin 1.5.31

* Upgrade dokka gradle plugins to 1.5.30
This commit is contained in:
Fabrice Drouin
2021-09-22 15:22:05 +02:00
committed by GitHub
parent 3a394cdddc
commit e7644b7ddb
4 changed files with 61 additions and 70 deletions

View File

@@ -20,12 +20,12 @@ import java.util.*
private fun tryLoad(platform: String): Secp256k1? {
try {
val cls = Class.forName("fr.acinq.secp256k1.jni.NativeSecp256k1${platform.capitalize(Locale.ROOT)}Loader")
return try {
val cls = Class.forName("fr.acinq.secp256k1.jni.NativeSecp256k1${platform.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.ROOT) else it.toString() }}Loader")
val load = cls.getMethod("load")
return load.invoke(null) as Secp256k1
load.invoke(null) as Secp256k1
} catch (ex: ClassNotFoundException) {
return null
null
}
}