tutorial:minotaur
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:minotaur [2021/07/22 21:36] – bump Minotaur version, minor grammar/spelling corrections emmaffle | tutorial:minotaur [2022/10/22 23:48] (current) – More appropriate heading changes budavissza | ||
---|---|---|---|
Line 4: | Line 4: | ||
This page only goes through the basics of Minotaur, and you should [[https:// | This page only goes through the basics of Minotaur, and you should [[https:// | ||
- | ===== 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', | ||
+ | ] | ||
} | } | ||
</ | </ | ||
Line 33: | Line 37: | ||
Get your Modrinth [[https:// | Get your Modrinth [[https:// | ||
- | Now, when you run '' | + | Now, when you run '' |
{{https:// | {{https:// | ||
Line 40: | Line 44: | ||
This is where Java '' | This is where Java '' | ||
- | ===== Absurd | + | ===== 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. 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: | 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: | ||
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.1626989809.txt.gz · Last modified: 2021/07/22 21:36 by emmaffle