User Tools

Site Tools


zh_cn:tutorial:minotaur

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
zh_cn:tutorial:minotaur [2022/08/11 11:01] solidblockzh_cn:tutorial:minotaur [2023/06/21 06:19] (current) – [让我们更加深入一些!] solidblock
Line 71: Line 71:
     versionName = br.readLine();     versionName = br.readLine();
     uploadFile = remapJar     uploadFile = remapJar
-    System.out.println("E输入游戏版本(有效的游戏版本参见 minotaur docs):");+    System.out.println("输入游戏版本(有效的游戏版本参见 minotaur docs):");
     gameVersions = [br.readLine()];     gameVersions = [br.readLine()];
     System.out.println("Enter changelog:");     System.out.println("Enter changelog:");
Line 90: Line 90:
 </code> </code>
  
 +===== 将 Minotaur 由 1.x 更新到 2.x =====
 +
 +Minotaur 2.x 加入了一些大改,改变了你的构建脚本的格式。
 +首先,Minotaur 不是注册自己的 ''publishModrinth'' 任务,而是自动创建 ''modrinth'' 任务。你可以将 ''task publishModrinth(type: TaskModrinthUpload) {'' 这一行直接替换成 ''modrinth {''
 +
 +要指明支持的 Minecraft 版本和模组加载器,必须使用 ''gameVersions'' 和 ''loaders'' 数组。这些的语法都非常清楚。
 +
 +不再使用 ''releaseType'',而应该使用 ''vevrsionType''。这个在 v1.2.0 中自动改变了,但是很少的构建脚本从 v1.1.0 进行了迁移。
 +
 +最后,依赖也是数组,其需要 ''ModDependency'' 或 ''VersionDependency''(可能需要从 ''com.modrinth.minotaur.dependencies'' 包)中导入。第一个参数是项目或者版本的 ID(字符串),第二个参数是依赖的类型:''required''、''optional'' 或 ''unsupported''
zh_cn/tutorial/minotaur.1660215680.txt.gz · Last modified: 2022/08/11 11:01 by solidblock