gradle draft
This commit is contained in:
parent
46c9bed663
commit
464ee77c1f
@ -74,29 +74,21 @@ version = "2.0-SNAPSHOT"
|
|||||||
description = "pdftron-logic-commons"
|
description = "pdftron-logic-commons"
|
||||||
java.sourceCompatibility = JavaVersion.VERSION_17
|
java.sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
|
||||||
val testsJar by tasks.registering(Jar::class) {
|
|
||||||
archiveClassifier.set("tests")
|
|
||||||
from(sourceSets["test"].output)
|
|
||||||
}
|
|
||||||
|
|
||||||
java {
|
|
||||||
withSourcesJar()
|
|
||||||
withJavadocJar()
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications.create<MavenPublication>("maven") {
|
publications {
|
||||||
from(components["java"])
|
create<MavenPublication>(name) {
|
||||||
artifact(testsJar)
|
from(components["java"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = uri("https://nexus.knecon.com/repository/red-platform-releases/")
|
||||||
|
credentials {
|
||||||
|
username = providers.gradleProperty("mavenUser").getOrNull();
|
||||||
|
password = providers.gradleProperty("mavenPassword").getOrNull();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType<JavaCompile>() {
|
|
||||||
options.encoding = "UTF-8"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType<Javadoc>() {
|
|
||||||
options.encoding = "UTF-8"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pmd {
|
pmd {
|
||||||
@ -119,11 +111,11 @@ tasks.named<Test>("test") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.test {
|
tasks.test {
|
||||||
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
|
finalizedBy(tasks.jacocoTestReport)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.jacocoTestReport {
|
tasks.jacocoTestReport {
|
||||||
dependsOn(tasks.test) // tests are required to run before generating the report
|
dependsOn(tasks.test)
|
||||||
reports {
|
reports {
|
||||||
xml.required.set(true)
|
xml.required.set(true)
|
||||||
csv.required.set(false)
|
csv.required.set(false)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user