Created
February 17, 2013 09:59
-
-
Save monzou/4970854 to your computer and use it in GitHub Desktop.
Eclipse + Gradle Multi Project (flat layout)
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
apply plugin: 'eclipse' | |
subprojects { | |
apply plugin: 'java' | |
apply plugin: 'eclipse-wtp' | |
jdkVersion = 1.7 | |
sourceCompatibility = jdkVersion | |
targetCompatibility = jdkVersion | |
version = '0.1' | |
vendor = 'usopla.com' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile group: 'com.google.guava', name: 'guava', version: '13.0.1' | |
testCompile 'junit:junit:4.8.2' | |
} | |
jar { | |
manifest.attributes provider: 'gradle' | |
manifest.attributes 'Implementation-Vendor-Id': vendor | |
manifest.attributes 'Implementation-Vendor': vendor | |
manifest.attributes 'Implementation-Version': version | |
} | |
eclipse { | |
classpath { | |
file { | |
whenMerged { classpath -> | |
classpath.configure classpath.entries.grep { entry -> | |
!(entry instanceof org.gradle.plugins.ide.eclipse.model.Library) | |
} | |
} | |
} | |
} | |
} | |
task mkdirs << { | |
["src/main/java", "src/main/resources", "src/test/java", "src/test/resources"].each { | |
def path = "${projectDir}/${it}" | |
ant.mkdir(dir: path) | |
ant.touch(file: "${path}/.gitkeep") | |
} | |
} | |
} | |
task wrapper(type: Wrapper) { | |
gradleVeresion = '1.4' | |
} |
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
apply plugin: 'war' | |
dependencies { | |
providedCompile 'javax.servlet:servlet-api:2.5' | |
compile project(':api') | |
compile project(':service') | |
} | |
war { | |
manifest.attributes = jar.manifest.attributes | |
manifest.attributes 'Implementation-Title': 'web' | |
} |
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
includeFlat "util", "model", "persistence", "service", "api", "web" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment