From e105aa5252b32d184f1893b3626458356015738f Mon Sep 17 00:00:00 2001 From: Marc Prud'hommeaux Date: Thu, 31 Oct 2024 12:43:13 -0400 Subject: [PATCH] Configure jniLibs to use pickFirsts to prevent errors about duplicate symbols --- Sources/SkipBridge/Skip/skip.yml | 11 +++++++---- Sources/SkipBridgeSamples/Skip/skip.yml | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Sources/SkipBridge/Skip/skip.yml b/Sources/SkipBridge/Skip/skip.yml index c2db4a7..d4e92a9 100644 --- a/Sources/SkipBridge/Skip/skip.yml +++ b/Sources/SkipBridge/Skip/skip.yml @@ -62,8 +62,11 @@ build: contents: # .build/jni-libs/ is the folder where our toolchain outputs the natively-compiled .so files - 'getByName("main").jniLibs.srcDirs(".build/jni-libs")' - - block: 'packagingOptions' + - block: 'packaging' contents: - # doNotStrip is needed to prevent errors like: java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH/DT_GNU_HASH in "/data/app/~~Zoepnr93K9vyUtTUUM0POg==/skip.bridge.samples.test-3nePwd6ioGZtLQ0K0EJpBQ==/base.apk!/lib/arm64-v8a/libdispatch.so" (new hash type from the future?) (see: https://github.com/finagolfin/swift-android-sdk/issues/67) - # also seems to affect libandroid-spawn.so - - 'jniLibs.keepDebugSymbols.add("*/*/*.so")' + - block: 'jniLibs' + contents: + # doNotStrip is needed to prevent errors like: java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH/DT_GNU_HASH in "/data/app/~~Zoepnr93K9vyUtTUUM0POg==/skip.bridge.samples.test-3nePwd6ioGZtLQ0K0EJpBQ==/base.apk!/lib/arm64-v8a/libdispatch.so" (new hash type from the future?) (see: https://github.com/finagolfin/swift-android-sdk/issues/67) + # also seems to affect libandroid-spawn.so + - 'keepDebugSymbols.add("**/*.so")' + - 'pickFirsts.add("**/*.so")' diff --git a/Sources/SkipBridgeSamples/Skip/skip.yml b/Sources/SkipBridgeSamples/Skip/skip.yml index 3c467fa..c35c5ec 100644 --- a/Sources/SkipBridgeSamples/Skip/skip.yml +++ b/Sources/SkipBridgeSamples/Skip/skip.yml @@ -1,2 +1,3 @@ +# Configuration file for https://skip.tools project skip: mode: 'kotlin'