Last active
May 25, 2017 09:19
-
-
Save marsyang1/5dab2651fe04265895dee1bca5aa7f39 to your computer and use it in GitHub Desktop.
Gradle for Eclipse Project Architecture Setting
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
/** | |
* reference https://stackoverflow.com/questions/18273184/how-to-set-webappdirname-in-gradle | |
* http://samchu.logdown.com/posts/243171-using-gradle-management-project-kit | |
* | |
*/ | |
group 'com.mars' | |
version '1.0-SNAPSHOT' | |
apply plugin: 'war' | |
apply plugin: 'idea' | |
repositories { | |
mavenCentral() | |
flatDir { | |
dirs 'libs' | |
} | |
} | |
sourceCompatibility = 1.7 // setting jdk version | |
sourceSets.main.java.srcDir 'src' // setting source code folder | |
compileJava.options.encoding = 'UTF-8' | |
compileTestJava.options.encoding = 'UTF-8' | |
project.webAppDirName = 'web' | |
sourceSets { | |
main { | |
java { srcDir 'src' } | |
resources { srcDir 'src' } | |
} | |
} | |
war { | |
exclude 'WEB-INF/lib/**' | |
exclude 'WEB-INF/classes/**' | |
} | |
dependencies { | |
providedCompile 'javax.servlet:javax.servlet-api:3.0.1' | |
runtime 'javax.servlet:jstl:1.2' | |
compile fileTree(dir: "web/WEB-INF/lib", include: '*.jar') | |
compile( | |
'org.hibernate:hibernate-annotations:3.5.6-Final', | |
'org.projectlombok:lombok:1.16.10', | |
'joda-time:joda-time:2.9.4', | |
'com.google.guava:guava:19.0', | |
'ch.qos.logback:logback-classic:1.1.7', | |
'org.jasypt:jasypt:1.9.0', | |
'org.apache.commons:commons-lang3:3.4', | |
'commons-httpclient:commons-httpclient:3.1', | |
'com.google.code.gson:gson:2.8.0', | |
// sms api start ... | |
'commons-lang:commons-lang:2.6', | |
'net.sf.ezmorph:ezmorph:1.0.6', | |
'commons-collections:commons-collections:3.2.1', | |
'commons-beanutils:commons-beanutils:1.9.2', | |
) | |
testCompile ( | |
'junit:junit:4.12', | |
'org.mockito:mockito-core:1.+' | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment