Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
43d57ff
The first commit of app-desktop, only saying Hello
nyafunta9858 Aug 12, 2024
3e0df69
Merge branch 'DroidKaigi:main' into feature/300-app-desktop
nyafunta9858 Aug 12, 2024
607adcf
Update JetBrains Compose Plugin's version to resolve java.lang.Unsati…
nyafunta9858 Aug 13, 2024
9741de3
Rename main class from MainKt to MainApplicationKt
nyafunta9858 Aug 13, 2024
54a7819
Import design system module to app-desktop and adapt its theme
nyafunta9858 Aug 14, 2024
5a4e4e5
Merge remote-tracking branch 'origin/main' into feature/300-app-desktop
nyafunta9858 Aug 14, 2024
4218ab3
add a comment
nyafunta9858 Aug 15, 2024
8364a30
Revert definitions to apply plugins
nyafunta9858 Aug 15, 2024
f3ab59e
Add actual method that was added when merge from main branch
nyafunta9858 Aug 15, 2024
2b81c43
Add compose.desktop.packaging.checkJdkVendor=false to gradle.properti…
nyafunta9858 Aug 16, 2024
331327c
fix detekt
nyafunta9858 Aug 16, 2024
0ebae38
Merge branch 'main' into feature/300-app-desktop
nyafunta9858 Aug 16, 2024
b1f3452
Merge branch 'main' into feature/300-app-desktop
nyafunta9858 Aug 18, 2024
6345f98
Remove the dependencies to navigation compose from desktop app module.
nyafunta9858 Aug 24, 2024
1b854b3
Merge remote-tracking branch 'refs/remotes/origin/feature/300-app-des…
nyafunta9858 Aug 24, 2024
d5ee8a4
Merge branch 'main' into feature/300-app-desktop
nyafunta9858 Aug 24, 2024
d9e6907
Merge remote-tracking branch 'origin/main' into feature/300-app-desktop
nyafunta9858 Sep 6, 2024
1e99748
Merge branch 'main' into feature/300-app-desktop
nyafunta9858 Sep 7, 2024
6b433cd
Resolve a crash immediately after launch the desktop app.
nyafunta9858 Sep 7, 2024
4eea845
Optimize dependencies on KmpDesktopPlugin
nyafunta9858 Sep 7, 2024
7742e5f
Merge pull request #452 from nyafunta9858/feature/300-app-desktop
takahirom Sep 8, 2024
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
18 changes: 18 additions & 0 deletions app-desktop/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
plugins {
id("droidkaigi.primitive.kmp.desktop")
}

kotlin {
sourceSets {
commonMain {
dependencies {
implementation(libs.kotlinxCoroutinesCore)
}
}
desktopMain {
dependencies {
implementation(libs.kotlinxCoroutinesSwing)
}
}
}
}
Binary file added app-desktop/iconFiles/desktop-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package io.github.droidkaigi.confsched

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application

