The gradle wrapper validator won't work in the machine without internet access
See original GitHub issueTo reproduce it with the latest CI build:
- Turn off your wifi and keep it without internet access.
- Clean up
~/tooling/gradle
, local gradle user home~/.gradle
, and leave all gradle vscode settings to the default value. - Open a sample gradle wrapper project below in VS Code. springbootgradledemo.zip
- You would be prompted about security warning, and click
Trust
to continue. - Even though the LS status is 👍, but actually it fails to import the gradle project. No .classpath is generated. No projects are displayed in the Java Dependency View.
Both GradleProjectImporter and update project configuration failed with exception. See log.txt for more details.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
The Importance of Validating the Gradle Wrapper | JD Porterfield
Protecting your projects from malicious gradle wrappers can be straight-forward, find out how in this article!
Read more >gradle - Android Studio - Unable to find valid certification path ...
Go to The Gradle Console in bottom right and open it.Here you will be seeing some https/https calls ...
Read more >Troubleshooting builds - Gradle User Manual
You can verify the problem is with Gradle scripts by running gradle help which executes configuration scripts, but no Gradle tasks.
Read more >Android Studio needs an Offline Mode option [36976235]
A- cache the latest build gradle version. There's little need to check it for *every* build. B- Or if there's no network (e.g....
Read more >10 Gradle best practices to supercharge your project
If you don't currently have the wrapper in your project, you can add it by running gradle wrapper . Just remember to always...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Related: https://github.com/eclipse/buildship/pull/998
I see, the offline checksum will mitigate the gradle wrapper validator for bad network scenario. But it doesn’t completely solve the offline problem. In fact, gradle wrapper doesn’t really work in OFFLINE, because buildship still needs download the gradle distribution specified by the gradle-wrapper.properties from internet. In OFFLINE mode, only the local gradle home
java.import.gradle.home
works.One improvement I can think of at the moment is polishing the description about the gradle user setting.
For example, JLS provides three user settings about specifying a gradle distribution, but the description is not intuitive.
java.import.gradle.wrapper.enabled
- Enable/disable Gradle wrapper. Defaults totrue
.java.import.gradle.version
- Gradle version, used if the gradle wrapper is missing or disabled.java.import.gradle.home
- Setting for GRADLE_HOMEIf the user specifies the gradle home via
java.import.gradle.home
, this setting might not take effect. Because JLS will check the wrapper setting first, and use wrapper distribution if your project contains gradlew script. In order to use the local gradle home, you must disable wrapper and the fixed gradle version settings at the same. The current user setting doesn’t reflect the implicit relationship of these settings.Another question is about the gradle security, i got new update and will sync up with you offline.