From 300a8afaa390f530fe33f287a03ce52d9c3699f6 Mon Sep 17 00:00:00 2001 From: Emre Kultursay Date: Wed, 4 Feb 2026 16:11:20 -0800 Subject: [PATCH] Fix parallel Gradle build problems in teapots When building the entire project with Gradle, if Gradle-level inter-project parallelism is enabled (either via the property org.gradle.parallel=true, or via Android Studio injected flags), then the build was failing, because these sub-projects under the teapots project all try to write their ndkHelper library outputs to the same path, causing a race condition. --- teapots/choreographer-30fps/src/main/cpp/CMakeLists.txt | 2 +- teapots/classic-teapot/src/main/cpp/CMakeLists.txt | 2 +- teapots/image-decoder/src/main/cpp/CMakeLists.txt | 2 +- teapots/more-teapots/src/main/cpp/CMakeLists.txt | 2 +- teapots/textured-teapot/src/main/cpp/CMakeLists.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/teapots/choreographer-30fps/src/main/cpp/CMakeLists.txt b/teapots/choreographer-30fps/src/main/cpp/CMakeLists.txt index 6b5862431..585f796d5 100644 --- a/teapots/choreographer-30fps/src/main/cpp/CMakeLists.txt +++ b/teapots/choreographer-30fps/src/main/cpp/CMakeLists.txt @@ -24,7 +24,7 @@ find_package(base CONFIG REQUIRED) get_filename_component(commonDir ${CMAKE_CURRENT_SOURCE_DIR}/../../../../common ABSOLUTE) get_filename_component(ndkHelperSrc ${commonDir}/ndk_helper ABSOLUTE) add_subdirectory(${ndkHelperSrc} - ${commonDir}/ndkHelperBin/${CMAKE_BUILD_TYPE}/${ANDROID_ABI}) + ndkHelperBin/${CMAKE_BUILD_TYPE}/${ANDROID_ABI}) # now build app's shared lib add_app_library(${PROJECT_NAME} diff --git a/teapots/classic-teapot/src/main/cpp/CMakeLists.txt b/teapots/classic-teapot/src/main/cpp/CMakeLists.txt index cfa77e21e..da521b243 100644 --- a/teapots/classic-teapot/src/main/cpp/CMakeLists.txt +++ b/teapots/classic-teapot/src/main/cpp/CMakeLists.txt @@ -23,7 +23,7 @@ include(AppLibrary) get_filename_component(commonDir ${CMAKE_CURRENT_SOURCE_DIR}/../../../../common ABSOLUTE) get_filename_component(ndkHelperSrc ${commonDir}/ndk_helper ABSOLUTE) add_subdirectory(${ndkHelperSrc} - ${commonDir}/ndkHelperBin/${CMAKE_BUILD_TYPE}/${ANDROID_ABI}) + ndkHelperBin/${CMAKE_BUILD_TYPE}/${ANDROID_ABI}) # now build app's shared lib add_app_library(${PROJECT_NAME} diff --git a/teapots/image-decoder/src/main/cpp/CMakeLists.txt b/teapots/image-decoder/src/main/cpp/CMakeLists.txt index d573cd017..23b797e47 100644 --- a/teapots/image-decoder/src/main/cpp/CMakeLists.txt +++ b/teapots/image-decoder/src/main/cpp/CMakeLists.txt @@ -24,7 +24,7 @@ get_filename_component(commonDir ${CMAKE_CURRENT_SOURCE_DIR}/../../../../common # build the ndk-helper library get_filename_component(ndkHelperSrc ${commonDir}/ndk_helper ABSOLUTE) add_subdirectory(${ndkHelperSrc} - ${commonDir}/ndkHelperBin/${CMAKE_BUILD_TYPE}/${ANDROID_ABI}) + ndkHelperBin/${CMAKE_BUILD_TYPE}/${ANDROID_ABI}) # now build app's shared lib add_app_library(${PROJECT_NAME} diff --git a/teapots/more-teapots/src/main/cpp/CMakeLists.txt b/teapots/more-teapots/src/main/cpp/CMakeLists.txt index a6f386446..cd0ad6e61 100644 --- a/teapots/more-teapots/src/main/cpp/CMakeLists.txt +++ b/teapots/more-teapots/src/main/cpp/CMakeLists.txt @@ -23,7 +23,7 @@ include(AppLibrary) get_filename_component(commonDir ${CMAKE_CURRENT_SOURCE_DIR}/../../../../common ABSOLUTE) get_filename_component(ndkHelperSrc ${commonDir}/ndk_helper ABSOLUTE) add_subdirectory(${ndkHelperSrc} - ${commonDir}/ndkHelperBin/${CMAKE_BUILD_TYPE}/${ANDROID_ABI}) + ndkHelperBin/${CMAKE_BUILD_TYPE}/${ANDROID_ABI}) # now build app's shared lib diff --git a/teapots/textured-teapot/src/main/cpp/CMakeLists.txt b/teapots/textured-teapot/src/main/cpp/CMakeLists.txt index 7966c3453..2aa3f57e0 100644 --- a/teapots/textured-teapot/src/main/cpp/CMakeLists.txt +++ b/teapots/textured-teapot/src/main/cpp/CMakeLists.txt @@ -31,7 +31,7 @@ endif() # build the ndk-helper library get_filename_component(ndkHelperSrc ${commonDir}/ndk_helper ABSOLUTE) add_subdirectory(${ndkHelperSrc} - ${commonDir}/ndkHelperBin/${CMAKE_BUILD_TYPE}/${ANDROID_ABI}) + ndkHelperBin/${CMAKE_BUILD_TYPE}/${ANDROID_ABI}) # now build app's shared lib add_app_library(${PROJECT_NAME}