File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed
Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -46,24 +46,17 @@ android {
4646 }
4747}
4848
49- tasks.register<Copy >(" copyNativeLibs" ) {
49+ val copyNativeLibs by tasks.register<Copy >(" copyNativeLibs" ) {
5050 doFirst {
5151 delete(" src/main/jniLibs" )
5252 }
5353 from(" ../../libclash/android" )
5454 into(" src/main/jniLibs" )
5555}
5656
57- tasks.withType<MergeSourceSetFolders >().configureEach {
58- dependsOn(" copyNativeLibs" )
59- }
60-
6157afterEvaluate {
62- tasks.named(" assembleDebug" ).configure {
63- dependsOn(" copyNativeLibs" )
64- }
65- tasks.named(" assembleRelease" ).configure {
66- dependsOn(" copyNativeLibs" )
58+ tasks.named(" preBuild" ) {
59+ dependsOn(copyNativeLibs)
6760 }
6861}
6962
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ endif ()
2626set (LIB_CLASH_PATH "${CMAKE_SOURCE_DIR} /../jniLibs/${ANDROID_ABI} /libclash.so" )
2727
2828message ("LIB_CLASH_PATH ${LIB_CLASH_PATH} " )
29-
3029if (EXISTS ${LIB_CLASH_PATH} )
3130 message ("Found libclash.so for ABI ${ANDROID_ABI} " )
3231 add_compile_definitions (LIBCLASH)
@@ -38,6 +37,7 @@ if (EXISTS ${LIB_CLASH_PATH})
3837 target_link_libraries (${CMAKE_PROJECT_NAME}
3938 clash)
4039else ()
40+ message ("Not found libclash.so for ABI ${ANDROID_ABI} " )
4141 add_library (${CMAKE_PROJECT_NAME} SHARED
4242 jni_helper.cpp
4343 core.cpp)
You can’t perform that action at this time.
0 commit comments