Skip to content
🐚 Gradle plugin with a simpler Exec task
Branch: master
Clone or download
phatblat Merge pull request #50 from phatblat/gradle-4.10.2
 β¬†οΈπŸ˜ Gradle (4.10.2)
Latest commit 18313af Nov 13, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.bundle
.github
.idea
.vscode
example
gradle
src
.gitignore
CHANGELOG.md
Dangerfile
Dangerfile.js
Gemfile
Gemfile.lock
Jenkinsfile
LICENSE.md
README.md
Tubefile
build.gradle.kts
detekt.yml
gradle.properties β¬†οΈπŸ˜ Gradle (4.10.2) Oct 31, 2018
gradlew
package.json
settings.gradle.kts
yarn.lock

README.md

ShellExec

Tube Download

A simpler extension point than Exec for ad-hoc Gradle tasks that run shell commands.

Features

  • Specify entire command line in one string (instead of List<CharSequence>).
  • Append/prepend to the current PATH.
  • Execute a command | pipe or conditional && command || chain.
  • Easy access to stdout and stderr.

⚠️ Not compatible with Exec tasks yet (see #11), but the current API is very similar.

Example build.gradle

buildscript {
    repositories.jcenter()
    dependencies.classpath 'at.phatbl:shellexec:+'
}

import at.phatbl.shellexec.ShellExec

task lolCowFortune(type: ShellExec) {
    command "fortune | cowsay | lolcat"
}

Task Output

> Task :lolCowFortune
 _________________________________________
/ Do not clog intellect's sluices with    \
\ bits of knowledge of questionable uses. /
 -----------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed

License

This repo is licensed under the MIT License. See the LICENSE file for rights and limitations.

You can’t perform that action at this time.