mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
59 lines
1.7 KiB
Groovy
59 lines
1.7 KiB
Groovy
/*
|
|
* Configuration of Java compiler, Javadoc, additional archives, and additional dependency configurations.
|
|
*/
|
|
|
|
sourceCompatibility = '1.8'
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = 'ISO-8859-1'
|
|
options.compilerArgs << '-parameters'
|
|
}
|
|
|
|
tasks.withType(Javadoc) {
|
|
options.encoding = 'ISO-8859-1'
|
|
options.tags = [ 'noreference', 'noextend', 'noimplement', 'noinstantiate', 'nooverride', 'model', 'generated', 'ordered' ]
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
group 'Build'
|
|
description 'Assembles a jar archive containing the sources.'
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
from ('.') {
|
|
include 'schema/**', 'model/**'
|
|
}
|
|
}
|
|
artifacts.archives sourcesJar
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
group 'Build'
|
|
description 'Assembles a jar archive containing the JavaDoc output.'
|
|
classifier = 'javadoc'
|
|
from javadoc.destinationDir
|
|
}
|
|
|
|
configurations {
|
|
optional {
|
|
description 'Dependencies required at build time, but not exported into meta data'
|
|
extendsFrom compile
|
|
}
|
|
|
|
// Put any unwanted transitive dependencies here, they will be excluded from all projects.
|
|
all {
|
|
exclude group: 'org.apache.felix', module: 'org.osgi.foundation'
|
|
exclude group: 'org.antlr', module: 'stringtemplate'
|
|
exclude module: 'cglib'
|
|
}
|
|
}
|
|
|
|
sourceSets.main.compileClasspath += configurations.optional
|
|
sourceSets.test.compileClasspath += configurations.optional
|
|
sourceSets.test.runtimeClasspath += configurations.optional
|
|
javadoc.classpath += configurations.optional
|
|
|
|
if (findProperty('ignoreTestFailures') == 'true') {
|
|
tasks.withType(Test) {
|
|
ignoreFailures = true
|
|
}
|
|
}
|