ExtraCrafTX / GeneratorFabricMod

Prompts the user for various information and outputs a skeleton mod for the Fabric toolchain
Apache License 2.0
97 stars 5 forks source link

Configuration 'minecraft' has no dependencies #24

Open CjPhoenix opened 2 years ago

CjPhoenix commented 2 years ago

When the project is built after adjusting Java and Gradle versions, it fails with this:

> Configure project :
Fabric Loom: 0.12.1

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/chervenka24033/Desktop/Documents/Java/MCHackedClient/build.gradle' line: 13

* What went wrong:
A problem occurred evaluating root project 'MCHackedClient'.
> Could not find method minecraft() for arguments [build_7214lik31irmfzbqyvlucabkv$_run_closure1@18df1fd6] on root project 'MCHackedClient' of type org.gradle.api.Project.

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'MCHackedClient'.
    at <removed for length / clarity>
Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method minecraft() for arguments [build_7214lik31irmfzbqyvlucabkv$_run_closure1@18df1fd6] on root project 'MCHackedClient' of type org.gradle.api.Project.
    at org.gradle.internal.metaobject.AbstractDynamicObject$CustomMissingMethodExecutionFailed.<init>(AbstractDynamicObject.java:190)
    ... 170 more

==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring root project 'MCHackedClient'.
> Failed to setup minecraft

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'MCHackedClient'.
    at <removed for length/ clarity>
Caused by: java.lang.RuntimeException: Failed to setup minecraft
    at <removed for length/ clarity>
Caused by: java.lang.IllegalArgumentException: Configuration 'minecraft' has no dependencies
    at net.fabricmc.loom.configuration.DependencyInfo.create(DependencyInfo.java:53)
    ... 186 more

==============================================================================

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

CONFIGURE FAILED in 503ms
BerdinskiyBear commented 2 years ago

I did not investigate, but I think think that might be some kind of a change in Fabric Loom which I have missed. If you need a quick fix than in build.gradle you can remove this:

minecraft {
}

I don't know what minecraft with an empty closure did exactly but removing it magically made errors go away.