tutorial:minotaur
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:minotaur [2020/12/27 20:21] – Fixed typos, tweaked some things around ytg1234 | tutorial:minotaur [2022/10/22 23:48] (current) – More appropriate heading changes budavissza | ||
---|---|---|---|
Line 2: | Line 2: | ||
Minotaur is a Gradle plugin similar to CurseGradle. | Minotaur is a Gradle plugin similar to CurseGradle. | ||
- | This page only goes through the basics of Minotaur, you should [[https:// | + | This page only goes through the basics of Minotaur, |
- | ===== Basic ===== | + | ===== Basic Implementation |
- | First of all, add the minotaur | + | First of all, add the Minotaur |
<code groovy> | <code groovy> | ||
plugins { | plugins { | ||
- | id " | + | id " |
} | } | ||
</ | </ | ||
- | Now you can create | + | Minotaur registers |
Here is a basic example. | Here is a basic example. | ||
<code groovy> | <code groovy> | ||
- | import com.modrinth.minotaur.TaskModrinthUpload | + | import com.modrinth.minotaur.dependencies.ModDependency |
- | task publishModrinth (type: TaskModrinthUpload) | + | modrinth |
- | token = ' | + | token = ' |
- | projectId = 'modrinthModID' // The ID of your modrinth | + | projectId = 'AABBCCDD' // The ID of your Modrinth |
- | versionNumber = ' | + | versionNumber = ' |
- | uploadFile = remapJar // This links to a task that builds your mod jar and sets " | + | versionName = 'My awesome release' |
- | | + | uploadFile = remapJar // Tells Minotaur |
- | | + | |
+ | loaders = [' | ||
+ | | ||
+ | new ModDependency('P7dR8mSH', | ||
+ | ] | ||
} | } | ||
</ | </ | ||
- | Get your Modrinth [[https:// | + | Get your Modrinth [[https:// |
- | Now when you run '' | + | Now, when you run '' |
{{https:// | {{https:// | ||
- | However, this can be limiting and sometimes repetitive to upload, you would need to edit the values every time you want to release a version. | + | However, this can be limiting and sometimes repetitive to upload, |
This is where Java '' | This is where Java '' | ||
- | ===== Advanced | + | ===== Dynamic Implementation |
- | So, you have a basic implementation. Let's make it dynamic, allowing you to input values through the command line when the task is ran. | + | So, you have a basic implementation. Let's make it dynamic, allowing you to input values through the command line when the task is ran. Typically this is not done for Gradle tasks, and an environment variable or similar static source can be used for these values, but the tutorial is kept for posterity: |
First of all, we would need to create a '' | First of all, we would need to create a '' | ||
Line 53: | Line 57: | ||
Now you can collect user input by simply calling the method: '' | Now you can collect user input by simply calling the method: '' | ||
- | Let's add this to our task, shall we? We'll also add some more data, such as a markdown | + | Let's add this to our task, shall we? We'll also add some more data, such as a Markdown |
<code groovy> | <code groovy> | ||
- | import com.modrinth.minotaur.TaskModrinthUpload | + | modrinth { |
- | + | ||
- | task publishModrinth (type: TaskModrinthUpload) | + | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | ||
- | System.out.println(" | + | System.out.println(" |
- | token = br.readLine(); | + | token = br.readLine(); |
- | projectId = "" | + | projectId = "" |
System.out.println(" | System.out.println(" | ||
versionNumber = br.readLine(); | versionNumber = br.readLine(); | ||
System.out.println(" | System.out.println(" | ||
versionName = br.readLine(); | versionName = br.readLine(); | ||
- | uploadFile = remapJar | + | uploadFile = remapJar |
System.out.println(" | System.out.println(" | ||
- | | + | |
System.out.println(" | System.out.println(" | ||
changelog = br.readLine(); | changelog = br.readLine(); | ||
- | | + | |
} | } | ||
</ | </ | ||
- | Now, when '' | + | Now, when '' |
- | Minotaur is great alongside CurseGradle. You can merge both of the tasks together. | + | Minotaur is great alongside CurseGradle. You can merge both of the tasks together. |
<code groovy> | <code groovy> | ||
- | task publishModrinth (type: TaskModrinthUpload) | + | task publishToModSites |
- | | + | |
- | curseforge<id> // Begin the cursegradle task. Replacing ID with the id you set on the cursegradle config. | + | |
} | } | ||
</ | </ | ||
+ | ===== Updating from Minotaur 1.x to 2.x ===== | ||
+ | |||
+ | Minotaur 2.x introduced a few breaking changes to how your buildscript is formatted. | ||
+ | |||
+ | First, instead of registering your own '' | ||
+ | To declare supported Minecraft versions and mod loaders, the '' | ||
+ | Instead of using '' | ||
+ | Finally, dependencies are also an array which take '' |
tutorial/minotaur.1609100468.txt.gz · Last modified: 2020/12/27 20:21 by ytg1234