mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-17 01:08:56 +00:00
33 lines
730 B
Groovy
33 lines
730 B
Groovy
/*
|
|
* Since we use the Eclipse Style layout where sources and resources
|
|
* live in the same folders, we need to make some adjustments to Gradle'
|
|
* defaults.
|
|
*/
|
|
|
|
def isTestProject = name.endsWith('tests')
|
|
def sourceDirs = ['src', 'xtend-gen', 'src-gen', 'emf-gen']
|
|
|
|
sourceSets {
|
|
configure(isTestProject? test : main) {
|
|
java.srcDirs = sourceDirs
|
|
resources {
|
|
srcDirs = sourceDirs
|
|
exclude '**/*.java', '**/*.xtendbin', '**/*.xtend', '**/*._trace'
|
|
}
|
|
}
|
|
configure(isTestProject? main : test) {
|
|
java.srcDirs = []
|
|
resources.srcDirs = []
|
|
}
|
|
}
|
|
|
|
jar {
|
|
from ('.') {
|
|
include 'about*.*', 'plugin.xml', 'schema/**', 'model/**'
|
|
}
|
|
}
|
|
|
|
if (isTestProject) {
|
|
jar.from(sourceSets.test.output)
|
|
uploadArchives.enabled = false
|
|
}
|