- Made sure Main-Class is specified in odm jar - Fixed source inclusions/exclusions for idea and eclipse plugins - Made sure idea and eclipse plugins depend on javacc task - Removed pom files from build.
64 lines
1.9 KiB
Groovy
64 lines
1.9 KiB
Groovy
apply from: JAVA_SCRIPT
|
|
apply from: MAVEN_DEPLOYMENT_SCRIPT
|
|
|
|
configurations {
|
|
jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo
|
|
}
|
|
|
|
dependencies {
|
|
jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.6.2.201302030002", classifier: "runtime"
|
|
}
|
|
|
|
test {
|
|
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=${project.group}.*"
|
|
}
|
|
|
|
jar {
|
|
manifest.attributes["Created-By"] =
|
|
"${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
|
|
manifest.attributes["Implementation-Title"] = project.name
|
|
manifest.attributes["Implementation-Version"] = project.version
|
|
|
|
from("${rootProject.projectDir}") {
|
|
include "license.txt"
|
|
include "notice.txt"
|
|
into "META-INF"
|
|
expand(copyright: new Date().format("yyyy"), version: project.version)
|
|
}
|
|
}
|
|
|
|
javadoc {
|
|
description = "Generates project-level javadoc for use in -javadoc jar"
|
|
|
|
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
|
options.author = true
|
|
options.header = project.name
|
|
options.links(project.ext.javadocLinks)
|
|
|
|
// suppress warnings due to cross-module @see and @link references;
|
|
// note that global 'api' task does display all warnings.
|
|
logging.captureStandardError LogLevel.INFO
|
|
logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn:classes) {
|
|
description = "Generates the -sources.jar"
|
|
|
|
classifier = "sources"
|
|
from sourceSets.main.allJava.srcDirs
|
|
include "**/*.java", "**/*.aj"
|
|
}
|
|
assemble.dependsOn sourcesJar
|
|
|
|
task javadocJar(type: Jar) {
|
|
description = "Generates the -javadoc.jar"
|
|
|
|
classifier = "javadoc"
|
|
from javadoc
|
|
}
|
|
assemble.dependsOn javadocJar
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
} |