This file contains 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 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 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 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 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 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 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 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(JavaCompile) { | |
doFirst { | |
if (!JavaVersion.current().java8Compatible) { | |
throw new IllegalStateException("Must be built with Java 8 or higher") | |
} | |
} | |
// typical compileJava options | |
options.encoding = 'UTF-8' | |
} |
This file contains 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
sourceCompatibility = JavaVersion.VERSION_1_8 | |
// !! HAVE TO BE SET AFTER project.sourceCompatibility | |
idea { | |
project { | |
// explicit set to sourceCompatibility since default is JVM level that runs gradle | |
jdkName = project.sourceCompatibility | |
outputFile = new File('.idea/modules.xml') | |
} | |
} |
This file contains 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(GenerateIdeaProject) { | |
doLast { | |
copy { | |
from '.' | |
into '.idea/' | |
include '*.ipr' | |
rename { "modules.xml" } | |
} | |
project.delete "${project.name}.ipr" | |
} |