task generateGitProperties {
  if (!grgit) {
    logger.warn("Not building from a git checkout, skipping git.properties generation")
    return
  }
  def outputFile = layout.buildDirectory.file("resources/main/git.properties").get().asFile
  outputs.file(outputFile)
  doLast {
    outputFile.text = "git.commit.id=${grgit.head().id}"
  }
}

tasks.withType(JavaCompile).configureEach {
  dependsOn generateGitProperties
}


dependencies {
  implementation 'org.apache.commons:commons-lang3'
}
