@@ -15,7 +15,7 @@ val jniLibsDir = "$androidPath/src/main/jniLibs/"
15
15
16
16
val androidNdkRoot = System .getenv(" ANDROID_NDK_ROOT" )
17
17
18
- val cargoBuildCommonArgs: MutableList <String > = mutableListOf (" build" , " --target" )
18
+ val cargoBuildCommonArgs: MutableList <String > = mutableListOf (" build" , " --release " , " -- target" )
19
19
20
20
val prepareBuild by tasks.register(" prepareBuild" ) {
21
21
File (jniLibsDir).deleteRecursively()
@@ -111,25 +111,25 @@ val buildAndroidArmv7Binary by tasks.register<Exec>("buildAndroidArmv7Binary") {
111
111
}
112
112
}
113
113
114
- // move the native libs build by cargo from rgb-lib-ffi/target/<architecture>/debug /
114
+ // move the native libs build by cargo from rgb-lib-ffi/target/<architecture>/release /
115
115
// to their place in the rgb-lib-android library
116
116
// the task only copies the available binaries built using the buildAndroid<architecture>Binary tasks
117
117
val moveNativeAndroidLibs by tasks.register<Copy >(" moveNativeAndroidLibs" ) {
118
118
119
119
into(jniLibsDir)
120
120
121
121
into(" arm64-v8a" ) {
122
- from(" $rgbLibFfiPath /target/aarch64-linux-android/debug /librgblibffi.so" )
122
+ from(" $rgbLibFfiPath /target/aarch64-linux-android/release /librgblibffi.so" )
123
123
from(" $androidNdkRoot /sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so" )
124
124
}
125
125
126
126
into(" x86_64" ) {
127
- from(" $rgbLibFfiPath /target/x86_64-linux-android/debug /librgblibffi.so" )
127
+ from(" $rgbLibFfiPath /target/x86_64-linux-android/release /librgblibffi.so" )
128
128
from(" $androidNdkRoot /sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so" )
129
129
}
130
130
131
131
into(" armeabi-v7a" ) {
132
- from(" $rgbLibFfiPath /target/armv7-linux-androideabi/debug /librgblibffi.so" )
132
+ from(" $rgbLibFfiPath /target/armv7-linux-androideabi/release /librgblibffi.so" )
133
133
from(" $androidNdkRoot /sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_shared.so" )
134
134
}
135
135
0 commit comments