mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-24 10:12:44 +00:00
* fix(android): align Unistyles NDK version * fix(android): use the project NDK for every native module The diff module still selected the Android Gradle default NDK, causing a second installation after Unistyles was aligned. Inherit the project toolchain and check all configured native projects. --------- Co-authored-by: dwyanewang <908280968@qq.com> Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
23 lines
1.1 KiB
Groovy
23 lines
1.1 KiB
Groovy
// After Expo prebuild, run from packages/app/android:
|
|
// ./gradlew --init-script ../scripts/verify-android-ndk.gradle verifyAndroidNdk
|
|
gradle.projectsEvaluated {
|
|
rootProject.tasks.register('verifyAndroidNdk') {
|
|
doLast {
|
|
def expected = rootProject.ext.ndkVersion
|
|
def nativeProjects = rootProject.subprojects.findAll { subproject ->
|
|
def android = subproject.extensions.findByName('android')
|
|
android != null && (android.externalNativeBuild.cmake.path != null ||
|
|
android.externalNativeBuild.ndkBuild.path != null)
|
|
}
|
|
assert !nativeProjects.empty : 'No native Android modules found'
|
|
println "Project NDK: ${expected}"
|
|
def mismatches = nativeProjects.findAll { subproject ->
|
|
def actual = subproject.android.ndkVersion
|
|
println "${subproject.path} NDK: ${actual}"
|
|
actual != expected
|
|
}
|
|
assert mismatches.empty : "Native Android modules must use project NDK ${expected}: ${mismatches*.path}"
|
|
}
|
|
}
|
|
}
|