athrane / bassebombecraft

Bassebombecraft Minecraft Mod
https://www.curseforge.com/minecraft/mc-mods/bassebombecraft
GNU General Public License v3.0
0 stars 0 forks source link

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

Closed athrane closed 2 years ago

athrane commented 2 years ago

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.

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

`

athrane commented 2 years ago

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

athrane commented 2 years ago

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'            
athrane commented 2 years ago

Resolved with commit: https://github.com/athrane/bassebombecraft/commit/1dde7b17adbf85e5d1619d8f8bd972de9d33d8af