froge support

This commit is contained in:
Wagyourtail 2022-06-08 02:28:22 -06:00
parent 606f9c55a8
commit f204fbb08e
No known key found for this signature in database
GPG Key ID: 919725C5A647667A
5 changed files with 28 additions and 25 deletions

View File

@ -16,8 +16,8 @@
*/
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id 'dev.architectury.loom' version '0.11.0-SNAPSHOT' apply false
id "architectury-plugin" version "3.4.135"
id 'dev.architectury.loom' version '0.11.0.275' apply false
}
subprojects {
@ -36,7 +36,7 @@ subprojects {
}
group = rootProject.maven_group
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
loom {
silentMojangMappingsLicense()

View File

@ -49,8 +49,8 @@ class BaritoneGradleTask extends DefaultTask {
ARTIFACT_STANDALONE = "%s-standalone-%s.jar",
ARTIFACT_FORGE_UNOPTIMIZED = "%s-forge-unoptimized-%s.jar",
ARTIFACT_FORGE_API = "%s-forge-api-%s.jar",
ARTIFACT_FORGE_STANDALONE = "%s-forge-standalone-%s.jar",
ARTIFACT_FABRIC_UNOPTIMIZED = "%s-fabric-standalone-%s.jar",
ARTIFACT_FORGE_STANDALONE = "%s-standalone-%s.jar",
ARTIFACT_FABRIC_UNOPTIMIZED = "%s-standalone-%s.jar",
ARTIFACT_FABRIC_API = "%s-fabric-api-%s.jar",
ARTIFACT_FABRIC_STANDALONE = "%s-fabric-standalone-%s.jar";
@ -66,19 +66,10 @@ class BaritoneGradleTask extends DefaultTask {
this.artifactPath = this.getBuildFile(formatVersion(ARTIFACT_STANDARD));
if (getProject().hasProperty("baritone.forge_build")) {
this.artifactUnoptimizedPath = this.getBuildFile(formatVersion(ARTIFACT_FORGE_UNOPTIMIZED));
this.artifactApiPath = this.getBuildFile(formatVersion(ARTIFACT_FORGE_API));
this.artifactStandalonePath = this.getBuildFile(formatVersion(ARTIFACT_FORGE_STANDALONE));
} else if (getProject().hasProperty("baritone.fabric_build")) {
this.artifactUnoptimizedPath = this.getBuildFile(formatVersion(ARTIFACT_FABRIC_UNOPTIMIZED));
this.artifactApiPath = this.getBuildFile(formatVersion(ARTIFACT_FABRIC_API));
this.artifactStandalonePath = this.getBuildFile(formatVersion(ARTIFACT_FABRIC_STANDALONE));
} else {
this.artifactUnoptimizedPath = this.getBuildFile(formatVersion(ARTIFACT_UNOPTIMIZED));
this.artifactApiPath = this.getBuildFile(formatVersion(ARTIFACT_API));
this.artifactStandalonePath = this.getBuildFile(formatVersion(ARTIFACT_STANDALONE));
}
this.proguardOut = this.getTemporaryFile(PROGUARD_EXPORT_PATH);
}

View File

@ -3,7 +3,7 @@ import baritone.gradle.task.ProguardTask
architectury {
injectInjectables = false
common("fabric")
common(System.getProperty("Baritone.enabled_platforms").split(","))
}
//loom {
@ -126,3 +126,11 @@ jar {
)
}
}
task removeDist(type: Delete) {
delete new File(rootProject.rootDir, "dist")
}
clean.finalizedBy(removeDist)

View File

@ -1,11 +1,11 @@
org.gradle.jvmargs=-Xmx2048M
org.gradle.jvmargs=-Xmx4G
mod_version=1.9.0-local
maven_group=baritone
archives_base_name=baritone
minecraft_version=1.19
forge_version=1.18.2-40.0.0
forge_version=1.19-41.0.1
fabric_version=0.13.3
# # un comment for forge debugging default (as opposed to fabric)

View File

@ -42,7 +42,11 @@ pluginManagement {
rootProject.name = 'baritone'
include("fabric")
//include("forge")
include("common")
include("tweaker")
if (System.getProperty("Baritone.enabled_platforms") == null) {
System.setProperty("Baritone.enabled_platforms", "fabric,forge")
}
for (platform in System.getProperty("Baritone.enabled_platforms").split(",")) {
include(platform)
}