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
task t1 | |
task t2 { | |
dependsOn = t1 | |
} |
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
task cloneProtobuf(type:Exec) { | |
workingDir '.' | |
commandLine 'git', 'clone', '[email protected]:google/protobuf.git', 'build/protobuf' | |
outputs.file 'build/protobuf/.git/config' | |
} |
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.withType(CreateStartScripts) { | |
def tplName = 'unixStartScriptTemplate.txt' | |
assert new File(tplName).exists() | |
template = resources.text.fromFile(tplName) | |
} |
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
processResources { | |
def profile = project.properties['profile'] | |
def replace_tokens = profile ? filter_tokens[profile] : filter_tokens['default'] | |
exclude '**/log4j-test.xml' | |
from('src/main/resources') { | |
exclude '**/*.ttf' |
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
println 'a' | |
task t1 { | |
doFirst { | |
println 'b' | |
} | |
} | |
println 'c' |
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
task itMustRun |
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
task itMustRun { | |
doFirst { | |
println "It's running from start..." | |
} | |
doLast { | |
println "...to an end." | |
} | |
} |
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
task unit(type: Test) | |
task functional(type: Test) | |
task check // lifecycle task | |
task report |
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
task unit(type: Test) | |
task functional(type: Test) | |
task check // lifecycle task | |
task report | |
check.dependsOn unit, functional | |
functional.mustRunAfter unit //shouldRunAfter |
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 io.vavr.collection.List; | |
import io.vavr.control.Try; | |
class Lol { | |
public static void main(String[] args) { | |
final List<Node> myNodeList = Try.of(NodeUtils::new) | |
.onFailure(System.out::println) | |
.mapTry(NodeUtils::retrieveNodes) | |
.getOrElse(List.empty()); |