Created
March 21, 2015 17:22
-
-
Save tralston/a76a720985a62af388f7 to your computer and use it in GitHub Desktop.
Add color to Gradle script
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 org.gradle.logging.StyledTextOutput; | |
import org.gradle.logging.StyledTextOutputFactory; | |
import static org.gradle.logging.StyledTextOutput.Style; | |
StyledTextOutput o = services.get(StyledTextOutputFactory).create("test string") | |
task taskname << { | |
o.withStyle(Style.Description).append("Hello world!") | |
// Style.?? Can be normal, header, userinput, identifier, description, progressstatus, failure, info, or error | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment