Skip to content Skip to sidebar Skip to footer

Gradle - Copy Db Keys With Different Values For Debug Vs Release

--EDIT 2-- Wrong question to ask, it was based on mechanics of earlier solution derived using Ant's capabilities. With gradle providing direct access to flavors of Resource.String

Solution 1:

What You need to do is to create dependency on the tasks using dependsOn and mustRunAfter.

generateReleaseBuildConfig.dependsOn(copyStrings)

dependsOn is used to make a fixed dependency between tasks. When A task depends on B task, B will run before A (if it isn't up-to-date). mustRunAfter works a bit different. I doesn't force a task to be run, but when A must run after B, and both tasks are added to gradle invocation graph it's guaranteed that B will run first.

Post a Comment for "Gradle - Copy Db Keys With Different Values For Debug Vs Release"