Bassebombecraft

Bassebombecraft

18.5k Downloads

Remapping to 1.17.1 fails with error: Could not find method compile() for arguments....

athrane opened this issue ยท 3 comments

commented

This is part of migration to 1.17.1: Issue #1272.
Remapping to 1.17.1 in issue #1334 fails with error:

`
gradlew -PUPDATE_MAPPINGS_CHANNEL="official" -PUPDATE_MAPPINGS="1.16.5" updateMappings
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.4/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build

Configure project :
This process uses Srg2Source for java source file renaming. Please forward relevant bug reports to https://github.com/MinecraftForge/Srg2Source/issues.
WARNING: This project is configured to use the official obfuscation mappings provided by Mojang. These mapping fall under their associated license, you should be fully aware of this license. For the latest license text, refer below, or the reference copy here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md, You can hide this warning by running the hideOfficialWarningUntilChanged task
WARNING: (c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes, but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here. Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available at https://account.mojang.com/documents/minecraft_eula.

FAILURE: Build failed with an exception.

  • Where:
    Build file 'build.gradle' line: 121

  • What went wrong:
    A problem occurred evaluating root project 'bassebombecraft'.

Could not find method compile() for arguments [{group=org.apache.httpcomponents, name=httpclient, version=4.5.12}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

  • 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.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 13s

`

commented

Solution from Stackoverflow:
Note that the compile, runtime, testCompile, and testRuntime configurations introduced by the Java plugin have been deprecated since Gradle 4.10 (Aug 27, 2018), and were finally removed in Gradle 7.0 (Apr 9, 2021).
The aforementioned configurations should be replaced by implementation, runtimeOnly, testImplementation, and testRuntimeOnly, respectively.

https://stackoverflow.com/questions/23796404/could-not-find-method-compile-for-arguments-gradle

https://stackoverflow.com/questions/67704181/could-not-find-method-compile-for-arguments-in-java

Final solution:

    implementation 'org.apache.httpcomponents:httpclient:4.5.12'
    implementation 'org.apache.httpcomponents:httpcore:4.4.13'    
    implementation 'commons-logging:commons-logging:1.2'            

commented

Line 121 contains:
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.12'

commented

Resolved with commit: 1dde7b1