This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| SCRIPT_PATH=$(dirname "$0") | |
| echo "-- adding plugins --" | |
| grep -v '^ *#' < "$SCRIPT_PATH/.tool-versions" | while IFS= read -r line | |
| do | |
| asdf plugin add "$(echo "$line" | awk '{print $1}')" | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tasks.register("runBuild") { | |
| group = "com.linux" | |
| description = "Trigger Build Execution On Github Actions" | |
| doLast { | |
| val command = """gh workflow run build.yaml --ref master --field version=0.0.1""" | |
| exec { | |
| logger.lifecycle("Running Command $command") | |
| commandLine = command.split(" ") | |
| logger.lifecycle("Command executed.") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import javax.swing.JOptionPane | |
| tasks.register("askConfirmation") { | |
| doLast { | |
| if (confirmation("Do you want to answer me?")) { | |
| logger.lifecycle("😃 You Answered Yes!!!!") | |
| } else { | |
| logger.lifecycle("😒 You Answered No 🤷") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.ByteArrayOutputStream | |
| tasks.register("gitCommit") { | |
| group = "com.linux" | |
| description = "Get The last git commit" | |
| doLast { | |
| val output = ByteArrayOutputStream().let { os -> | |
| exec { | |
| commandLine("/usr/bin/git rev-parse --verify HEAD".split(" ")) | |
| standardOutput = os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| plugins { | |
| id("com.gradle.enterprise") version("3.10.1") // https://plugins.gradle.org/plugin/com.gradle.enterprise | |
| } | |
| gradleEnterprise { | |
| buildScan { | |
| termsOfServiceUrl = "https://gradle.com/terms-of-service" | |
| capture { | |
| isTestLogging = true | |
| isBuildLogging = true |
OlderNewer