mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +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')
|
archiveClassifier.set('clean')
|
||||||
manifest.attributes("Main-Class": mainClassName,
|
manifest.attributes("Main-Class": mainClassName,
|
||||||
"Premain-Class": mainAgentName,
|
"Premain-Class": mainAgentName,
|
||||||
"Multi-Release": "true")
|
"Multi-Release": "true",
|
||||||
|
"Automatic-Module-Name": "GravitLauncher")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register('sourcesJar', Jar) {
|
tasks.register('sourcesJar', Jar) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ public ClassLoaderControl init(List<Path> files, String nativePath, LaunchOption
|
||||||
} catch (MalformedURLException ex) {
|
} catch (MalformedURLException ex) {
|
||||||
throw new RuntimeException(ex);
|
throw new RuntimeException(ex);
|
||||||
}
|
}
|
||||||
}).toArray(URL[]::new), BasicLaunch.class.getClassLoader());
|
}).toArray(URL[]::new), ClassLoader.getPlatformClassLoader());
|
||||||
moduleClassLoader.nativePath = nativePath;
|
moduleClassLoader.nativePath = nativePath;
|
||||||
{
|
{
|
||||||
if(options.enableHacks) {
|
if(options.enableHacks) {
|
||||||
|
@ -163,14 +163,11 @@ private class ModuleClassLoader extends URLClassLoader {
|
||||||
private String nativePath;
|
private String nativePath;
|
||||||
|
|
||||||
private final List<String> packages = new ArrayList<>();
|
private final List<String> packages = new ArrayList<>();
|
||||||
public ModuleClassLoader(URL[] urls) {
|
public ModuleClassLoader(URL[] urls, ClassLoader parent) {
|
||||||
super(urls);
|
super("LAUNCHER", urls, parent);
|
||||||
packages.add("pro.gravit.launcher.");
|
packages.add("pro.gravit.launcher.");
|
||||||
packages.add("pro.gravit.utils.");
|
packages.add("pro.gravit.utils.");
|
||||||
}
|
}
|
||||||
public ModuleClassLoader(URL[] urls, ClassLoader parent) {
|
|
||||||
super(urls, parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
|
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
|
||||||
|
|
Loading…
Reference in a new issue