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
// root projects build.gradle file | |
apply plugin: 'idea' | |
idea { | |
project { | |
languageLevel = '1.6' | |
} | |
} |
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
apply plugin:'idea' | |
idea { | |
module { | |
outputDir = file('out') | |
testOutputDir = file('testout') | |
excludeDirs -= file('build') | |
excludeDirs += file('build/classes') | |
excludeDirs += file('build/libs') | |
excludeDirs += file('build/tmp') | |
} |
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
apply plugin:'idea' | |
apply plugin:'groovy' | |
repositories{ | |
jcenter() | |
} | |
configurations{ | |
jaxb | |
} |
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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.1.1.RELEASE' | |
} | |
} | |
apply plugin: 'spring-boot' |
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 org.acme | |
import org.gradle.tooling.BuildLauncher | |
import org.gradle.tooling.GradleConnector | |
import org.gradle.tooling.ProjectConnection | |
import org.junit.Rule | |
import org.junit.rules.TemporaryFolder | |
import spock.lang.Specification | |
/** | |
* Created by Rene on 11/09/14. |
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
import org.gradle.internal.reflect.Instantiator | |
class Host { | |
String name | |
Host(String name){ | |
this.name = name | |
} | |
} |
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
// this needs some more logic to track "build failures". (e.g. via taskListener) | |
task pushWhenSuccess << { | |
// react on build successful | |
} | |
task resetOnFail << { | |
// react on build failed | |
} |
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){ | |
def warnLogFile = file("$buildDir/${name}Warnings.log") | |
logging.addStandardErrorListener(new StandardOutputListener(){ | |
void onOutput(CharSequence output){ | |
warnLogFile << output | |
} | |
}) | |
} |
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
task convertFiles <<{ | |
fileTree("someFolder").matching{ include "**/*.txt"}.each{ aFile -> | |
exec{ | |
commandLine 'dos2unix' | |
args aFile.absolutePath | |
} | |
} | |
} |
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
#!/bin/bash | |
FOUND=0 | |
CURR_PATH="$PWD" | |
REAL_GRADLEW="$CURR_PATH/gradlew" | |
REAL_MASTER_GRADLEW="$CURR_PATH/master/gradlew" | |
# Check current directory, which might be root directory for gradlew | |
if [ -x "$REAL_GRADLEW" ]; then | |
FOUND=1 |