updated lys-catalog version
Some checks failed
CI / build (push) Failing after 2m40s

This commit is contained in:
2024-12-31 16:51:02 +08:00
parent 4a22d2380e
commit b3dce6d691
8 changed files with 44 additions and 31 deletions

View File

@@ -4,13 +4,13 @@ on:
branches: [ master ]
jobs:
build:
runs-on: woryzen
runs-on: hostinger
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
distribution: graalvm
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

View File

@@ -1,6 +1,12 @@
{
"resources":{
"includes":[{
"pattern":"\\QMETA-INF/services/java.lang.System$LoggerFinder\\E"
}, {
"pattern":"\\QMETA-INF/services/java.net.spi.URLStreamHandlerProvider\\E"
}, {
"pattern":"\\QMETA-INF/services/java.time.zone.ZoneRulesProvider\\E"
}, {
"pattern":"\\Qrender_template_test.txt\\E"
}]},
"bundles":[]

View File

@@ -136,11 +136,13 @@ test {
}.first()
systemProperties([
'junit.jupiter.engine.jar' : junitJupiterEngineJar.toString(),
'path.classloader.test.bundle' : pathClassLoaderTestBundleTask.get().outputs.files.singleFile,
'path.classloader.test.bundle' : pathClassLoaderTestBundleTask.flatMap { it.archiveFile }.get().asFile,
'zip.test.bundle' : configurations.zipTestBundle.singleFile
])
jvmArgs(['--add-opens', 'java.base/sun.nio.fs=ALL-UNNAMED'])
jvmArgs([
'--add-opens', 'java.base/sun.nio.fs=ALL-UNNAMED',
])
}

View File

@@ -1,4 +1,8 @@
org.gradle.configuration-cache=false
org.gradle.parallel=true
org.gradle.caching=true
gitea.maven.url = https://gitea.woggioni.net/api/packages/woggioni/maven
jwo.version = 2024.07.06
lys.version = 2024.07.06
jwo.version = 2024.12.31
lys.version = 2024.12.28
guice.version = 5.0.1

Binary file not shown.

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

2
gradlew vendored
View File

@@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.

View File

@@ -21,28 +21,29 @@ public class PathClassLoaderTest {
@Test
@SneakyThrows
void test() {
FileSystem fs = FileSystems.newFileSystem(testBundle, (ClassLoader) null);
List<Path> paths = StreamSupport.stream(fs.getRootDirectories().spliterator(), false).flatMap(new Function<Path, Stream<Path>>() {
@Override
@SneakyThrows
public Stream<Path> apply(Path path) {
return Files.list(path)
.filter(Files::isRegularFile)
.filter(p -> p.getFileName().toString().endsWith(".jar"));
}
}).flatMap(new Function<Path, Stream<Path>>() {
@Override
@SneakyThrows
public Stream<Path> apply(Path path) {
System.out.println(path.getFileName().toString());
return StreamSupport.stream(FileSystems.newFileSystem(path, (ClassLoader) null).getRootDirectories().spliterator(), false);
}
}).collect(Collectors.toUnmodifiableList());
PathClassLoader classLoader = new PathClassLoader(paths);
Class<?>[] cls = new Class[1];
Assertions.assertDoesNotThrow(() -> {
cls[0] = classLoader.loadClass("com.google.common.collect.ImmutableMap");
});
Assertions.assertNotNull(cls[0]);
try(FileSystem fs = FileSystems.newFileSystem(testBundle, (ClassLoader) null)) {
List<Path> paths = StreamSupport.stream(fs.getRootDirectories().spliterator(), false).flatMap(new Function<Path, Stream<Path>>() {
@Override
@SneakyThrows
public Stream<Path> apply(Path path) {
return Files.list(path)
.filter(Files::isRegularFile)
.filter(p -> p.getFileName().toString().endsWith(".jar"));
}
}).flatMap(new Function<Path, Stream<Path>>() {
@Override
@SneakyThrows
public Stream<Path> apply(Path path) {
System.out.println(path.getFileName().toString());
return StreamSupport.stream(FileSystems.newFileSystem(path, (ClassLoader) null).getRootDirectories().spliterator(), false);
}
}).collect(Collectors.toUnmodifiableList());
PathClassLoader classLoader = new PathClassLoader(paths);
Class<?>[] cls = new Class[1];
Assertions.assertDoesNotThrow(() -> {
cls[0] = classLoader.loadClass("com.google.common.collect.ImmutableMap");
});
Assertions.assertNotNull(cls[0]);
}
}
}