@@ -31,7 +31,7 @@ public ForgeGradleProblems() {
3131 //region Minecraft
3232 //region Mappings
3333 RuntimeException missingMappings (Throwable throwable ) {
34- return this .getReporter (). throwing (throwable , this . id ( "missing-mappings" , "Missing Minecraft mappings" ) , spec -> spec
34+ return this .throwing (throwable , "missing-mappings" , "Missing Minecraft mappings" , spec -> spec
3535 .details ("""
3636 Attempted to consume Minecraft mappings, but none were declared.
3737 Minecraft dependencies cannot be resolved without mappings.""" )
@@ -44,7 +44,7 @@ RuntimeException missingMappings(Throwable throwable) {
4444 }
4545
4646 RuntimeException nullMappingsParam (String name ) {
47- return this .getReporter (). throwing (new IllegalArgumentException ("Mappings %s cannot be null" .formatted (name )), this . id ( "null-mappings-param" , "Null mappings parameter" ) , spec -> spec
47+ return this .throwing (new IllegalArgumentException ("Mappings %s cannot be null" .formatted (name )), "null-mappings-param" , "Null mappings parameter" , spec -> spec
4848 .details ("""
4949 Attempted to create a Mappings object, but the %s parameter was null.
5050 The parameters for the Mappings object are not null.""" .formatted (name ))
@@ -61,7 +61,7 @@ void reportOverriddenMappings(MinecraftMappings original, MinecraftMappings repl
6161 var comparison = "Old: (channel: %s, version: %s), New: (channel: %s, version: %s)"
6262 .formatted (original .channel (), original .version (), replacement .channel (), replacement .version ());
6363 LOGGER .warn ("WARNING: Overriding previously declared mappings! {}" , comparison );
64- this .getReporter (). report (id ( "multiple-mappings" , "Multiple mappings declared" ) , spec -> spec
64+ this .report ("multiple-mappings" , "Multiple mappings declared" , spec -> spec
6565 .details ("""
6666 Mappings are being set, even though they have already been declared.
6767 This will cause the current mappings to be overridden, which may lead to unexpected behavior.
@@ -79,7 +79,7 @@ void reportMissingMinecraftDependency() {
7979 if (!this .test ("net.minecraftforge.gradle.warnings.missingMinecraftDependency" )) return ;
8080
8181 LOGGER .error ("ERROR: No Minecraft dependency declared! Disabling ForgeGradle. See Problems report for details." );
82- this .getReporter (). report (id ( "missing-dependency" , "Missing Minecraft dependency" ) , spec -> spec
82+ this .report ("missing-dependency" , "Missing Minecraft dependency" , spec -> spec
8383 .details ("""
8484 ForgeGradle was applied, but no Minecraft dependency was declared.
8585 ForgeGradle will now be disabled and stop all further registrations.""" )
@@ -94,7 +94,7 @@ void reportMissingMinecraftDependency() {
9494 }
9595
9696 RuntimeException invalidMinecraftDependencyType (Dependency dependency ) {
97- return this .getReporter (). throwing (new IllegalArgumentException ("Minecraft dependency is not a module dependency" ), this . id ( "unsupported-minecraft-dependency-type" , "Non-module dependency used as Minecraft dependency" ) , spec -> spec
97+ return this .throwing (new IllegalArgumentException ("Minecraft dependency is not a module dependency" ), "unsupported-minecraft-dependency-type" , "Non-module dependency used as Minecraft dependency" , spec -> spec
9898 .details ("""
9999 Attempted to use a non-module (or internal module) dependency as a Minecraft dependency.
100100 The Minecraft dependency must be an external module dependency, as it is resolved from the Minecraft Maven.
@@ -111,7 +111,7 @@ RuntimeException invalidMinecraftDependencyType(Dependency dependency) {
111111
112112 @ Deprecated (forRemoval = true )
113113 void reportMissingMetadata (Throwable throwable ) {
114- this .getReporter (). report (id ( "missing-metadata" , "Failed to extract metadata" ) , spec -> spec
114+ this .report ("missing-metadata" , "Failed to extract metadata" , spec -> spec
115115 .details ("""
116116 ForgeGradle failed to locate or extract the metadata generated for the Minecraft dependency.
117117 This is expected if the Minecraft Maven has not yet been synced.
@@ -126,7 +126,7 @@ void reportMissingMetadata(Throwable throwable) {
126126 }
127127
128128 RuntimeException changingMinecraftDependency (Dependency dependency ) {
129- return this .getReporter (). throwing (new IllegalArgumentException ("Minecraft dependency cannot be changing" ), this . id ( "changing-minecraft-dependency" , "Minecraft dependency marked as changing" ) , spec -> spec
129+ return this .throwing (new IllegalArgumentException ("Minecraft dependency cannot be changing" ), "changing-minecraft-dependency" , "Minecraft dependency marked as changing" , spec -> spec
130130 .details ("""
131131 Attempted to use a Minecraft dependency that was marked as changing.
132132 This is currently unsupported.
@@ -143,7 +143,7 @@ RuntimeException changingMinecraftDependency(Dependency dependency) {
143143 void reportMcMavenNotDeclared () {
144144 if (!this .test ("net.minecraftforge.gradle.warnings.missingRepository.mcmaven" )) return ;
145145
146- this .getReporter (). report (id ( "minecraft-maven-not-declared" , "Minecraft Maven not declared" ) , spec -> spec
146+ this .report ("minecraft-maven-not-declared" , "Minecraft Maven not declared" , spec -> spec
147147 .details ("""
148148 ForgeGradle was configured to sync the Minecraft Maven, but it was not declared as a repository!
149149 This will result in a "cannot resolve dependency" error.""" )
@@ -156,7 +156,7 @@ void reportMcMavenNotDeclared() {
156156 void reportMcLibsMavenNotDeclared () {
157157 if (!this .test ("net.minecraftforge.gradle.warnings.missingRepository.mclibs" )) return ;
158158
159- this .getReporter (). report (id ( "minecraft-libs-maven-not-declared" , "Minecraft Libraries maven not declared" ) , spec -> spec
159+ this .report ("minecraft-libs-maven-not-declared" , "Minecraft Libraries maven not declared" , spec -> spec
160160 .details ("""
161161 ForgeGradle was configured to sync the Minecraft Maven, but the Minecraft Libraries maven was not declared!
162162 The generated Minecraft artifact has dependencies from libraries that may only exist on there.
@@ -170,7 +170,7 @@ void reportMcLibsMavenNotDeclared() {
170170 void reportForgeMavenNotDeclared () {
171171 if (!this .test ("net.minecraftforge.gradle.warnings.missingRepository.forge" )) return ;
172172
173- this .getReporter (). report (id ( "forge-maven-not-declared" , "Forge maven not declared" ) , spec -> spec
173+ this .report ("forge-maven-not-declared" , "Forge maven not declared" , spec -> spec
174174 .details ("""
175175 ForgeGradle was configured to sync the Minecraft Maven, but the Forge maven was not declared!
176176 The generated Minecraft artifact has dependencies from libraries that may only exist on there.
@@ -184,7 +184,7 @@ void reportForgeMavenNotDeclared() {
184184 //endregion
185185
186186 void reportAccessTransformersNotApplied (Throwable e ) {
187- this .getReporter (). report (this . id ( "access-transformers-not-applied" , "AccessTransformers plugin not applied" ) , spec -> spec
187+ this .report ("access-transformers-not-applied" , "AccessTransformers plugin not applied" , spec -> spec
188188 .details ("""
189189 The build failed with an exception when trying to access access transformers.
190190 The project using ForgeGradle does not have the AccessTransformers Gradle plugin applied, and thus it cannot be used.
@@ -198,7 +198,7 @@ void reportAccessTransformersNotApplied(Throwable e) {
198198 }
199199
200200 RuntimeException accessTransformersNotOnClasspath (Throwable e ) {
201- return this .getReporter (). throwing (e , this . id ( "access-transformers-not-on-classpath" , "AccessTransformers plugin not on classpath" ) , spec -> spec
201+ return this .throwing (e , "access-transformers-not-on-classpath" , "AccessTransformers plugin not on classpath" , spec -> spec
202202 .details ("""
203203 The AccessTransformers plugin was not loaded in the classpath before ForgeGradle.
204204 ForgeGradle cannot create the 'minecraft' extension without referencing classes from the plugin.
0 commit comments