gradle draft
This commit is contained in:
parent
46c9bed663
commit
464ee77c1f
@ -74,29 +74,21 @@ version = "2.0-SNAPSHOT"
|
||||
description = "pdftron-logic-commons"
|
||||
java.sourceCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
val testsJar by tasks.registering(Jar::class) {
|
||||
archiveClassifier.set("tests")
|
||||
from(sourceSets["test"].output)
|
||||
}
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
artifact(testsJar)
|
||||
publications {
|
||||
create<MavenPublication>(name) {
|
||||
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 {
|
||||
@ -119,11 +111,11 @@ tasks.named<Test>("test") {
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
|
||||
finalizedBy(tasks.jacocoTestReport)
|
||||
}
|
||||
|
||||
tasks.jacocoTestReport {
|
||||
dependsOn(tasks.test) // tests are required to run before generating the report
|
||||
dependsOn(tasks.test)
|
||||
reports {
|
||||
xml.required.set(true)
|
||||
csv.required.set(false)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user