Skip to content

Commit baece03

Browse files
committed
Update ndk version
1 parent b796785 commit baece03

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

android/core/build.gradle.kts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff 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-
6157
afterEvaluate {
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

android/core/src/main/cpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ endif ()
2626
set(LIB_CLASH_PATH "${CMAKE_SOURCE_DIR}/../jniLibs/${ANDROID_ABI}/libclash.so")
2727

2828
message("LIB_CLASH_PATH ${LIB_CLASH_PATH}")
29-
3029
if (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)
4039
else ()
40+
message("Not found libclash.so for ABI ${ANDROID_ABI}")
4141
add_library(${CMAKE_PROJECT_NAME} SHARED
4242
jni_helper.cpp
4343
core.cpp)

0 commit comments

Comments
 (0)