This commit is contained in:
@@ -4,13 +4,13 @@ on:
|
|||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: woryzen
|
runs-on: hostinger
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: graalvm
|
||||||
java-version: 21
|
java-version: 21
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v3
|
||||||
|
@@ -1,6 +1,12 @@
|
|||||||
{
|
{
|
||||||
"resources":{
|
"resources":{
|
||||||
"includes":[{
|
"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"
|
"pattern":"\\Qrender_template_test.txt\\E"
|
||||||
}]},
|
}]},
|
||||||
"bundles":[]
|
"bundles":[]
|
||||||
|
@@ -136,11 +136,13 @@ test {
|
|||||||
}.first()
|
}.first()
|
||||||
systemProperties([
|
systemProperties([
|
||||||
'junit.jupiter.engine.jar' : junitJupiterEngineJar.toString(),
|
'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
|
'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',
|
||||||
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -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
|
gitea.maven.url = https://gitea.woggioni.net/api/packages/woggioni/maven
|
||||||
jwo.version = 2024.07.06
|
jwo.version = 2024.12.31
|
||||||
lys.version = 2024.07.06
|
lys.version = 2024.12.28
|
||||||
guice.version = 5.0.1
|
guice.version = 5.0.1
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
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
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
2
gradlew
vendored
2
gradlew
vendored
@@ -55,7 +55,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (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.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
@@ -21,28 +21,29 @@ public class PathClassLoaderTest {
|
|||||||
@Test
|
@Test
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
void test() {
|
void test() {
|
||||||
FileSystem fs = FileSystems.newFileSystem(testBundle, (ClassLoader) null);
|
try(FileSystem fs = FileSystems.newFileSystem(testBundle, (ClassLoader) null)) {
|
||||||
List<Path> paths = StreamSupport.stream(fs.getRootDirectories().spliterator(), false).flatMap(new Function<Path, Stream<Path>>() {
|
List<Path> paths = StreamSupport.stream(fs.getRootDirectories().spliterator(), false).flatMap(new Function<Path, Stream<Path>>() {
|
||||||
@Override
|
@Override
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public Stream<Path> apply(Path path) {
|
public Stream<Path> apply(Path path) {
|
||||||
return Files.list(path)
|
return Files.list(path)
|
||||||
.filter(Files::isRegularFile)
|
.filter(Files::isRegularFile)
|
||||||
.filter(p -> p.getFileName().toString().endsWith(".jar"));
|
.filter(p -> p.getFileName().toString().endsWith(".jar"));
|
||||||
}
|
}
|
||||||
}).flatMap(new Function<Path, Stream<Path>>() {
|
}).flatMap(new Function<Path, Stream<Path>>() {
|
||||||
@Override
|
@Override
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public Stream<Path> apply(Path path) {
|
public Stream<Path> apply(Path path) {
|
||||||
System.out.println(path.getFileName().toString());
|
System.out.println(path.getFileName().toString());
|
||||||
return StreamSupport.stream(FileSystems.newFileSystem(path, (ClassLoader) null).getRootDirectories().spliterator(), false);
|
return StreamSupport.stream(FileSystems.newFileSystem(path, (ClassLoader) null).getRootDirectories().spliterator(), false);
|
||||||
}
|
}
|
||||||
}).collect(Collectors.toUnmodifiableList());
|
}).collect(Collectors.toUnmodifiableList());
|
||||||
PathClassLoader classLoader = new PathClassLoader(paths);
|
PathClassLoader classLoader = new PathClassLoader(paths);
|
||||||
Class<?>[] cls = new Class[1];
|
Class<?>[] cls = new Class[1];
|
||||||
Assertions.assertDoesNotThrow(() -> {
|
Assertions.assertDoesNotThrow(() -> {
|
||||||
cls[0] = classLoader.loadClass("com.google.common.collect.ImmutableMap");
|
cls[0] = classLoader.loadClass("com.google.common.collect.ImmutableMap");
|
||||||
});
|
});
|
||||||
Assertions.assertNotNull(cls[0]);
|
Assertions.assertNotNull(cls[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user