-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix uploadInfo and Loom game version detection (#18)
- Fix game version detection with Loom - Fix uploadInfo and related fields in TaskModrinthUpload by removing the afterEvaluate block - Better CI setup
- Loading branch information
Showing
9 changed files
with
124 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ insert_final_newline = true | |
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.yml] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: CI | ||
|
||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 17 | ||
distribution: adopt | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build | ||
env: | ||
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }} | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Artifacts | ||
path: build/libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/com/modrinth/minotaur/compat/FabricLoomCompatibility.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.modrinth.minotaur.compat; | ||
|
||
import net.fabricmc.loom.configuration.DependencyInfo; | ||
import net.fabricmc.loom.util.Constants; | ||
import org.gradle.api.Project; | ||
|
||
/** | ||
* All the utility methods for compatibility with Fabric Loom. | ||
*/ | ||
public class FabricLoomCompatibility { | ||
/** | ||
* Detects the game version being used by Fabric Loom. | ||
* @param project The Gradle project that Minotaur is applied to | ||
* @return The version of Minecraft that Loom is building against | ||
*/ | ||
public static String detectGameVersion(final Project project) { | ||
return DependencyInfo.create(project, Constants.Configurations.MINECRAFT).getDependency().getVersion(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters