Created
August 17, 2014 21:11
-
-
Save hhariri/8e15e6abc4ab1f095835 to your computer and use it in GitHub Desktop.
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
buildscript { | |
ext.kotlin_version = '0.1-SNAPSHOT' | |
repositories { | |
mavenCentral() | |
maven { | |
url "https://oss.sonatype.org/content/repositories/snapshots" | |
} | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
} | |
} | |
apply plugin: 'kotlin' | |
apply plugin: 'application' | |
mainClassName = 'Main' | |
repositories { | |
mavenCentral() | |
maven { | |
url "http://repository.jetbrains.com/all" | |
} | |
maven { | |
url 'http://oss.sonatype.org/content/repositories/snapshots' | |
} | |
} | |
dependencies { | |
compile "org.wasabi:wasabi:0.1-SNAPSHOT", | |
"org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | |
testCompile "junit:junit:4.9" | |
} | |
test { | |
// set heap size for the test JVM(s) | |
minHeapSize = "128m" | |
maxHeapSize = "512m" | |
// set JVM arguments for the test JVM(s) | |
jvmArgs '-XX:MaxPermSize=256m' | |
} | |
sourceSets { | |
main { | |
kotlin { | |
srcDir "src/main/kotlin" | |
} | |
} | |
test { | |
kotlin { | |
srcDir "test/main/kotlin" | |
} | |
} | |
} | |
task wrapper(type: Wrapper) { | |
gradleVersion = '1.11' | |
doLast() { | |
def gradleOpts = "-XX:MaxPermSize=300m -Xmx1024m" | |
def gradlew_sh = file("gradlew") | |
def gradlew_bat = file("gradlew.bat") | |
gradlew_sh.text = gradlew_sh.text.replace("DEFAULT_JVM_OPTS=", | |
"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=") | |
gradlew_bat.text = gradlew_bat.text.replace("set DEFAULT_JVM_OPTS=", | |
"set GRADLE_OPTS=$gradleOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment