Pokechu22/WorldDownloader

Gradle Help

KitsuTheFloof opened this issue · 29 comments

I have no idea how to use gradle or whatever to install the mod.. there's no clear instructions really.
I installed BGradle
&
WorldDownloader Repo
I just don't know what to do next

Open a command-prompt window and use cd to go into the directory for begradle (if you don't know how to use command prompt, I can give further instructions). Then type "gradlew install", which will install begradle.

After that, use cd to go into the directory for the WDL repo. Then type gradlew setupDecompWorkspace build. That should eventually build everything after a few minutes, and the built files will be in the libs folder in the WDL repo.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\WINDOWS\system32> cd C:\Users\Casey\Desktop\grad\ForgeGradle-extensions-master
PS C:\Users\Casey\Desktop\grad\ForgeGradle-extensions-master> gradlew install
gradlew : The term 'gradlew' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • gradlew install
  •   + CategoryInfo          : ObjectNotFound: (gradlew:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    
    

Suggestion [3,General]: The command gradlew was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\gradlew". See "get-help about_Command_Precedence" for more details.
PS C:\Users\Casey\Desktop\grad\ForgeGradle-extensions-master> gradlew install
gradlew : The term 'gradlew' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • gradlew install
  •   + CategoryInfo          : ObjectNotFound: (gradlew:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    
    

Suggestion [3,General]: The command gradlew was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\gradlew". See "get-help about_Command_Precedence" for more details.
PS C:\Users\Casey\Desktop\grad\ForgeGradle-extensions-master>

Ah, you're using powershell. Try gradlew.bat install instead, maybe?

You shouldn't need to install gradle directly; gradlew handles that for you.

PS C:\Users\Casey\Desktop\grad\ForgeGradle-extensions-master> gradlew.bat install
gradlew.bat : The term 'gradlew.bat' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • gradlew.bat install
  •   + CategoryInfo          : ObjectNotFound: (gradlew.bat:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    
    

Suggestion [3,General]: The command gradlew.bat was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\gradlew.bat". See "get-help about_Command_Precedence" for more details.
PS C:\Users\Casey\Desktop\grad\ForgeGradle-extensions-master>

?

Ah, try .\gradlew.bat install then?

  • What went wrong:
    Execution failed for task ':BEGradle-fg2:compileJava'.

Could not find tools.jar. Please check that C:\Program Files (x86)\Java\jre1.8.0_311 contains a valid JDK installation.

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

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 9s
1 actionable task: 1 executed
PS C:\Users\Casey\Desktop\grad\ForgeGradle-extensions-master>

Do I need to install gradle or something? Cuz I'm not sure why gradlew install isn't working like is there something you guys installed or something?

You need to install the JDK, which you can download from https://adoptium.net/ (select "Temurin 8 (LTS)"). You don't need to install gradle, though (and if you do install gradle from their website, you'll probably get a newer version which won't work right).

You need to install the JDK, which you can download from https://adoptium.net/ (select "Temurin 8 (LTS)"). You don't need to install gradle, though (and if you do install gradle from their website, you'll probably get a newer version which won't work right).

3.11 or 3.12? I have jre1.8.0_311

You have jre1.8.0_311 (Java Runtime Environment); you need the jdk (Java Development Kit). 312 versus 311 isn't a big deal (though it does need to be 8 and not 11 or 17).

I installed JDK from the link you gave me, do I need to change the directory of JDK or no

I think that you can now run .\gradlew.bat install and it'll find the JDK, but if it gives the same error message I'll explain how to tell it where to find the JDK.

  • What went wrong:
    Execution failed for task ':BEGradle-fg2:compileJava'.

Could not find tools.jar. Please check that C:\Program Files (x86)\Java\jre1.8.0_311 contains a valid JDK installation.

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

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2s
1 actionable task: 1 executed
PS C:\Users\Casey\Desktop\grad\ForgeGradle-extensions-master>

...

Also how come none of this is explained in any of the readme?

OK, what you want to do is create a gradle.properties file in the .gradle folder in your user directory. The easiest way to do this is by opening a new powershell window and running notepad .gradle\gradle.properties; notepad should prompt you to create the file. (If it instead says "The system cannot find the path specified.", close notepad, then run mkdir .gradle, then run notepad .gradle\gradle.properties).

Paste the following into the file:

org.gradle.java.home=C:\\Program Files\\Eclipse Adoptium\\jdk-8.0.312.7-hotspot
org.gradle.daemon=false

(You may need to change the path, but I think that one is correct for the most recent version. Note the use of two backslashes.)

Then you should be able to use the ./gradlew.bat install command in BEgradle as I previously mentioned.

Also how come none of this is explained in any of the readme?

I did the initial gradle setup once years ago and never needed to do it since then, and a lot of the steps are ones that apply (or applied when I initially wrote the readme) for building any mod. They're probably things that should be in the readme, but I never wrote them down.

this is a lot of steps.. I thought it was supposed to be one simple command..

Once things are installed, it is one simple command, but that only really helps for building again after you've already built it once.

Once things are installed, it is one simple command, but that only really helps for building again after you've already built it once.

Can you just make the jar files instead of having us compile it..?

There are pre-compiled versions (scroll to the bottom of https://github.com/Pokechu22/WorldDownloader/releases/tag/v4.1.1.0 for instance)

Can you message me again (either from the same account or a new one)? I can follow up there.

if I can remember the account haha...

Was it planetminecraft or

minecraftforum.net.

May have deleted my account acidentally not sure.

Also 1 warning

Task :LaunchWrapperTestSuite:processResources NO-SOURCE
Task :LaunchWrapperTestSuite:classes
Task :LaunchWrapperTestSuite:jar
Task :LaunchWrapperTestSuite:javadoc
Task :LaunchWrapperTestSuite:javadocJar
Task :LaunchWrapperTestSuite:sourceJar
Task :LaunchWrapperTestSuite:install

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 1m 3s

May have deleted my account acidentally not sure.

Feel free to create a new account, then; it's easier to handle more sensitive matters there.

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

Yeah, that warning always shows up; that's why the gradle wrapper is used (it ensures a version of gradle before 5.0 is used). It's still a problem for the future, but not something that you need to worry about.

Yeah will probably have to make a new account. Do you have the bypass for 1.16.4 and furter?

I can help you with that, but we'll need to discuss that further via DMs so that I can understand more about your specific case and what you need. It's an individual thing; I don't like to discuss that on GitHub issues.

My account is there apparently still anyways just messaged you