Closed hard2make1name closed 2 years ago
:wave: We use the issue tracker exclusively for final bug reports and feature requests. However, this issue appears to be better suited for the Forge Support Forums or Forge Discord. Please create a new topic on the support forum with this issue or ask in the #tech-support
channel in the Discord server, and the conversation can continue there.
I have a problem when i build my project The code I using in build.gralde:
minecraft.runs { client { // Creates a new run configuration with the name 'client' mods { mymod { source sourceSets.main } // Adds the sourceSet 'main' as the sources for the mod 'mymod' } } }
The log is below: `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.
2: Task failed with an exception.
I also tried the another:
minecraft.runs.client { taskName 'runThing' // Sets the Gradle run task name. By default, this option defaults to
runXwhere X is the configuration name capitalized environment 'anEnvProperty', 'someValue' // Adds an environment property to the run configuration main 'com.example.Main' // Sets the main class that will be launched by this configuration inheritArgs false // If true, or not configured, merging this configuration with another one will inherit the parent's args arg 'hello' // Adds an argument to the program jvmArg '-Xmx2G' // Adds a JVM argument singleInstance false // If this configuration should be a singleton (can only have one instance running) property 'myProperty', 'dummyValue' // Adds a system property to the configuration workingDirectory 'run' // Sets the configuration's working directory forceExit true // If true, Gradle will stop once the process finished. Defaults to true source sourceSets.api // Adds a sourceset to the classpath merge 'server', true // Merges this configuration with the 'server' one, overwriting configured properites mods.dummy { // Configures the 'dummy' mod classes sourceSets.api.output // Sets the location of the mod's classes resources files('./myResources') // Sets the location of the mod's resources source sourceSets.main // Adds a sourceset to a mod's sources } }
But the exception is still: ` 1: Task failed with an exception.
Where: Build file 'D:\mc\dev-env\build.gradle' line: 45
What went wrong: A problem occurred evaluating root project 'dev-env'.
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.
2: Task failed with an exception.
I am nearly a beginner on gradle, please help, thanks.