Is it possible to run some tasks from main build.gradle before
buildSrc is executed?

The scenario is the following:


Right now we clean gradle cache before each build with the following
task (in main build.gradle):

task removeGradleCache (description: "removes gradle cache") << {
   println "deleting gradle cache dir:  ${cacheDir}"
     ant.delete(includeEmptyDirs:"true", verbose: "true", failonerror:
"false") {
        fileset(dir: cacheDir)
     }
}

We have a "clean" task that depends on remvoeGradleCache and it works fine.

The problem is with custom tasks. In such case buildSrc is executed
first and fetches some JARs to cache. So we need to the cleaning cache
logic to build.gradle in buildSrc. I would prefer to have this logic
still in the main build.gradle. Is it possible?

BTW. And why we clean the cache? Well, we have numerous issues related
to Gradle NOT fetching the latest artifacts from local maven
repository and using older versions from its cache. So now we wipe it
clean before every build.

-- 
Regards / Pozdrawiam
Tomek Kaczanowski

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to