Hey I am new here, and I need to ask a question about a issue I’m having with Gradle using Visual Studio Code when trying to make a mod for Minecraft. Just wondering if this is the right place to ask for help? Thanks
Well, my personal recommendation would be not to use a fancy text editor, but a proper IDE, especially IntelliJ IDEA.
Other than that, the question is what your question is, for that also refer to https://dontasktoask.com/
Generally, if the question is a Gradle question, it might be fine.
If it is specific about the Gradle support within VSC, you might just not get an answer eventually, depending on whether someone reads your post that is familiar with your post and able and willing to help.
Thank you for the fast reply, so I think it may be something simple but not sure. When I go to open a folder in VSC I see at the bottom it says Gradle Build Error. Below is what it tells me.
* Where:
Initialization script 'C:\Users\PLUNK'~1\AppData\Local\Temp\b33b033d91622d646ce8442a240a1ea8e88b57e8824e089e7e469715fb35c3c4.gradle' line: 3
* What went wrong:
Could not compile initialization script 'C:\Users\PLUNK'~1\AppData\Local\Temp\b33b033d91622d646ce8442a240a1ea8e88b57e8824e089e7e469715fb35c3c4.gradle'.
> startup failed:
initialization script 'C:\Users\PLUNK'~1\AppData\Local\Temp\b33b033d91622d646ce8442a240a1ea8e88b57e8824e089e7e469715fb35c3c4.gradle': 3: Unexpected character: '\'' @ line 3, column 125.
730aa85c931443dbb5a9cf0346.jar')
^
1 error
How can I post the error code without getting the post hidden? The spam bot keeps picking it up?
I don’t know how the spam-bot filters it, but once someone with appropriate powers reviewed it and approved it is not spam, it should be visible. I try to get someone taking action.
Can you show the contents of the file it complained about? (C:\Users\PLUNK'~1\AppData\Local\Temp\b33b033d91622d646ce8442a240a1ea8e88b57e8824e089e7e469715fb35c3c4.gradle
)
But most probably this is a VSC bug.
I guess the Gradle integration in VSC dynamically creates that init script and has some error there.
Sure here is the contents of the file.
initscript {
dependencies {
classpath files('C:/Users/PLUNK'~1/AppData/Local/Temp/76231bf8c8a92e6eef05a0ce788e0a1e64b811730aa85c931443dbb5a9cf0346.jar')
}
}
allprojects {
apply plugin: com.microsoft.gradle.GradlePlugin
}
The problem is with your user directory that contains a single-quote.
The init script the VSC Gradle integration generates puts that path within single-quotes but does not escape the single quote that is present in the path.
This makes the script invalid.
So you should report that as bug to the VSC Gradle integration developers.
As a work-around you would need to use a user directory without single-quotes, or somehow a custom temp directory that is not within your user directory.
I cannot tell you how to achieve the latter, as I have no idea where VSC takes the temp path from. If you are lucky, it looks at the TEMP
environment variable and you can just change that.
So I need to make a new user account on my pc and just have a single user name like mod and install everything on that side and try it? I was thinking it may of been because my username had ’ and separate words in it.
If you cannot rename the user dir, you need a new account, yes.
Or as I said a non-default temp directory.
It’s always a good idea to not have special characters or spaces in the username.
Even nowadays there is software that does not deal well even with spaces in paths.
ok thanks for the help, I will give it a try later on and post an update!