0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Minecraft Forge 1.12.xがビルドできない

0
Posted at

Gradleプラグインがリポジトリにない

久しぶりにMinecraft Forge 1.12.2でModを書こうと思い、Forgeリポジトリの1.12.xブランチを開いたところ、以下のようなエラーが出た。

FAILURE: Build failed with an exception. 

* What went wrong:
A problem occurred configuring root project 'forge'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find org.ajoberstar.grgit:grgit-core:3.1.1.
     Searched in the following locations:
       - file:/C:/Users/siro2/.m2/repository/org/ajoberstar/grgit/grgit-core/3.1.1/grgit-core-3.1.1.pom
       - file:/C:/Users/siro2/.m2/repository/org/ajoberstar/grgit/grgit-core/3.1.1/grgit-core-3.1.1.jar
       - https://files.minecraftforge.net/maven/org/ajoberstar/grgit/grgit-core/3.1.1/grgit-core-3.1.1.pom
       - https://files.minecraftforge.net/maven/org/ajoberstar/grgit/grgit-core/3.1.1/grgit-core-3.1.1.jar
       - https://jcenter.bintray.com/org/ajoberstar/grgit/grgit-core/3.1.1/grgit-core-3.1.1.pom
       - https://jcenter.bintray.com/org/ajoberstar/grgit/grgit-core/3.1.1/grgit-core-3.1.1.jar
       - https://repo.maven.apache.org/maven2/org/ajoberstar/grgit/grgit-core/3.1.1/grgit-core-3.1.1.pom
       - https://repo.maven.apache.org/maven2/org/ajoberstar/grgit/grgit-core/3.1.1/grgit-core-3.1.1.jar
       - https://plugins.gradle.org/m2/org/ajoberstar/grgit/grgit-core/3.1.1/grgit-core-3.1.1.pom
       - https://plugins.gradle.org/m2/org/ajoberstar/grgit/grgit-core/3.1.1/grgit-core-3.1.1.jar
     Required by:
         project : > org.ajoberstar.grgit:org.ajoberstar.grgit.gradle.plugin:3.1.1 > org.ajoberstar.grgit:grgit-gradle:3.1.1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s

2年前には実行できていたので、いずれかのMavenリポジトリからGradleプラグインが消されたようである。

解決方法

build.gradleに記述されているプラグインのバージョンを以下のように変更すると解決する。

plugins {
...
-    id 'org.ajoberstar.grgit' version '3.1.1'
+    id 'org.ajoberstar.grgit' version '4.1.1'
...
}

最後に

Minecraft Forge 1.7.10や1.12.2は未だに需要があるものの、Java 7やJava 8で書かねばならず、Gradle本体やプラグイン、ライブラリなどがJava11以降にしか対応しておらず使えないことが増えてきた。
本記事の解決策も数年後には使用できなくなっている可能性は十分に考えられ、古いバージョン向けのMod開発が徐々に難しくなっていると感じる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?