Skip to content
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

Rewrite #1

Merged
merged 11 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .fleet/receipt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Project generated by Kotlin Multiplatform Wizard
{
"spec": {
"template_id": "kmt",
"targets": {
"web": {
"ui": [
"compose"
]
}
}
},
"timestamp": "2024-02-16T06:46:50.981192499Z"
}
14 changes: 7 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ jobs:
name: Test and Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Setup Java 17 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Grant execute permission for gradlew
if: ${{ runner.os != 'Windows' }}
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Execute Gradle build
run: ./gradlew wasmJsBrowserDistribution

# If main branch update, deploy to gh-pages
- name: Deploy
Expand All @@ -28,5 +28,5 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: build/dist/js/productionExecutable # The folder the action should deploy.
folder: composeApp/build/dist/wasmJs/productionExecutable # The folder the action should deploy.
clean: true # Automatically remove deleted files from the deploy branch
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,16 @@ bin/
.DS_Store

.idea/
**/build/
xcuserdata
!src/**/build/
local.properties
captures
.externalNativeBuild
.cxx
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcodeproj/project.xcworkspace/
!*.xcworkspace/contents.xcworkspacedata
**/xcshareddata/WorkspaceSettings.xcsettings
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OverrunGL Artifacts Customizer
# OverrunGL Modules Customizer

[![pages-build-deployment](https://github.com/Over-Run/overrungl-gen/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/Over-Run/overrungl-gen/actions/workflows/pages/pages-build-deployment)

The customizer for OverrunGL is available on [GitHub](https://over-run.github.io/overrungl-gen/).
The customizer for [OverrunGL](https://github.com/Over-Run/overrungl) is available on [GitHub](https://over-run.github.io/overrungl-gen/).
65 changes: 4 additions & 61 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,63 +1,6 @@
plugins {
kotlin("multiplatform") version "1.9.0"
application
}

group = "io.github.over-run"
version = "0.2.2"

repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven")
}

kotlin {
jvm {
jvmToolchain(17)
withJava()
}
js {
binaries.executable()
browser {
commonWebpackConfig {
cssSupport {
enabled.set(true)
}
}
}
}
sourceSets {
val commonMain by getting
val commonTest by getting
val jvmMain by getting {
dependencies {
implementation("io.ktor:ktor-server-netty:2.0.2")
implementation("io.ktor:ktor-server-html-builder-jvm:2.0.2")
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2")
}
}
val jvmTest by getting
val jsMain by getting {
dependencies {
implementation("org.jetbrains.kotlin-wrappers:kotlin-react:18.2.0-pre.346")
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom:18.2.0-pre.346")
implementation("org.jetbrains.kotlin-wrappers:kotlin-emotion:11.9.3-pre.346")
}
}
val jsTest by getting
}
}

application {
mainClass.set("io.github.overrun.application.ServerKt")
}

tasks.named<Copy>("jvmProcessResources") {
val jsBrowserDistribution = tasks.named("jsBrowserDistribution")
from(jsBrowserDistribution)
}

tasks.named<JavaExec>("run") {
dependsOn(tasks.named<Jar>("jvmJar"))
classpath(tasks.named<Jar>("jvmJar"))
// this is necessary to avoid the plugins to be loaded multiple times
// in each subproject's classloader
alias(libs.plugins.jetbrainsCompose) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
}
40 changes: 40 additions & 0 deletions composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import org.jetbrains.compose.ExperimentalComposeLibrary
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl

plugins {
alias(libs.plugins.kotlinMultiplatform)

alias(libs.plugins.jetbrainsCompose)
}

kotlin {
@OptIn(ExperimentalWasmDsl::class)
wasmJs {
moduleName = "composeApp"
browser {
commonWebpackConfig {
outputFileName = "composeApp.js"
}
}
binaries.executable()
}

sourceSets {

commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.ui)
@OptIn(ExperimentalComposeLibrary::class)
implementation(compose.components.resources)
}
}
}



compose.experimental {
web.application {}
}
Loading