plugins { `java-library` `maven-publish` pmd checkstyle id("io.freefair.lombok") version "8.4" } repositories { mavenLocal() maven { url = uri("https://nexus.knecon.com/repository/gindev/") credentials { username = providers.gradleProperty("mavenUser").getOrNull(); password = providers.gradleProperty("mavenPassword").getOrNull(); } } maven { url = uri("https://repo.maven.apache.org/maven2/") } } dependencies { testImplementation("junit:junit:4.13.2") } group = "org.ahocorasick" description = "Aho-CoraSick algorithm for efficient string matching" java.sourceCompatibility = JavaVersion.VERSION_17 java.targetCompatibility = JavaVersion.VERSION_17 java { withSourcesJar() withJavadocJar() } publishing { publications.create("maven") { 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() { options.encoding = "UTF-8" } tasks.withType() { options.encoding = "UTF-8" } pmd { isConsoleOutput = true } tasks.pmdMain { pmd.ruleSetFiles = files("${rootDir}/config/pmd/pmd.xml") } tasks.pmdTest { pmd.ruleSetFiles = files("${rootDir}/config/pmd/test_pmd.xml") }