1
0
mirror of https://github.com/cabaletta/baritone synced 2024-12-18 13:15:13 +00:00

handle this differently (grab archive name from root project)

This commit is contained in:
Wagyourtail 2022-06-08 09:26:47 -06:00
parent f204fbb08e
commit 347027a8e0
No known key found for this signature in database
GPG Key ID: 919725C5A647667A
2 changed files with 23 additions and 8 deletions

View File

@ -15,9 +15,15 @@
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
buildscript {
dependencies {
classpath "org.ow2.asm:asm:9.3"
}
}
plugins {
id "architectury-plugin" version "3.4.135"
id 'dev.architectury.loom' version '0.11.0.275' apply false
id 'dev.architectury.loom' version '0.11.0.254' apply false
}
subprojects {

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-standalone-%s.jar",
ARTIFACT_FABRIC_UNOPTIMIZED = "%s-standalone-%s.jar",
ARTIFACT_FORGE_STANDALONE = "%s-forge-standalone-%s.jar",
ARTIFACT_FABRIC_UNOPTIMIZED = "%s-fabric-standalone-%s.jar",
ARTIFACT_FABRIC_API = "%s-fabric-api-%s.jar",
ARTIFACT_FABRIC_STANDALONE = "%s-fabric-standalone-%s.jar";
@ -61,15 +61,24 @@ class BaritoneGradleTask extends DefaultTask {
proguardOut;
public BaritoneGradleTask() {
this.artifactName = getProject().getProperties().get("archivesBaseName").toString();
this.artifactName = getProject().getRootProject().getProperties().get("archivesBaseName").toString();
this.artifactVersion = getProject().getVersion().toString();
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);
}