This shell script executes the given Gradle tasks on a range of commits.
Imagine you want to verify on a larger branch if each commit compiles.
--C--D--E--F--(feature-branch)
/
A--B--(master)
You would need to manually checkout each commit, eventually update submodules and finally compile. Or you just do the same with one command:
$ ./gradle-each --gradle-tasks "clean assembleDebug" --from-hash master --till-hash feature-branch --reverse-order falseThe parameters explained:
-g|--gradle-tasksThe Gradle tasks you want to execute for each commit-f|--from-hashThe root of your branch. This can be a branch name e.g.masteror a hash e.gB. This parameter is optional - the default value ismaster.-t|--till-hashThe branch name e.g.feature-branchor the hash of the last commit on that branch e.g.F. This parameter is optional - the default value isHEAD.-r|--reverse-orderTo process commits in reverse chronological order passtrue. This parameter is optional - the default value isfalse.
Tobias Preuss
Gradle each is available under the MIT license. See the LICENSE.txt file for more info.