Repository navigation
feat: add workflow for building desktop application #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,33 @@ | ||||||||||
| name: Build Desktop | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| push: | ||||||||||
| branches: | ||||||||||
| - main | ||||||||||
| paths-ignore: | ||||||||||
| - '**.md' | ||||||||||
| pull_request: | ||||||||||
|
|
||||||||||
| concurrency: | ||||||||||
| group: ${{ github.workflow }}-${{ github.ref }} | ||||||||||
| cancel-in-progress: true | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| build: | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
|
|
||||||||||
| steps: | ||||||||||
| - name: Checkout | ||||||||||
| uses: actions/checkout@v6 | ||||||||||
|
|
||||||||||
| - name: Setup Java | ||||||||||
| uses: actions/setup-java@v5 | ||||||||||
| with: | ||||||||||
| java-version: '21' | ||||||||||
| distribution: 'temurin' | ||||||||||
|
|
||||||||||
| - name: Setup Gradle | ||||||||||
| uses: gradle/actions/setup-gradle@v5 | ||||||||||
|
|
||||||||||
| - name: Build with Gradle | ||||||||||
| run: ./gradlew composeApp:jvmJar | ||||||||||
|
||||||||||
| run: ./gradlew composeApp:jvmJar | |
| run: sh gradlew composeApp:jvmJar |
Copilot
AI
Dec 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Gradle task composeApp:jvmJar appears to be incorrect for building a Compose Desktop application. According to the project's AGENTS.md documentation (line 57), the correct task for desktop is ./gradlew run. For CI/CD purposes where you want to build the desktop application, you should use one of the following tasks:
packageDistributionForCurrentOS- to create a native distribution package for the current OScreateDistributable- to create a distributable applicationjvmJar(without thecomposeApp:prefix) - to build just the JAR
The task composeApp:jvmJar is not a standard Compose Desktop task and is not referenced anywhere in the project configuration. Consider using ./gradlew packageDistributionForCurrentOS or ./gradlew createDistributable for a complete build.
| run: ./gradlew composeApp:jvmJar | |
| run: ./gradlew packageDistributionForCurrentOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a Java version mismatch between the workflow and the project configuration. The workflow specifies Java 21, but the Android target in composeApp/build.gradle.kts (lines 21-23, 137-139) is configured to use Java 11 (JVM_11 and JavaVersion.VERSION_11). While Java 21 can compile Java 11 bytecode, this mismatch could lead to unexpected issues or inconsistencies.
Consider either:
For a desktop-only build workflow, Java 21 might be acceptable if the JVM target doesn't involve Android compilation.