diff --git a/build.gradle b/build.gradle index 8f9bd00..0219e20 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,8 @@ plugins { - id "checkstyle" - id "pmd" id 'maven-publish' id 'signing' + id "build-dashboard" id "io.github.gradle-nexus.publish-plugin" version "2.0.0-rc-1" - //id "com.github.spotbugs" version "6.0.0-beta.3" - id "org.cyclonedx.bom" version "1.7.4" - id "org.xbib.gradle.plugin.asciidoctor" version "3.0.0" } wrapper { @@ -30,13 +26,8 @@ ext { } apply plugin: 'java-library' -//apply from: rootProject.file('gradle/ide/idea.gradle') apply from: rootProject.file('gradle/repositories/maven.gradle') apply from: rootProject.file('gradle/compile/java.gradle') apply from: rootProject.file('gradle/test/junit5.gradle') -apply from: rootProject.file('gradle/quality/checkstyle.gradle') -apply from: rootProject.file('gradle/quality/pmd.gradle') -//apply from: rootProject.file('gradle/quality/spotbugs.gradle') apply from: rootProject.file('gradle/publish/maven.gradle') -apply from: rootProject.file('gradle/publish/forgejo.gradle') -apply from: rootProject.file('gradle/publish/sonatype.gradle') +apply from: rootProject.file('gradle/publish/maven-central/sonatype.gradle') diff --git a/gradle/ide/idea.gradle b/gradle/ide/idea.gradle deleted file mode 100644 index 64e2167..0000000 --- a/gradle/ide/idea.gradle +++ /dev/null @@ -1,13 +0,0 @@ -apply plugin: 'idea' - -idea { - module { - outputDir file('build/classes/java/main') - testOutputDir file('build/classes/java/test') - } -} - -if (project.convention.findPlugin(JavaPluginConvention)) { - //sourceSets.main.output.classesDirs = file("build/classes/java/main") - //sourceSets.test.output.classesDirs = file("build/classes/java/test") -} diff --git a/gradle/publish/ivy.gradle b/gradle/publish/ivy.gradle deleted file mode 100644 index 71aa155..0000000 --- a/gradle/publish/ivy.gradle +++ /dev/null @@ -1,27 +0,0 @@ -apply plugin: 'ivy-publish' - -publishing { - repositories { - ivy { - url = "https://xbib.org/repo" - } - } - publications { - ivy(IvyPublication) { - from components.java - descriptor { - license { - name = 'The Apache License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - } - author { - name = 'Jörg Prante' - url = 'https://xbib.org/joerg' - } - descriptor.description { - text = rootProject.ext.description - } - } - } - } -} \ No newline at end of file diff --git a/gradle/publish/sonatype.gradle b/gradle/publish/maven-central/sonatype.gradle similarity index 69% rename from gradle/publish/sonatype.gradle rename to gradle/publish/maven-central/sonatype.gradle index 5d739de..3bdf85a 100644 --- a/gradle/publish/sonatype.gradle +++ b/gradle/publish/maven-central/sonatype.gradle @@ -1,3 +1,11 @@ + +if (project.hasProperty("signing.keyId")) { + apply plugin: 'signing' + signing { + sign publishing.publications."${project.name}" + } +} + if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) { nexusPublishing { repositories { diff --git a/gradle/publish/maven.gradle b/gradle/publish/maven.gradle index 867e23a..ee78a14 100644 --- a/gradle/publish/maven.gradle +++ b/gradle/publish/maven.gradle @@ -16,7 +16,7 @@ publishing { } developers { developer { - id = 'joerg' + id = 'jprante' name = 'Jörg Prante' email = 'joergprante@gmail.com' url = 'https://xbib.org/joerg' @@ -42,10 +42,3 @@ publishing { } } } - -if (project.hasProperty("signing.keyId")) { - apply plugin: 'signing' - signing { - sign publishing.publications."${project.name}" - } -} diff --git a/gradle/publish/forgejo.gradle b/gradle/publish/xbib/forgejo.gradle similarity index 86% rename from gradle/publish/forgejo.gradle rename to gradle/publish/xbib/forgejo.gradle index 18d18c2..b99b2fb 100644 --- a/gradle/publish/forgejo.gradle +++ b/gradle/publish/xbib/forgejo.gradle @@ -2,7 +2,7 @@ if (project.hasProperty('forgeJoToken')) { publishing { repositories { maven { - url 'https://xbib.org/api/packages/xbib/maven' + url 'https://xbib.org/api/packages/joerg/maven' credentials(HttpHeaderCredentials) { name = "Authorization" value = "token ${project.property('forgeJoToken')}" diff --git a/gradle/test/junit5.gradle b/gradle/test/junit5.gradle index 9e790b4..ae6037d 100644 --- a/gradle/test/junit5.gradle +++ b/gradle/test/junit5.gradle @@ -9,17 +9,25 @@ dependencies { test { useJUnitPlatform() failFast = false + ignoreFailures = true jvmArgs '--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED', '--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED', '--add-exports=java.base/sun.nio.ch=ALL-UNNAMED', + '--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED', + '--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED', + '--add-opens=jdk.compiler/com.sun.tools.javac=ALL-UNNAMED', '--add-opens=java.base/java.lang=ALL-UNNAMED', '--add-opens=java.base/java.lang.reflect=ALL-UNNAMED', '--add-opens=java.base/java.io=ALL-UNNAMED', '--add-opens=java.base/java.nio=ALL-UNNAMED', '--add-opens=java.base/java.util=ALL-UNNAMED' - systemProperty 'java.util.logging.config.file', 'src/test/resources/logging.properties' testLogging { events 'STARTED', 'PASSED', 'FAILED', 'SKIPPED' + showStandardStreams = false + } + reports { + html.required = false + junitXml.outputLocation.set(layout.buildDirectory.dir("test-junit-xml")) } afterSuite { desc, result -> if (!desc.parent) {