Build order problem upgrading build tools from 7.0.4 -> 7.2.2


I鈥檓 trying to update the Gradle build chain in the mobile app framework Titanium. It is a big project and I don鈥檛 know all the workflow details but hopefully I can explain it :slight_smile:

The current version is declared in this file: titanium_mobile/build.gradle at master 路 tidev/titanium_mobile 路 GitHub and it builds fine.

To build it: clone the repo, npm i && npm run cleanbuild android.

If change raise the version to 7.2.2 I鈥檒l end up with this error:

> Task :titanium:configureCMakeRelWithDebInfo[arm64-v8a] FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':titanium:configureCMakeRelWithDebInfo[arm64-v8a]'.
> [CXX1409] titanium_mobile/android/titanium/.cxx/RelWithDebInfo/1wm6n2l3/arm64-v8a/android_gradle_build.json release|arm64-v8a : expected buildFiles file 'titanium_mobile/android/runtime/v8/generated/CMakeLists.txt' to exist

My guess is that there is a problem with the order of gradle tasks. I鈥檓 not sure how to debug it but it looks like this part:

is not created to have the CMakeList file ready.

Hope this makes sense and someone can help me to fix the issue.


I have no idea about Android as I鈥檓 not doing Android development, you might have more luck asking in some Android community.

But regarding the snippet you showed, I think that is majorly wrong any way.
You configure each and every JavaCompile task to finally do as additional action that node call and depend on those two other tasks.
It is very unlikely that this is what you really want or should do.
You should probably instead create a separate task doing that node call and maybe configure the respective tasks to be finalized by that task. But hard to say without knowing what that action does. If it actually modifies the output files of the JavaCompile tasks having it as doLast action might be correct, but even then you should probabyl have different invocations per compile task.