fix: Clean C++ CMake cache (.cxx/) on clean

This commit is contained in:
Marc Rousavy 2023-10-04 11:06:39 +02:00
parent e9b39924d7
commit 4fc8cd2e01

View File

@ -151,17 +151,27 @@ dependencies {
}
}
// Resolves "LOCAL_SRC_FILES points to a missing file, Check that libfb.so exists or that its path is correct".
task cleanCmakeCache() {
tasks.getByName("clean").dependsOn(cleanCmakeCache)
doFirst {
delete "${projectDir}/.cxx"
}
}
tasks.configureEach { task ->
// C++ build
if (task.name.contains("configureCMakeDebug")) {
rootProject.getTasksByName("packageReactNdkDebugLibs", true).forEach {
task.dependsOn(it)
}
}
// We want to add a dependency for both configureCMakeRelease and configureCMakeRelWithDebInfo
if (task.name.contains("configureCMakeRel")) {
rootProject.getTasksByName("packageReactNdkReleaseLibs", true).forEach {
task.dependsOn(it)
}
}
// C++ clean
if (task.name.contains("clean")) {
task.dependsOn(cleanCmakeCache)
}
}