fun main() {
application {
Window(
onCloseRequest = ::exitApplication,
title = "KaigiApp",
) {
MaterialTheme {
Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally) {
Text("Hello KaigiApp!")
}
}
}
}
}
4 changes: 4 additions & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ gradlePlugin {
id = "droidkaigi.primitive.kmp.compose"
implementationClass = "io.github.droidkaigi.confsched.primitive.KmpComposePlugin"
}
register("kotlinMppDesktop") {
id = "droidkaigi.primitive.kmp.desktop"
implementationClass = "io.github.droidkaigi.confsched.primitive.KmpDesktopPlugin"
}
register("kotlinMppRoborazzi") {
id = "droidkaigi.primitive.kmp.roborazzi"
implementationClass = "io.github.droidkaigi.confsched.primitive.KmpRoborazziPlugin"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
package io.github.droidkaigi.confsched.primitive

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.get
import org.jetbrains.compose.desktop.application.dsl.TargetFormat

@Suppress("unused")
class KmpDesktopPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {

with(pluginManager) {
apply("droidkaigi.primitive.kmp")
apply("droidkaigi.primitive.kmp.compose")
}

kotlin {
jvm("desktop")

with(sourceSets) {
getByName("desktopMain").apply {
dependencies {
implementation(compose.dependencies.desktop.currentOs)
}
}
}
}

val compose = extensions["compose"] as org.jetbrains.compose.ComposeExtension
compose.extensions.configure<org.jetbrains.compose.desktop.DesktopExtension> {
application {
mainClass = "io.github.droidkaigi.confsched.DesktopKaigiAppKt"

nativeDistributions {
// TODO: set output formats of each platform
targetFormats(TargetFormat.Dmg, /*TargetFormat.Msi, TargetFormat.Deb*/)
packageName = "io.github.droidkaigi.confsched"
packageVersion = "1.0.0"

val iconsRoot = project.file("iconFiles")
macOS {
// TODO: set an icon file ( set a temporal icon currently. )
iconFile.set(iconsRoot.resolve("desktop-icon.png"))
}
// Setup Windows and Linux configuration if needed.
// windows {
// iconFile.set(iconsRoot.resolve("icon-windows.ico"))
// menuGroup = "Compose Examples"
// // see https://wixtoolset.org/documentation/manual/v3/howtos/general/generate_guids.html
// upgradeUuid = "18159995-d967-4CD2-8885-77BFA97CFA9F"
// }
// linux {
// iconFile.set(iconsRoot.resolve("icon-linux.png"))
// }
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.github.droidkaigi.confsched.designsystem.theme

import androidx.compose.runtime.Composable
import androidx.compose.ui.text.font.FontFamily
import conference_app_2024.core.designsystem.generated.resources.dot_gothic16_regular
import io.github.droidkaigi.confsched.designsystem.DesignSystemRes
import org.jetbrains.compose.resources.Font

@Composable
actual fun dotGothic16FontFamily(): FontFamily = FontFamily(
Font(DesignSystemRes.font.dot_gothic16_regular),
)
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ kotlin.incremental.native=true
# kotlin debug
#kotlin.compiler.execution.strategy=in-process

# desktop
# https://github.com/JetBrains/compose-multiplatform/issues/3107
compose.desktop.packaging.checkJdkVendor=false

# roborazzi
roborazzi.test.record=true
roborazzi.record.namingStrategy=testClassAndMethod
Expand Down
6 changes: 5 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kotlin = "2.0.10"
androidxCore = "1.13.1"
androidDesugarJdkLibs = "2.0.4"
compose = "2024.09.00"
composeMultiplatform = "1.7.0-alpha02"
composeMultiplatform = "1.7.0-alpha03"
rin = "0.1.0"
composeInvestigator = "1.5.10-0.2.1"
composeMaterial3 = "1.3.0"
Expand Down Expand Up @@ -90,6 +90,9 @@ kotlinxCollectionsImmutable = { module = "org.jetbrains.kotlinx:kotlinx-collecti
kotlinxDatetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = "0.6.0" }
kotlinxAtomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version = "0.23.2" }

# for Desktop
kotlinxCoroutinesSwing = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-swing", version.ref = "kotlinxCoroutines" }

# UI

composeBom = { module = "androidx.compose:compose-bom", version.ref = "compose" }
Expand Down Expand Up @@ -194,6 +197,7 @@ composeInvestigatorGradlePlugin = { id = "land.sungbin.composeinvestigator:compi
kotlinxKover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
detektGradlePlugin = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
ossLicensesPlugin = { id = "com.google.android.gms.oss-licenses-plugin", version.ref = "ossLicensesPlugin" }
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" }

[bundles]
plugins = [
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ rootProject.name = "conference-app-2024"
include(
":app-android",
":app-ios-shared",
":app-desktop",
":feature:main",
":feature:sessions",
":feature:contributors",
Expand Down