do not longer use transient module dependencies, update build/test dependencies

This commit is contained in:
Jörg Prante 2025-03-31 11:32:13 +02:00
parent d58d63a511
commit 57106370d8
11 changed files with 48 additions and 41 deletions
build.gradlegradle.properties
gradle/compile
logging-adapter-log4j/src
logging-adapter-slf4j/src/main/java
logging-ext/src
logging/src
settings.gradle

View file

@ -1,11 +1,11 @@
plugins {
id 'pmd'
id 'maven-publish'
id 'signing'
id "io.github.gradle-nexus.publish-plugin" version "2.0.0-rc-1"
id "com.jfrog.artifactory" version "5.2.3"
id "org.cyclonedx.bom" version "1.8.2"
id 'com.fizzpod.osv-scanner' version '3.0.9'
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
id "org.cyclonedx.bom" version "2.2.0"
id 'com.fizzpod.osv-scanner' version '4.2.3'
}
wrapper {
@ -14,15 +14,15 @@ wrapper {
}
ext {
name = rootProject.name
user = 'joerg'
name = 'logging'
description = 'Logging for Java 21+, a reimplementation of JBoss LogManager'
inceptionYear = '2024'
user = 'joerg'
url = 'https://xbib.org/' + user + '/' + name
scmUrl = url
scmConnection = 'scm:git:' + url + '.git'
scmUrl = 'https://xbib.org/' + user + '/' + name
scmConnection = 'scm:git:git://xbib.org/' + user + '/' + name + '.git'
scmDeveloperConnection = 'scm:git:ssh://forgejo@xbib.org:' + user + '/' + name + '.git'
issueManagementSystem = 'Forgejo'
issueManagementSystem = 'Github'
issueManagementUrl = ext.scmUrl + '/issues'
licenseName = 'The Apache License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
@ -30,14 +30,11 @@ ext {
subprojects {
apply from: rootProject.file('gradle/compile/java.gradle')
apply from: rootProject.file('gradle/repositories/artifactory.gradle')
apply from: rootProject.file('gradle/repositories/forgejo.gradle')
apply from: rootProject.file('gradle/test/junit5.gradle')
apply from: rootProject.file('gradle/quality/pmd.gradle')
apply from: rootProject.file('gradle/publish/maven.gradle')
apply from: rootProject.file('gradle/repositories/forgejo.gradle')
}
apply from: rootProject.file('gradle/quality/cyclonedx.gradle')
apply from: rootProject.file('gradle/quality/osv-scanner.gradle')
apply from: rootProject.file('gradle/publish/xbib/forgejo.gradle')
apply from: rootProject.file('gradle/publish/hbz/artifactory.gradle')
apply from: rootProject.file('gradle/publish/maven-central/sonatype.gradle')

View file

@ -1,3 +1,3 @@
group = org.xbib
name = logging
version = 0.0.1
version = 0.0.2

View file

@ -22,7 +22,8 @@ tasks.withType(JavaCompile).configureEach {
options.forkOptions.jvmArgs += ['-Duser.language=en', '-Duser.country=US']
options.encoding = 'UTF-8'
// -classfile because of log4j2 issues "warning: Cannot find annotation method"
options.compilerArgs.add('-Xlint:all,-classfile')
// -exports because we do not use transient module dependencies
options.compilerArgs.add('-Xlint:all,-classfile,-exports')
options.compilerArgs.add("--module-version")
options.compilerArgs.add(project.version as String)
options.compilerArgs.add("--module-path")

View file

@ -2,8 +2,9 @@ import org.apache.logging.log4j.spi.Provider;
import org.xbib.logging.log4j.XbibProvider;
module org.xbib.logging.adapter.log4j {
requires transitive org.apache.logging.log4j;
requires transitive org.xbib.logging;
exports org.xbib.logging.log4j;
provides Provider with XbibProvider;
requires org.apache.logging.log4j;
requires org.xbib.logging;
requires java.logging;
}

View file

@ -1,8 +1,10 @@
module org.xbib.logging.log4j.test {
requires transitive org.xbib.logging.ext;
requires org.apache.logging.log4j;
requires org.junit.jupiter.api;
requires org.xbib.logging.adapter.log4j;
exports org.xbib.logging.log4j.test to org.junit.platform.commons;
opens org.xbib.logging.log4j.test to org.junit.platform.commons;
requires org.xbib.logging.ext;
requires org.xbib.logging.adapter.log4j;
requires org.apache.logging.log4j;
requires org.junit.jupiter.api;
requires org.xbib.logging;
requires java.logging;
}

View file

@ -2,8 +2,9 @@ import org.slf4j.impl.XbibSlf4jServiceProvider;
import org.slf4j.spi.SLF4JServiceProvider;
module org.xbib.logging.adapter.slf4j {
requires transitive org.slf4j;
requires transitive org.xbib.logging;
exports org.slf4j.impl;
provides SLF4JServiceProvider with XbibSlf4jServiceProvider;
requires org.slf4j;
requires org.xbib.logging;
requires java.logging;
}

View file

@ -1,10 +1,11 @@
module org.xbib.logging.ext {
requires transitive org.xbib.logging;
requires transitive java.xml;
exports org.xbib.logging.ext;
exports org.xbib.logging.ext.formatters;
exports org.xbib.logging.ext.handlers;
exports org.xbib.logging.ext.io;
exports org.xbib.logging.ext.net;
exports org.xbib.logging.ext.util;
requires org.xbib.logging;
requires java.logging;
requires java.xml;
}

View file

@ -1,10 +1,13 @@
module org.xbib.logging.ext.test {
requires transitive org.junit.jupiter.api;
requires transitive org.xbib.logging.ext;
exports org.xbib.logging.ext.test;
exports org.xbib.logging.ext.test.formatters;
exports org.xbib.logging.ext.test.handlers;
opens org.xbib.logging.ext.test to org.junit.platform.commons;
opens org.xbib.logging.ext.test.formatters to org.junit.platform.commons;
opens org.xbib.logging.ext.test.handlers to org.junit.platform.commons;
requires org.xbib.logging;
requires org.xbib.logging.ext;
requires org.junit.jupiter.api;
requires java.logging;
requires java.xml;
}

View file

@ -4,13 +4,6 @@ import org.xbib.logging.LoggerFinder;
import org.xbib.logging.configuration.DefaultLogContextConfiguratorFactory;
module org.xbib.logging {
uses org.xbib.logging.LogContextInitializer;
uses org.xbib.logging.LogContextConfiguratorFactory;
uses org.xbib.logging.LogContextConfigurator;
uses org.xbib.logging.NDCProvider;
uses org.xbib.logging.MDCProvider;
requires transitive java.logging;
requires java.management;
exports org.xbib.logging;
exports org.xbib.logging.configuration;
exports org.xbib.logging.filters;
@ -21,4 +14,11 @@ module org.xbib.logging {
provides java.lang.System.LoggerFinder with LoggerFinder;
provides java.util.logging.LogManager with LogManager;
provides LogContextConfiguratorFactory with DefaultLogContextConfiguratorFactory;
uses org.xbib.logging.LogContextInitializer;
uses org.xbib.logging.LogContextConfiguratorFactory;
uses org.xbib.logging.LogContextConfigurator;
uses org.xbib.logging.NDCProvider;
uses org.xbib.logging.MDCProvider;
requires java.logging;
requires java.management;
}

View file

@ -1,10 +1,11 @@
module org.xbib.logging.test {
requires transitive org.junit.jupiter.api;
requires transitive org.xbib.logging;
exports org.xbib.logging.test;
exports org.xbib.logging.test.configuration;
exports org.xbib.logging.test.handlers;
opens org.xbib.logging.test to org.junit.platform.commons;
opens org.xbib.logging.test.configuration to org.junit.platform.commons;
opens org.xbib.logging.test.handlers to org.junit.platform.commons;
requires org.junit.jupiter.api;
requires org.xbib.logging;
requires java.logging;
}

View file

@ -16,8 +16,8 @@ dependencyResolutionManagement {
versionCatalogs {
libs {
version('gradle', '8.7')
version('log4j', '2.23.1')
version('slf4j', '2.0.13')
version('log4j', '2.24.2')
version('slf4j', '2.0.17')
library('log4j-core', 'org.apache.logging.log4j', 'log4j-core').versionRef('log4j')
library('log4j-jul', 'org.apache.logging.log4j', 'log4j-jul').versionRef('log4j')
library('log4j-jcl', 'org.apache.logging.log4j', 'log4j-jcl').versionRef('log4j')
@ -29,13 +29,13 @@ dependencyResolutionManagement {
library('slf4j-simple', 'org.slf4j', 'slf4j-simple').versionRef('slf4j')
}
testLibs {
version('junit', '5.10.2')
version('junit', '5.12.0')
library('junit-jupiter-api', 'org.junit.jupiter', 'junit-jupiter-api').versionRef('junit')
library('junit-jupiter-params', 'org.junit.jupiter', 'junit-jupiter-params').versionRef('junit')
library('junit-jupiter-engine', 'org.junit.jupiter', 'junit-jupiter-engine').versionRef('junit')
library('junit-vintage-engine', 'org.junit.vintage', 'junit-vintage-engine').versionRef('junit')
library('junit-jupiter-platform-launcher', 'org.junit.platform', 'junit-platform-launcher').version('1.10.1')
library('hamcrest', 'org.hamcrest', 'hamcrest-library').version('2.2')
library('junit-jupiter-platform-launcher', 'org.junit.platform', 'junit-platform-launcher').version('1.12.0')
library('hamcrest', 'org.hamcrest', 'hamcrest-library').version('3.0')
library('junit4', 'junit', 'junit').version('4.13.2')
}
}