diff --git a/jitpack.yaml b/jitpack.yaml new file mode 100644 index 0000000..b928943 --- /dev/null +++ b/jitpack.yaml @@ -0,0 +1,4 @@ +jdk: + - openjdk11 + install: + - ./gradlew :tkey:build :tkey:publishToMavenLocal \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index c1f1b3b..e0fad8a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,6 +3,7 @@ pluginManagement { gradlePluginPortal() google() mavenCentral() + maven { url "https://jitpack.io" } } } diff --git a/tkey/build.gradle b/tkey/build.gradle index b0e71c7..f26067c 100644 --- a/tkey/build.gradle +++ b/tkey/build.gradle @@ -1,5 +1,6 @@ plugins { id 'com.android.library' + id 'maven-publish' } apply plugin: 'jacoco' @@ -81,4 +82,12 @@ afterEvaluate { javadoc.classpath += files(android.libraryVariants.collect { variant -> variant.javaCompileProvider.get().classpath.files }) + + publishing { + publications { + release(MavenPublication) { + from components.release + } + } + } } \ No newline at end of file diff --git a/tkey/libs/arm64-v8a/libtkey.a b/tkey/libs/arm64-v8a/libtkey.a index 3689064..942a40e 100644 Binary files a/tkey/libs/arm64-v8a/libtkey.a and b/tkey/libs/arm64-v8a/libtkey.a differ diff --git a/tkey/libs/armeabi-v7a/libtkey.a b/tkey/libs/armeabi-v7a/libtkey.a index 9ee5208..c5d2d9d 100644 Binary files a/tkey/libs/armeabi-v7a/libtkey.a and b/tkey/libs/armeabi-v7a/libtkey.a differ diff --git a/tkey/libs/x86/libtkey.a b/tkey/libs/x86/libtkey.a index 871e670..932f717 100644 Binary files a/tkey/libs/x86/libtkey.a and b/tkey/libs/x86/libtkey.a differ diff --git a/tkey/libs/x86_64/libtkey.a b/tkey/libs/x86_64/libtkey.a index 0c2f329..b34dc0d 100644 Binary files a/tkey/libs/x86_64/libtkey.a and b/tkey/libs/x86_64/libtkey.a differ diff --git a/tkey/src/main/java/com/web3auth/tkey/ThresholdKey/Modules/TSSModule.java b/tkey/src/main/java/com/web3auth/tkey/ThresholdKey/Modules/TSSModule.java index d949669..c14944b 100644 --- a/tkey/src/main/java/com/web3auth/tkey/ThresholdKey/Modules/TSSModule.java +++ b/tkey/src/main/java/com/web3auth/tkey/ThresholdKey/Modules/TSSModule.java @@ -703,8 +703,14 @@ public static String findDeviceShareIndex(ThresholdKey thresholdKey, String fact JSONObject resultJson = null; try { resultJson = new JSONObject(resultData.get()); + JSONObject deviceShareJson = resultJson; + try { + // backward compatible + deviceShareJson = resultJson.getJSONObject("deviceShare"); + } catch ( JSONException _e) { + // pass through + } - JSONObject deviceShareJson = resultJson.getJSONObject("deviceShare"); JSONObject shareJson = deviceShareJson.getJSONObject("share"); shareIndex.set(shareJson.get("shareIndex").toString()); } catch (JSONException e) {