Skip to content

Instantly share code, notes, and snippets.

@VictorKabata
Created February 9, 2023 14:42
Show Gist options
  • Save VictorKabata/17bd490c42039e88df4232f04c874800 to your computer and use it in GitHub Desktop.
Save VictorKabata/17bd490c42039e88df4232f04c874800 to your computer and use it in GitHub Desktop.
// Greet -> build.gradle.kts
tasks.matching { it.name != "loadMamboMotoFile" }.all {
println("Executing task: ${this.name}")
this.dependsOn("loadMamboMotoFile")
}
tasks.register("loadMamboMotoFile") {
println("Executing task: ${this.name}")
val filePath = "${rootDir.toString()}/mambo_moto.json"
val jsonFile = File(filePath)
if (!jsonFile.exists()) throw GradleException("Mambo Moto file not found")
else println("Mambo Moto File Dir: $filePath")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment