plugins { `java-library` `maven-publish` pmd checkstyle jacoco } val redactionServiceVersion by rootProject.extra { "4.244.38" } val pdftronRedactionServiceVersion by rootProject.extra { "4.48.0" } val redactionReportServiceVersion by rootProject.extra { "4.47.0" } val searchServiceVersion by rootProject.extra { "2.71.0" } repositories { mavenLocal() mavenCentral() maven { url = uri("https://nexus.knecon.com/repository/gindev/"); credentials { username = providers.gradleProperty("mavenUser").getOrNull(); password = providers.gradleProperty("mavenPassword").getOrNull(); } } } group = "com.iqser.red.service" java.sourceCompatibility = JavaVersion.VERSION_17 java.targetCompatibility = JavaVersion.VERSION_17 pmd { isConsoleOutput = true } tasks.pmdMain { pmd.ruleSetFiles = files("${rootDir}/config/pmd/pmd.xml") } tasks.pmdTest { pmd.ruleSetFiles = files("${rootDir}/config/pmd/test_pmd.xml") } tasks.named("test") { useJUnitPlatform() reports { junitXml.outputLocation.set(layout.buildDirectory.dir("reports/junit")) } } tasks.test { finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run } tasks.jacocoTestReport { dependsOn(tasks.test) // tests are required to run before generating the report reports { xml.required.set(true) csv.required.set(false) html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml")) } } java { withJavadocJar() } allprojects { publishing { publications { create(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(); } } } } }