Created
November 25, 2010 08:46
-
-
Save kimukou/715097 to your computer and use it in GitHub Desktop.
YouDebug compile gradle file
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
//YouDebug compile gradle file | |
// see project https://github.com/kohsuke/youdebug | |
// save location project home | |
apply plugin: 'groovy' | |
[compileGroovy, compileTestGroovy]*.options.collect {options -> options.encoding = 'UTF-8'} | |
//apply plugin: 'java' | |
//[compileJava, compileTestJava]*.options.collect {options -> options.encoding = 'UTF-8'} | |
allprojects { | |
sourceCompatibility = 1.6 | |
targetCompatibility = 1.6 | |
} | |
version = "1.4-SNAPSHOT" | |
archivesBaseName = "youdebug" | |
def JAVA_HOME = 'c:/opt/jdk' | |
//def JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home | |
//compile.compilerArgs = ['-Xlint:unchecked'] | |
repositories { | |
//flatDir(dirs: file("$rootDir/lib")) | |
flatDir(dirs: file("$JAVA_HOME/lib")) | |
mavenCentral() | |
mavenRepo urls: [ "http://download.java.net/maven/2/", | |
"http://repository.jboss.org/maven2/", | |
"http://repository.jboss.org/nexus/content/groups/public-jboss/"] | |
} | |
dependencies { | |
groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: '1.7.5' | |
//groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: '1.6.5' | |
groovy group: 'com.sun.tools', name: 'tools', version: '' | |
groovy group: 'args4j', name: 'args4j', version: '2.0.16' | |
groovy group: 'com.thoughtworks.qdox', name: 'qdox', version: '1.6.3' | |
testCompile 'junit:junit:3.8.1' | |
//testCompile "org.spockframework:spock-core:0.4-groovy-1.7" | |
//testCompile "cglib:cglib-nodep:2.2" | |
//testCompile "org.objenesis:objenesis:1.2" | |
} | |
// need jointCompilation start ==> | |
println sourceSets.main.groovy.srcDirs | |
println sourceSets.main.java.srcDirs | |
sourceSets { | |
main{ | |
groovy { | |
//srcDirs=['src/main/groovy','src/main/java'] | |
srcDirs+='src/main/java' | |
} | |
java { | |
srcDirs=[] //neeed !! | |
} | |
} | |
} | |
println sourceSets.main.groovy.srcDirs | |
println sourceSets.main.java.srcDirs | |
// need jointCompilation end <== | |
//depency lib include and Manifest-INF | |
jar { | |
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } | |
} | |
manifest.mainAttributes("Main-Class" : "org.kohsuke.youdebug.YouDebug") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
::package.bat
set GROOVY_HOME=C:\opt\groovy-1.7.5
set GRADLE_HOME=D:\Tooldev\gradle-0.9-rc-3
set JAVA_HOME=c:\opt\jdk
set PATH=%GROOVY_HOME%/bin;%GRADLE_HOME%/bin;%JAVA_HOME%/bin
::call gradle test
call gradle clean jar