Skip to content

Commit

Permalink
build: use bundled jniLibs artifact during flutter android builds (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccartney authored Jan 8, 2024
1 parent d28c187 commit 818031b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions bindings_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.0.1-development.4
- use bundled artifacts in android CMakeLists build

## 0.0.1-development.3
- expose `user_preferences_encrypt()` and `user_preferences_decrypt()`

Expand Down
5 changes: 5 additions & 0 deletions bindings_flutter/android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ set(ArchiveUrl "https://github.com/xmtp/libxmtp/releases/download/${ReleaseTag}/
set(ArchivePath "${CMAKE_CURRENT_SOURCE_DIR}/${ArchiveFileName}")
set(LibRoot "${CMAKE_CURRENT_SOURCE_DIR}/src/main/jniLibs")

# NOTE: For now, we short-circuit the download by copying from bundled artifacts/
# TODO: actually download the published release at first-build instead
# See also setup-apple-artifacts.sh (which does the same thing for iOS/macOS)
file(COPY "../artifacts/android/${ArchiveFileName}" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}")

if(NOT EXISTS ${ArchivePath})
message(STATUS "Downloading ${ArchiveUrl} to ${ArchivePath}")
file(DOWNLOAD
Expand Down
2 changes: 1 addition & 1 deletion bindings_flutter/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
xmtp_bindings_flutter_version=0.0.1-development.3
xmtp_bindings_flutter_version=0.0.1-development.4
# These versions should be kept in sync:
# - pubspec.yaml
# - android/gradle.properties
Expand Down
2 changes: 1 addition & 1 deletion bindings_flutter/ios/xmtp_bindings_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# See generally
# https://cjycode.com/flutter_rust_bridge/library/platform_setup/ios_and_macos.html

release_version = '0.0.1-development.3'
release_version = '0.0.1-development.4'
# These versions should be kept in sync:
# - pubspec.yaml
# - android/gradle.properties
Expand Down
2 changes: 1 addition & 1 deletion bindings_flutter/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)

# TODO: set this externally as part of invoking linux build
set(LibraryName "xmtp_bindings_flutter")
set(ReleaseVersion "0.0.1-development.3")
set(ReleaseVersion "0.0.1-development.4")

# Download the binaries if they are not already present.
project("${LibraryName}")
Expand Down
2 changes: 1 addition & 1 deletion bindings_flutter/macos/xmtp_bindings_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# See generally
# https://cjycode.com/flutter_rust_bridge/library/platform_setup/ios_and_macos.html

release_version = '0.0.1-development.3'
release_version = '0.0.1-development.4'
# These versions should be kept in sync:
# - pubspec.yaml
# - android/gradle.properties
Expand Down
2 changes: 1 addition & 1 deletion bindings_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: xmtp_bindings_flutter
description: low-level flutter bindings to libxmtp
repository: https://github.com/xmtp/libxmtp
version: 0.0.1-development.3
version: 0.0.1-development.4
# These versions should be kept in sync:
# - pubspec.yaml
# - android/gradle.properties
Expand Down

0 comments on commit 818031b

Please sign in to comment.