Skip to content

Commit

Permalink
Add Quilt Loom support (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
triphora authored Apr 18, 2022
1 parent b27fc1b commit 1ac0924
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'maven-publish'
}

version = '2.1.1'
version = '2.1.2'
group = 'com.modrinth.minotaur'
archivesBaseName = 'Minotaur'
description = 'Modrinth plugin for publishing builds to the website!'
Expand All @@ -29,7 +29,7 @@ repositories {
dependencies {
compileOnly gradleApi()

compileOnly group: "net.fabricmc", name: "fabric-loom", version: "0.11.32"
compileOnly group: "net.fabricmc", name: "fabric-loom", version: "0.12.7"

implementation group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.5.13'
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.13'
Expand Down Expand Up @@ -77,10 +77,12 @@ jar {
java {
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
//noinspection all
it.options.release = 8
it.options.release.set(8)
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 4 additions & 2 deletions src/main/java/com/modrinth/minotaur/TaskModrinthUpload.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public void apply() {
if (extension.getLoaders().get().isEmpty() && extension.getDetectLoaders().get()) {
this.addLoaderForPlugin("net.minecraftforge.gradle", "forge");
this.addLoaderForPlugin("fabric-loom", "fabric");
this.addLoaderForPlugin("org.quiltmc.loom", "quilt");
}

if (extension.getLoaders().get().isEmpty()) {
Expand Down Expand Up @@ -306,7 +307,8 @@ private void detectGameVersionFabric() {
Project project = this.getProject();
ModrinthExtension extension = this.getProject().getExtensions().getByType(ModrinthExtension.class);

if (project.getPluginManager().findPlugin("fabric-loom") != null) {
if (project.getPluginManager().findPlugin("fabric-loom") != null ||
project.getPluginManager().findPlugin("org.quiltmc.loom") != null) {
try {
String loomGameVersion = FabricLoomCompatibility.detectGameVersion(project);
if (extension.getGameVersions().get().isEmpty()) {
Expand All @@ -319,7 +321,7 @@ private void detectGameVersionFabric() {
project.getLogger().debug("Failed to detect Loom game version.", e);
}
} else {
project.getLogger().debug("Fabric Loom is not present; no game versions were added.");
project.getLogger().debug("Loom is not present; no game versions were added.");
}
}

Expand Down

0 comments on commit 1ac0924

Please sign in to comment.