I am a new programmer to Gradle and Minecraft modding. I tried to set up the Minecraft forge build.gradle file using command
./gradlew genVSCodeRuns
in the command line of VSCode. Every time it failed in the process of downloading two required files with this kind of error message:
> Could not download icu4j-66.1.jar (com.ibm.icu:icu4j:66.1)
> Could not get resource 'https://maven.minecraftforge.net/com/ibm/icu/icu4j/66.1/icu4j-66.1.jar'.
> Premature end of Content-Length delimited message body (expected: 12,935,630; received: 6,397,856)
As I thought this was due to the internet problem, I tried to download the two required jar files to local and saved them in the libs folder. However, as I tried to implement them before Gradle started to download them automatically using the following script, Gradle kept on downloading them.
dependencies {
implementation fileTree(dir:'libs',includes:['*jar'])
}
And I am now wondering what is the correct script to use these downloaded jar files as cache and prevent the build.gradle from downloading them again.
I viewed similar questions and do not know where to place my cache files. Only if I place the cache files correctly can I use the offline mode of Gradle to build the project.