0

I am new to remote development and feel quite confused as the remote device I use is at offline status.

I followed the README doc of the repository and skipped installing SDKMAN(as it is a manegement tool for jdks so I thought it is unnecessary). Then I met problem building it. I ran ./gradlew TASK command in the ternimal and it started downloading gradle. But the remote device I use is totally offline, no network at all.

Besides, there is a small button with gradle icon on the right-top corner, saying Load Gradle Changes \n Gradle project structrue has been changed. Load changes into interlliJ IDEA to make it work correctly. If I click it, it starts downloading gradle.

I have no idea why it downloads gradle, I have gradle on my remote device.

I have installed gradle in the location /opt/gradle/bin/gradle and it works with IDEA. Is there any method to config gradle manually to avoid downloading gradle.zip? Thank you very much!

What I've tried: I downloaded gradle.zip and unzipped it to the workspace. Then I got a folder named gradle-8.0.2, and I renamed it to gradle. At the first time I had done this, downloading was skipped. But the next time I tried building again, it started downloading again.

What I am expecting: I am expecting a solution that allows me to build and run tests without network. Thank you!

aSemy
  • 5,485
  • 2
  • 25
  • 51
Z2001
  • 1
  • 1
  • Have you tried configuring offline mode? https://stackoverflow.com/a/32173484/4161471 https://www.jetbrains.com/help/idea/working-offline.html – aSemy Apr 20 '23 at 15:03
  • 1
    You can install Gradle beforehand and not use the Gradle wrapper at all. Basically, replace all documented instructions containing "./gradlew" with "gradle" and that should work. – fbiville Apr 20 '23 at 15:12
  • @aSemy Thank you, I've tried this method. It seems a correct way but I met another problem about missing dependencies. I think I can handle it myself. – Z2001 Apr 21 '23 at 02:38
  • @fbiville thanks with your solution. But gradle stucks at the initializing process. The progress bar value is 0 all the time. I've installed gradle but it doesn't work and I have no idea – Z2001 Apr 21 '23 at 02:42
  • I see, you'll need to resolve all the dependencies online once, and then you should be able to build offline: https://www.baeldung.com/gradle-offline-mode – fbiville Apr 21 '23 at 13:58

0 Answers0