I am using gradle 2.13.
I am trying to figure how the native dependencies are supposed to work. I have 4 project tasks that have dependencies like this .
- task1 generates cpp source for the lib
- task 2 compiles the sources from task 1 using gradle model/components provided by the cpp plugin
- task 3 generates more sources
- task 4 compiles the sources from task 3 using gradle model/components provided by the cpp plugin
I need to make sure the compilation happens in this order exactly : 1,2,3,4
I can’t make task 2 config phase to wait until task 3 is executed to start the config phase
I can’t make task 3 execution phase to wait until task 2 is executed
I can’t make the task 4 config phase to wait until task 3 is generated
The issue is corroborated by the fact that native compile and link tasks do not exist at during the configuration phase (until vary late). It will be nice if all the compile tasks depended on a single nativeAssemble task that exist from the beginning so i can hook nativeAssemble task to dependent on something that is build somewhere else
The hack way i found was to make a task that generates all the sources at once and do everything in 2 steps like :
$> grale genSources
$> gradle build
I am wondering if there is a way to make this hack disapear so that i only execute “gradle build” once and the dependencies are figured automatically.