question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

kobaltw --init kotlin failes to download kobalt zip

See original GitHub issue

I am using: Ubuntu 16.04 with the latest updates installed. openjdk 11.0.3 2019-04-16 LTS - installed via SDKMAN Kotlin version 1.3.40-release-123 (JRE 11.0.3+7-LTS) - installed via SDKMAN

I just downloaded kobalt for the first time (1.0.123), unzipped it, and added it to my path. From my project directory (it’s a kotlin project), I ran kobaltw --init kotlin, and here is the output:

[Wrapper] Warning: couldn't download https://beust.com/kobalt/kobalt-1.0.123.zip
[Wrapper] Warning: couldn't download https://beust.com/kobalt/kobalt-1.0.123.zip
[Wrapper] Warning: couldn't download https://beust.com/kobalt/kobalt-1.0.123.zip
Exception in thread "main" java.nio.file.NoSuchFileException: /home/jesse/.kobalt/wrapper/dist/kobalt-1.0.123.zip
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
	at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
	at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:145)
	at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
	at java.base/java.nio.file.Files.readAttributes(Files.java:1763)
	at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1225)
	at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:727)
	at java.base/java.util.zip.ZipFile$CleanableResource.get(ZipFile.java:844)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:247)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:177)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:191)
	at com.beust.kobalt.wrapper.Main.extractZipFile(Main.java:335)
	at com.beust.kobalt.wrapper.Main.installDistribution(Main.java:188)
	at com.beust.kobalt.wrapper.Main.installAndLaunchMain(Main.java:81)
	at com.beust.kobalt.wrapper.Main.main(Main.java:17)

Despite the error, a few changes to my files did appear. My project directory now has a kobalt/ directory with a wrapper/ subdirectory with a kobalt-wrapper.properties file inside. I also notice my home directory has a .kobalt/ directory with a wrapper/ subdirectory with a dist/ subdirectory (where it was trying to download the zip), but there are no files or anything else there.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
cbeustcommented, Jul 5, 2020

That’s a great rant 😃

I still think Kobalt has a more tractable DSL and plug-in model overall, but obviously, I’m biased. I just can’t dedicate that much time on it any more, unless it starts gaining traction, which is probably unlikely.

Just today, and these past two days, I’ve had to wrestle with Gradle’s arcane build syntax and all its caveats and oddities, copy/pasting snippets of build files from StackOverflow in the hope that it will work (9/10 times, it doesn’t because these answers are obsolete and Gradle introduced breaking changes since then). Even maintaining the Google search results to just the past year yields outdated answers. It’s maddening.

Anyway. Sorry you are being frustrated, I am too. I hate yak shaving. I want to write code and have tools magically work. But that seems to be too much to ask in 2020.

There’s always 2025.

1reaction
cbeustcommented, Jul 20, 2019

Fixed in 1.0.125. Your next ./kobaltw assemble should update to 1.0.125 and fix that problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kobalt: a modern, versatile build system by Cedric Beust
The build file is located in kobalt/src/Built.kt and it is a valid Kotlin file. ... The zip directive follows a similar structure, although...
Read more >
Anyone know solution of error in attached Image If i run and
Seems like an issue with accessing gradle distribution files stored in the user profile. Check if "Gradle User Home" is correctly set in...
Read more >
Kotlin · Open Android - Andrew Chen (@yongjhih)
特點:. null-safety / Optional 最佳解決方案。 ?: 語法簡潔 for ((key, value) in map); AutoValue? lambdas setOnClickListener { finish ...
Read more >
Kotlin Language Documentation
Download and install Android Studio 3.0, which includes Kotlin support ... preserve-class-initialization – generate Java-like bytecode for ...
Read more >
Kotlin Language Documentation - CodeChef
Download an install Android Studio 3.0, which includes Kotlin support ... preserve-class-initialization – generate Java-like bytecode for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found