MacOS deployment fails when main class is in a different package
- Dominant language
- Kotlin
- Stars
- 3k
- Forks
- 148
- Avg merge
- 13h 44m
- Merged PRs (30d)
- 1
Description
Good morning!
I've found the following issue
**Given** the `Hello world!` project
**And** the `main.kt` file is moved to a different package `com.demo`
**And** the `korge.jvmMainClassName` is set to `com.demo.MainKt`
**And** run the MacOS deployment command as follows `./gradlew clean packageJvmMacosApp`
**When** running the `build/platforms/jvm-macos/game` app
**Then**
- **Expected**: it runs correctly the `Hello World!` game
- **Actual**: it try to opens but crashes
**Additional information**
When running the generated jar file with the command `java -jar build/libs/korge-hello-world-all.jar` it works correctly.
Based on that, my assumption is that the problem is only related to the MacOS deployment in this case.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue in the Hello world project by moving main.kt to com.demo, setting korge.jvmMainClassName to com.demo.MainKt, and running ./gradlew clean packageJvmMacosApp. Compare the generated build/platforms/jvm-macos/game app with the working build/libs/korge-hello-world-all.jar. Done means the packaged macOS app launches and runs the game when the main class is in another package.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, macos
- Domain
- build-system, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100