-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from Konyaco/sync_master_target
Sync master target
- Loading branch information
Showing
87 changed files
with
2,583 additions
and
918 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Deploy Github Pages | ||
on: | ||
push: | ||
branches: [ "master" ] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Run gradle wasmJsBrowserDistribution task | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
- name: Set up Gradle | ||
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | ||
with: | ||
cache-disabled: true | ||
- name: Build wasm target | ||
run: ./gradlew :gallery:wasmJsBrowserDistribution | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
# Upload dist | ||
path: ./gallery/build/dist/wasmJs/productionExecutable | ||
|
||
# Single deploy job since we're just deploying | ||
deploy: | ||
needs: build | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
.gradle/ | ||
.idea/ | ||
build/ | ||
local.properties | ||
*.iml | ||
.gradle | ||
.idea | ||
.kotlin | ||
.DS_Store | ||
build | ||
*/build | ||
captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties | ||
xcuserdata/ | ||
Pods/ | ||
*.jks | ||
*yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
build-plugin/src/main/java/com/konyaco/fluent/plugin/build/BuildExtension.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,51 @@ | ||
package com.konyaco.fluent.plugin.build | ||
|
||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi | ||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl | ||
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension | ||
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType | ||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree | ||
|
||
@OptIn(ExperimentalWasmDsl::class, ExperimentalKotlinGradlePluginApi::class) | ||
fun KotlinMultiplatformExtension.applyTargets(publish: Boolean = true) { | ||
jvm("desktop") | ||
androidTarget { | ||
if (publish) publishLibraryVariants("release") | ||
} | ||
jvmToolchain(BuildConfig.Jvm.jvmToolchainVersion) | ||
wasmJs { browser() } | ||
js { browser() } | ||
iosX64() | ||
iosArm64() | ||
iosSimulatorArm64() | ||
|
||
applyHierarchyTemplate { | ||
sourceSetTrees(KotlinSourceSetTree.main, KotlinSourceSetTree.test) | ||
|
||
common { | ||
group("skiko") { | ||
withCompilations { | ||
it.target.platformType != KotlinPlatformType.androidJvm | ||
} | ||
} | ||
|
||
group("desktopAndAndroid") { | ||
withJvm() | ||
withAndroidTarget() | ||
} | ||
|
||
group("jsAndWasm") { | ||
withJs() | ||
withWasmJs() | ||
} | ||
|
||
group("apple") { | ||
withApple() | ||
} | ||
|
||
group("ios") { | ||
withIos() | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.