mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 08:31:07 +03:00
[FIX] MirrorHelper
This commit is contained in:
parent
ff3d500cc0
commit
9df116f951
2 changed files with 5 additions and 7 deletions
|
@ -26,7 +26,8 @@
|
|||
archiveClassifier.set('clean')
|
||||
manifest.attributes("Main-Class": mainClassName,
|
||||
"Premain-Class": mainAgentName,
|
||||
"Multi-Release": "true")
|
||||
"Multi-Release": "true",
|
||||
"Automatic-Module-Name": "GravitLauncher")
|
||||
}
|
||||
|
||||
tasks.register('sourcesJar', Jar) {
|
||||
|
|
|
@ -39,7 +39,7 @@ public ClassLoaderControl init(List<Path> files, String nativePath, LaunchOption
|
|||
} catch (MalformedURLException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}).toArray(URL[]::new), BasicLaunch.class.getClassLoader());
|
||||
}).toArray(URL[]::new), ClassLoader.getPlatformClassLoader());
|
||||
moduleClassLoader.nativePath = nativePath;
|
||||
{
|
||||
if(options.enableHacks) {
|
||||
|
@ -163,14 +163,11 @@ private class ModuleClassLoader extends URLClassLoader {
|
|||
private String nativePath;
|
||||
|
||||
private final List<String> packages = new ArrayList<>();
|
||||
public ModuleClassLoader(URL[] urls) {
|
||||
super(urls);
|
||||
public ModuleClassLoader(URL[] urls, ClassLoader parent) {
|
||||
super("LAUNCHER", urls, parent);
|
||||
packages.add("pro.gravit.launcher.");
|
||||
packages.add("pro.gravit.utils.");
|
||||
}
|
||||
public ModuleClassLoader(URL[] urls, ClassLoader parent) {
|
||||
super(urls, parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
|
||||
|
|
Loading…
Reference in a new issue