Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: android-libs
path: android/**/*.a
path: android/**/*.so
if-no-files-found: error

ios:
Expand All @@ -42,4 +42,3 @@ jobs:
name: xcframework
path: build/*.xcframework
if-no-files-found: error

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ project.xcworkspace
local.properties
android.iml
*.aar
android/src/main/java/org
android/src/main/java/uniffi

# Cocoapods
example/ios/Pods
Expand Down Expand Up @@ -79,6 +77,7 @@ lib/
# uniffi-bindgen-react-native
rust_modules/
*.a
*.so

# React Native Codegen
ios/generated
Expand Down
6 changes: 3 additions & 3 deletions android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")

cmake_path(
SET MY_RUST_LIB
${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libmatrix_sdk_ffi.a
${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libmatrix_sdk_ffi.so
NORMALIZE
)
add_library(my_rust_lib STATIC IMPORTED)
set_target_properties(my_rust_lib PROPERTIES IMPORTED_LOCATION ${MY_RUST_LIB})
add_library(my_rust_lib SHARED IMPORTED)
set_target_properties(my_rust_lib PROPERTIES IMPORTED_LOCATION ${MY_RUST_LIB} IMPORTED_NO_SONAME ON)

# Add ReactAndroid libraries, being careful to account for different versions.
find_package(ReactAndroid REQUIRED CONFIG)
Expand Down
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "net.java.dev.jna:jna:5.17.0@aar"
}

if (isNewArchitectureEnabled()) {
Expand Down
4 changes: 4 additions & 0 deletions android/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by uniffi-bindgen-react-native
-dontwarn java.awt.*
-keep class com.sun.jna.* { *; }
-keepclassmembers class * extends com.sun.jna.* { public *; }
Loading
Loading