Skip to content

Commit

Permalink
🐛 [Android] Fix external native build
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Jan 31, 2024
1 parent 1ab772c commit 089c514
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/build
/captures
/src/main/jniLibs/
/.cxx
4 changes: 4 additions & 0 deletions android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ set(LibraryVersion "agent_dart-v1.0.0") # generated; do not edit
# the plugin to fail to compile for some customers of the plugin.
cmake_minimum_required(VERSION 3.10)

# Project-level configuration.
set(PROJECT_NAME "agent_dart") # Should match the name field in the pubspec.yaml.
project(PROJECT_NAME)

# Download the binaries if they are not already present.
set(LibRoot "${CMAKE_CURRENT_SOURCE_DIR}/src/main/jniLibs")
set(ArchivePath "${CMAKE_CURRENT_SOURCE_DIR}/${LibraryVersion}.tar.gz")
Expand Down
7 changes: 7 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ android {
defaultConfig {
minSdkVersion 23
}

// Trigger the binary download/update over in CMakeLists.txt
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
}

dependencies {
Expand Down

0 comments on commit 089c514

Please sign in to comment.