in my project I want to remove the generated native build tasks but I can’t seem to get anywhere.
To explain what I’m doing, this is my build file, its a subproject of a larger set of projects: https://github.com/jMonkeyEngine/jmonkeyengine/blob/ec183e1eeaa44706ba8c6c78eebb23a7d7c7a139/jme3-bullet-native/build.gradle
It uses the java and cpp plugins and I want to enable only the shared library builds as well as selectively be able to skip single native builds when a property is set in the gradle.properties file.
The way I solved it atm is that I use gradle.startParameter.excludedTaskNames and add the names of the generated platform tasks (e.g. windows_x86BulletjmeStaticLibrary etc.). The problem with that is when I build another subproject it complains that “Task ‘windows_x86BulletjmeStaticLibrary’ not found in project ‘:jme3-android’.”. When I build the main project the result is exactly what I want though.
I already tried to use tasks.remove(taskname) in various combinations (in a task to be run at config time, in the root of the build file etc.) but because the task is being generated by the cpp plugin it cannot be found for removal.
Any ideas on what I could do here? I also generally didn’t find a way to completely disable the build of static libraries with the native compilation, the use of gradle.startParameter.excludedTaskNames seemed to be the only way for that as well but also leads to the aforementioned issues.
Thanks for any help, Normen