Skip to content

Commit

Permalink
WIP: Migrate to Kotlin JS
Browse files Browse the repository at this point in the history
  • Loading branch information
ILIYANGERMANOV committed Apr 23, 2024
1 parent e52fc43 commit 2361862
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_web.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Web (WASM)
name: Build Web (Kotlin JS)

on:
push:
Expand Down Expand Up @@ -30,4 +30,4 @@ jobs:
${{ runner.os }}-gradle-
- name: Build Web distribution
run: ./gradlew :composeApp:wasmJsBrowserDistribution
run: ./gradlew :composeApp:jsBrowserDistribution
4 changes: 2 additions & 2 deletions .github/workflows/deploy_web_github_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ jobs:
${{ runner.os }}-gradle-
- name: Build Web distribution
run: ./gradlew :composeApp:wasmJsBrowserDistribution
run: ./gradlew :composeApp:jsBrowserDistribution

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'composeApp/build/dist/wasmJs/productionExecutable'
path: 'composeApp/build/dist/js/productionExecutable'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 7 additions & 1 deletion buildSrc/src/main/kotlin/ivy.shared-module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ plugins {
}

kotlin {
js()
js {
browser {
}
binaries.executable()
}

androidTarget {
compilations.all {
kotlinOptions {
Expand All @@ -17,7 +24,6 @@ kotlin {
iosSimulatorArm64()

jvm()
js()

sourceSets {
jvmTest.dependencies {
Expand Down
7 changes: 7 additions & 0 deletions composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ plugins {
}

kotlin {
js()
js {
browser {
}
binaries.executable()
}

androidTarget {
compilations.all {
kotlinOptions {
Expand Down
2 changes: 1 addition & 1 deletion scripts/runWebApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ if [ ! -f "settings.gradle.kts" ]; then
exit 1
fi

./gradlew :composeApp:wasmJsBrowserDevelopmentRun
./gradlew :composeApp:jsBrowserDevelopmentRun

0 comments on commit 2361862

Please sign in to comment.