diff --git a/build.gradle b/build.gradle index 823999f0f..bb6bf9946 100755 --- a/build.gradle +++ b/build.gradle @@ -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() @@ -86,4 +86,4 @@ allprojects { } mavenCentral() } -} +} \ No newline at end of file diff --git a/buildSrc/src/main/java/baritone/gradle/task/BaritoneGradleTask.java b/buildSrc/src/main/java/baritone/gradle/task/BaritoneGradleTask.java index a412f2f19..b25885919 100644 --- a/buildSrc/src/main/java/baritone/gradle/task/BaritoneGradleTask.java +++ b/buildSrc/src/main/java/baritone/gradle/task/BaritoneGradleTask.java @@ -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.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); } diff --git a/common/build.gradle b/common/build.gradle index d23ecf6fd..1b356b3d6 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -3,7 +3,7 @@ import baritone.gradle.task.ProguardTask architectury { injectInjectables = false - common("fabric") + common(System.getProperty("Baritone.enabled_platforms").split(",")) } //loom { @@ -125,4 +125,12 @@ jar { 'Implementation-Version': version, ) } -} \ No newline at end of file +} + + + +task removeDist(type: Delete) { + delete new File(rootProject.rootDir, "dist") +} + +clean.finalizedBy(removeDist) \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index ca402c2f4..565ac04f3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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) diff --git a/settings.gradle b/settings.gradle index eadb7a6a5..7c572072c 100755 --- a/settings.gradle +++ b/settings.gradle @@ -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) +}