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
apply plugin: 'java' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
testCompile 'org.jboss.arquillian.spock:arquillian-spock-container:1.0.0.Beta3' | |
} |
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
def lol(Map m, String s) { | |
println("s=$s") | |
println("m=$m") | |
} | |
lol("a", type:3) |
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 << { | |
println 't1' | |
} | |
task t2 << { | |
t1.execute() | |
} |
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
def lol(String s, Closure c) { | |
print "s=$s" | |
c() | |
} | |
lol("a") { println "c" } | |
lol("a", { println "c" }) | |
lol("a") |
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
//misc.gradle | |
ext.someMethod = { projects -> | |
projects.each { p -> | |
println "$p.name" | |
} | |
} | |
//A build.gradle | |
apply from: 'misc.gradle' |
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
new File('.').listFiles({f,s -> true} as FilenameFilter).each {println it} |
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
// configuration (groovy) | |
import de.flapdoodle.embed.process.runtime.Network | |
import org.postgresql.ds.PGPoolingDataSource | |
import org.springframework.context.annotation.Bean | |
import org.springframework.context.annotation.Configuration | |
import org.springframework.context.annotation.DependsOn | |
import org.springframework.context.annotation.Profile | |
import ru.yandex.qatools.embed.postgresql.PostgresExecutable | |
import ru.yandex.qatools.embed.postgresql.PostgresProcess |
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
DROP TABLE IF EXISTS CAT CASCADE; | |
CREATE TABLE CAT ( | |
ID BIGINT, | |
NAME CHARACTER VARYING(255) NOT NULL UNIQUE | |
); | |
ALTER TABLE CAT | |
ADD CONSTRAINT CAT_PK PRIMARY KEY (ID); |
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 whatever(type: Exec) { | |
commandLine 'find', '.', '-iname', '*build*' | |
standardOutput = new ByteArrayOutputStream() | |
errorOutput = new ByteArrayOutputStream() | |
doLast { | |
println "std ${standardOutput.toString()}" | |
println "err ${errorOutput.toString()}" | |
} | |
} |
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
apply plugin: 'java' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile "org.springframework:spring-core:3.2.9.RELEASE" | |
compile "org.springframework:spring-beans:3.2.9.RELEASE" | |
compile "org.springframework:spring-context:3.2.9.RELEASE" |
OlderNewer