-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backport current buildscripts to 1.12.2 #3856
base: master
Are you sure you want to change the base?
Conversation
when porting up, until 1.17, no build files should change except gradle.properties, so if something changes one of these files it'll probably be wrong... also ci only needs gradle build not the ones for forge/fabric now. at 1.17, there will be a mapping change to official mojang mappings... |
will this work easily with #3855? such as for ImpactDevelopment/maven@155f713 as used by lambda-client/lambda@90d5575 currently i can just do |
sounds like a great use case for the git fake merge (example: |
this is set up for maven publish to publish artifacts similarly to arch-loom's output... also srg is the proper target so they dont need the exact same mcp mappings and fg.deobf will work. maven publish local it and see the output... because it is slightly different than the artifacts baritone previously published, but yes they should be able to handle the outputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dist jars have the appropriate mappings for their platform, tweaker:runClient
and fabric:runClient
seem to work, forge:runClient
is broken and :runClient
surprisingly existed and started fabric.
What's the purpose of the "-dev" and "-shadow" jars? E.g. the fabric "-dev" jar doesn't contain any classes.
Is there any way to run proguard less often? Running it six times per build isn't quite ideal.
//TODO: fix for j16 | ||
// final JavaVersion javaVersion = new DefaultJvmVersionDetector(new DefaultExecActionFactory(new IdentityFileResolver())).getJavaVersion(java); | ||
// | ||
// if (!javaVersion.getMajorVersion().equals("8")) { | ||
// System.out.println("Failed to validate Java version " + javaVersion.toString() + " [" + java + "] for ProGuard libraryjars"); | ||
// // throw new RuntimeException("Java version incorrect: " + javaVersion.getMajorVersion() + " for " + java); | ||
// return false; | ||
// } | ||
// | ||
// System.out.println("Validated Java version " + javaVersion.toString() + " [" + java + "] for ProGuard libraryjars"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any update hints/notes on this one? Or will you resolve it before merging or can I just ignore it when merging up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ignore, it doesn't matter, actually that's probably been resolved now that we've upgraded proguard, I also put a little if statement in place to make java8 and java17 both work at
baritone/buildSrc/src/main/java/baritone/gradle/task/ProguardTask.java
Lines 221 to 229 in 7aa46a3
if (JavaVersion.current().isJava9Compatible()) { | |
template.add(2, "-libraryjars <java.home>/jmods/java.base.jmod(!**.jar;!module-info.class)"); | |
template.add(3, "-libraryjars <java.home>/jmods/java.desktop.jmod(!**.jar;!module-info.class)"); | |
template.add(4, "-libraryjars <java.home>/jmods/jdk.unsupported.jmod(!**.jar;!module-info.class)"); | |
template.add(5, "-libraryjars <java.home>/jmods/java.compiler.jmod(!**.jar;!module-info.class)"); | |
} else { | |
template.add(2, "-libraryjars <java.home>/lib/rt.jar"); | |
} | |
There's other changes so I'll do a normal merge and then checkout the old file.
just gotta repeat that. Mcp/yarn mapped is almost as bad as notch mapped because it forces you to use the same mappings version as Baritone. |
hmm, weird forge:runClient didn't... genIntellijRuns might make a working forge run... I'll have to look into that at some point tho.
-dev is just jaring the results of the current project, see in tweaker it'll just have the 2 classes defined there, and in forge same thing with the BaritoneForgeModXD class.
I'm not a proguard expert. if there's a way to overlap it maybe... but there are technically 6 distinct builds. We could probably run proguard once, export the mappings and then do the others with tiny remapper, but the other optimiazations wouldn't be achieved that way |
I rolled high on a d20 so "baritoe" it is |
Co-authored-by: ZacSharp <[email protected]>
The server thread crashes when joining a world on |
damn, thought I'd fixed that bug.... I'll look into it |
fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure anymore whether this was the error from forge:runClient
all the time so I'll include it here just in case.
[23:35:26] [main/ERROR] [LaunchWrapper]: Unable to launch java.lang.reflect.InvocationTargetException: null at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_362] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_362] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_362] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_362] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] Caused by: joptsimple.MissingRequiredOptionsException: Missing required option(s) [accessToken, version] at joptsimple.OptionParser.ensureRequiredOptions(OptionParser.java:426) ~[OptionParser.class:?] at joptsimple.OptionParser.parse(OptionParser.java:400) ~[OptionParser.class:?] at net.minecraft.client.main.Main.main(Main.java:51) ~[Main.class:?] ... 6 more
tweaker:runClient
works now so everything which used to work is working and I can't complain 😄
(I did test a built jar as well)
ok, well that's also fixed now... (the task from genIntellijRuns worked before that commit for testing forge, but now it's properly fixed) |
On the idea of running proguard only once: |
since we don't depend on any forge patches, the vanilla jar would be fine... |
Since the loader specific parts depend on main and api we have to run them through proguard, but explicitly marking them as kept should have the required effect. |
Backports current buildscripts to 1.12.2, and adds legacy fabric support... ( also a bump to unimined version to fix some issues 🙃 )
So basically, no more
setupDecompWorkspace
, and stuff is underunimined
instead offorgegradle
,genIntellijRuns
may require you to set the java version to 8 afterwards for launching in dev if you have 17 set as the sdk in idea...TODO
supersedes #3855