We use Travis CI and deploy dev and QA builds continuously - and recently set up Firebase App Distribution. I'd like to be able to use the git commit message as "release notes" for dev and QA builds, and automate that in gradle where firebaseAppDistribution is. For example:
build.Gradle:
generateGitCommitMessage() {
// get last commit message after > Task :app:assemble and before > Task :app:appDistributionUpload
return commitMessage
}
firebaseAppDistribution {
groups = "Android"
// Automate capturing commit message in a string (or txt file) for dev builds
releaseNotes="${generateGitCommitMessage()}"
}
Is it possible to capture the current commit message entered when a commit is pushed, in Gradle? AppDistribution in Travis happens at the end, right before the apk is uploaded, after > Task :app:assemble, so I'm hoping it is.
I've researched some similar scripts such as https://kapie.com/2016/gradle-generate-release-notes/ and https://medium.com/@lowcarbrob/android-pro-tip-generating-your-apps-changelog-from-git-inside-build-gradle-19a07533eec4 but we don't tag builds, so these didn't really work for my situation, and I'm not very familiar with groovy.
Thanks in advance.