vscode-gradle: Fails on class import in included sript for custom repositoty
Extension Name: vscode-gradle Extension Version: v3.12.4 OS Version: openSUSE Leap 15.3 VSCode version:1.71.2
Describe the bug Extension don’t treate custom repository inside included script. It fails on an import resolution.
To Reproduce
I created little sample project.
It fails for VSCode plugin, but succeed if I run gradle build in terminal.
In same time, if you move content of included script to the main script instead of apply
command and removes the issue
file, the problem disapears.
Expected behavior No errors in IDE.
Screenshots
Output from “Gradle for Java”
[info] [gradle-server] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
[info] [gradle-server] Server started, listening on 38183
[info] Gradle client connected to server
[info] Java Home: /usr/lib64/jvm/java-11-openjdk-11
[info] JVM Args: --add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,--add-opens,java.base/java.nio.charset=ALL-UNNAMED,--add-opens,java.base/java.net=ALL-UNNAMED,--add-opens,java.base/java.util.concurrent.atomic=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant
[info] Gradle User Home: /home/olga/.gradle
[info] Gradle Version: 7.5.1
[info] CONFIGURE SUCCESSFUL in 10s
[info] Found 18 tasks
Does the bug still exist if you disable all other extensions? Yes
Additional context I put fake auth params in repository, but in the localhost I use real authentication. There are no problem with custome repository.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 18
OK, thank you for pointing me the entry points. I just finish with my urgent tasks in my work and I will tryto find solution.
No, there is no problem in Gradle, thus following case is working there:
About your link: vscode-gradle/gradle-plugin/src/main/java/com/microsoft/gradle/GradleProjectModelBuilder.java
I will review the source code of the plugin, and together we will think how to fix the issue. I will try to end up tomorrow with it.
thanks for the detail explanation! I’ll take a look tomorrow
Hi! Are you sure I need use the configuration you provide there? We don’t have any proxy… And I doubt I have auth problems, thus I don’t have problem when I put
buildscript
block in the root.OK, may be I didn’t explain my self well.
This follow two screenshots are OK situation.
build.gradle file
db.gradle file
This follow two screenshots are BAD sitation.
build.gradle file
db.gradle file
I just want put
buildscript
insidedb.gradle
file and not inbuild.gradle
.OK, I just changed actual paths. Another thing: we have our own network, and even real paths will not acceptable outside. I will create such packages latter on GitHub, for you will able to reproduce the issue.