Merge pull request #31 from notmandatory/change-aar-outputs

Export source files with aar
This commit is contained in:
Sudarsan Balaji 2021-10-21 23:27:04 +05:30 committed by GitHub
commit 9757b9900e
5 changed files with 12 additions and 7 deletions

View File

@ -33,7 +33,7 @@ afterEvaluate {
from components.release
// You can then customize attributes of the publication as shown below.
groupId = 'org.bitcoindevkit'
groupId = 'uniffi.bdk'
artifactId = 'bdk'
version = '0.0.1-SNAPSHOT'
}
@ -42,7 +42,7 @@ afterEvaluate {
// Applies the component for the debug build variant.
from components.debug
groupId = 'org.bitcoindevkit'
groupId = 'uniffi.bdk'
artifactId = 'bdk-debug'
version = '0.0.1-SNAPSHOT'
}
@ -51,9 +51,9 @@ afterEvaluate {
}
dependencies {
implementation(project(':jvm')) {
exclude group: 'net.java.dev.jna', module: 'jna'
}
// implementation(project(':jvm')) {
// exclude group: 'net.java.dev.jna', module: 'jna'
// }
implementation 'net.java.dev.jna:jna:5.8.0@aar'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

View File

@ -23,4 +23,6 @@
# for JNA
-dontwarn java.awt.*
-keep class com.sun.jna.* { *; }
-keep class uniffi.bdk.* { *; }
-keepclassmembers class * extends uniffi.bdk.* { public *; }
-keepclassmembers class * extends com.sun.jna.* { public *; }

View File

@ -1,4 +1,4 @@
package org.bitcoindevkit.bdk
package uniffi.bdk
import android.app.Application
import android.content.Context.MODE_PRIVATE

View File

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.bitcoindevkit.bdk">
package="uniffi.bdk">
<uses-permission android:name="android.permission.INTERNET" />

View File

@ -82,6 +82,9 @@ build_android() {
cp target/i686-linux-android/debug/libuniffi_bdk.so bindings/bdk-kotlin/android/src/main/jniLibs/x86
fi
# copy sources
cp -R bindings/bdk-kotlin/jvm/src/main/ bindings/bdk-kotlin/android/src/main/
# bdk-kotlin aar
(cd bindings/bdk-kotlin && ./gradlew :android:build && ./gradlew :android:publishToMavenLocal)
}