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
| sourceSets { | |
| mock { | |
| java.srcDir 'src/mock/java' | |
| output.classesDir sourceSets.main.output.classesDir | |
| resources.srcDir 'src/mock/resources' | |
| output.resourcesDir sourceSets.main.output.resourcesDir | |
| } | |
| } | |
| compileJava.dependsOn compileMockJava | |
| processResources.dependsOn processMockResources |
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 'application' | |
| id 'com.zoltu.git-versioning' version '2.0.6' | |
| // id 'io.ratpack.ratpack-java' version '1.2.0' | |
| } | |
| repositories { | |
| jcenter() | |
| } |
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
| package de.childno.example.ratpack; | |
| import com.google.inject.AbstractModule; | |
| import com.google.inject.Inject; | |
| import com.google.inject.Provides; | |
| public class ServiceModule extends AbstractModule { | |
| @Override | |
| protected void configure() { } |
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
| ## usage: `rgfa` | |
| rgfa () | |
| { | |
| test -d .git && ( echo "found git repo in $i" && ( git fetch -a > /dev/null ); | |
| echo "done $PWD" ) || ( for i in *; | |
| do | |
| test -d "$i" && ( builtin cd "$i" && rgfa ); | |
| 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
| ## usage: `rgur origin currentRemote.example.com newRemote.example.com` | |
| rgur () | |
| { | |
| test -d .git && ( echo "found git repo in $i" && ( git remote set-url $1 $(git remote get-url $1 |sed -e 's/'$2'/'$3'/') ); | |
| echo "UPDATED $1 : $(git remote get-url $1)" ) || ( for i in *; | |
| do | |
| test -d "$i" && ( builtin cd "$i" && rgur $1 $2 $3); | |
| 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
| package de.childno.test.java.junit; | |
| import com.google.auto.value.AutoValue; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; | |
| import org.junit.runners.Parameterized; | |
| import static org.hamcrest.MatcherAssert.assertThat; | |
| import static org.hamcrest.Matchers.is; |
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
| dependencies { | |
| { | |
| compile group: 'de.childno.test', name: 'mvn-artefact', version:'+', changing: true | |
| } | |
| configurations.all { | |
| resolutionStrategy.cacheChangingModulesFor 0, 'seconds' | |
| } |
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
| <datasources xmlns="http://www.jboss.org/ironjacamar/schema" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd"> | |
| <datasource jndi-name="java:jboss/datasources/myapp-ds" | |
| pool-name="myapp-ds" enabled="true" jta="true" use-java-context="true"> | |
| <connection-url>url>jdbc:hsqldb:file:d:\myapp</connection-url> | |
| <driver>hsqldb</driver> | |
| <pool> | |
| <prefill>false</prefill> | |
| <use-strict-min>false</use-strict-min> |
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
| allprojects { | |
| sourceCompatibility = JavaVersion.VERSION_1_8 | |
| tasks.withType(JavaCompile) { task -> | |
| // nicify "invalid source release: 1.8" message: | |
| task.doFirst { | |
| if (("$System.env.JAVA_HOME".trim().isEmpty() || System.env.JAVA_HOME == null) && ("$System.env.JDK_HOME".trim().isEmpty() || System.env.JDK_HOME == null)) { | |
| println ' WARNING: neither JAVA_HOME nor JDK_HOME set!' | |
| } | |
| if (!JavaVersion.current().equals(project.sourceCompatibility)) { |
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' | |
| // apply the runtimeClasspath from "test" sourceSet to the new one | |
| // to include any needed assets: test, main, test-dependencies and main-dependencies | |
| sourceSets { | |
| integrationTest { | |
| compileClasspath += sourceSets.test.runtimeClasspath | |
| // somehow this redeclaration is needed, but should be irrelevant | |
| // since runtimeClasspath always expands compileClasspath | |
| runtimeClasspath += sourceSets.test.runtimeClasspath |