Basically, I have 4 tasks that I need to run sequentially, but I can not get them to do this, I have to start them one by one on the command line like this:
gradle :drmdexsecondary:compileReleaseJava --info --debug --stacktrace
gradle :drmdexsecondary:dexClasses --info --debug --stacktrace
gradle :drmdexsecondary:jar --info --debug --stacktrace
Here is my build.gradle:
evaluationDependsOnChildren ();
task dexClasses( type:Exec ) {
// compileJava.execute()
String cmdExt = Os.isFamily(Os.FAMILY_WINDOWS) ? '.bat' : ''
println("${buildDir}")
println("${androidSdkDir}\\build-tools\\${buildToolsVersion}\\dx${cmdExt} --dex --output=${buildDir}\\classes\\classes.dex ${buildDir}\\classes\\release")
commandLine "cmd", "/c", "${androidSdkDir}\\build-tools\\${buildToolsVersion}\\dx${cmdExt} --dex --output=${buildDir}\\classes\\classes.dex ${buildDir}\\classes\\release"
}
task jar(type: Jar) {
from ("${buildDir}\\classes\\classes.dex")
}
My problem is basically: 1. the dependsOn keyword does not work ... it is simply ignored without a log message 2. the taskname.execute()function does not work ... it is simply ignored without a log message 3. is compileReleaseJavanot recognized inside build.gradle with this specific error:Could not find property 'compileJava' on task ':drmdexsecondary:dexClasses'.
-? , . gradle... , , , gradle, , - , , , ... !