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.

Making an executable without a build.gradle file

See original GitHub issue

Would be nice if the required build.gradle was generated if it’s absent. For example if I have a project with only one .kts script, adding a build.gradle seems excessive. Maybe some functionality of --idea option could be reused to generate a temporary build.gradle file?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
holgerbrandlcommented, Oct 8, 2020

Indeed, the build.gradle is auto-generated by kscript. But until now, we do not install gradle (which imho would be bad practise), but assume the user has installed this already. You can do so easily, e.g. with sdk with

sdk install gradle

Maybe the error could be more descriptive here.

0reactions
serpro69commented, Oct 8, 2020

I’m most definitely sure I did 😃 And I’m getting an error (which is why I raised this issue in the first place):

✓ kscript --package script.kts
[kscript] [ERROR] gradle is required to package kscripts

Though now that I read it more carefully I think it means “gradle distribution”, not “gradle build file” 😄 Not sure why I made that assumption in the first place.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to build not executable jar (library) with Spring Boot ...
You can use this line in build.gradle: apply plugin: 'java-library' . Spring Boot Plugin automatically will not create start up class for ...
Read more >
Working With Files - Gradle User Manual
Almost every Gradle build interacts with files in some way: think source files ... You copy a file by creating an instance of...
Read more >
Build Script Basics - Gradle User Manual
You run a Gradle build using the gradle command. The gradle command looks for a file called build.gradle in the current directory. ......
Read more >
Building native software - Gradle User Manual
For an executable component, Gradle can produce executable binary files. For a library component, Gradle can produce both static and shared library binary...
Read more >
The Gradle Wrapper - Gradle User Manual
The recommended way to execute any Gradle build is with the help of the Gradle Wrapper (in short just “Wrapper”). The Wrapper is...
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