varabyte / kobweb

A modern framework for full stack web apps in Kotlin, built upon Compose HTML
https://kobweb.varabyte.com
Apache License 2.0
1.46k stars 65 forks source link

Allow `kobweb run` to work in submodules of Gradle projects #73

Closed bitspittle closed 2 years ago

bitspittle commented 2 years ago

Given a project like:

root/
  gradlew
  a/
  b/
  c/d/e/kobweb-site/

this should work:

cd root/c/d/e/kobweb-site
kobweb run

Right now it doesn't because it's looking for gradlew in the current directory. Instead, we should crawl up to see if we can find gradlew in a parent directory instead of giving up immediately.

bitspittle commented 2 years ago

Fix will go out in kobweb 0.7.4

Goregius commented 2 years ago

Instead of searching upwards in the file path which is risky, say there is another gradle file outside of the project. It might be better to have a property in the configuration file listing the root directory, e.g. "../../". Alternatively have a kobwebRun gradle task which does the same thing as kobweb run.

bitspittle commented 2 years ago

By the way there is a gradle task - called kobwebStart, which you can run manually if you want. (Be sure to run it as kobwebStart -t). Then run kobwebStop when you want to shut down the server.

On Mon, Dec 6, 2021, 2:07 AM George Wilkins @.***> wrote:

Instead of searching upwards in the file path which is risky, say there is another gradle file outside of the project. It might be better to have a property in the configuration file listing the root directory, e.g. "../../". Alternatively have a kobwebRun gradle task which does the same thing as kobweb run.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/varabyte/kobweb/issues/73#issuecomment-986623730, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNONAW7MC7S3RC5UUNVOV3UPSDM5ANCNFSM5JM72GLQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.