Skip to content

Commit

Permalink
Merge pull request #27 from easternkite/develop
Browse files Browse the repository at this point in the history
0.2.0
  • Loading branch information
easternkite authored Oct 21, 2024
2 parents b77d9cf + 74ebcf2 commit d2087f7
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 8 deletions.
10 changes: 7 additions & 3 deletions eungabi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ kotlin {
}
}
}


jvm("desktop")

listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
iosSimulatorArm64(),
macosX64(),
macosArm64()
).forEach {
it.binaries.framework {
baseName = "eungabi"
Expand Down Expand Up @@ -74,7 +78,7 @@ val androidSourceJar by tasks.registering(Jar::class) {

val GROUP_ID = "io.github.easternkite"
val ARTIFACT_ID = "eungabi"
val VERSION = "0.1.0-alpha01"
val VERSION = "0.2.0"

mavenPublishing {
coordinates(GROUP_ID, ARTIFACT_ID, VERSION)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2024 easternkite
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.easternkite.eungabi.navigation

import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier

@Composable
actual fun EunGabiNavHost(
modifier: Modifier,
controller: EunGabiController,
startDestination: String,
transitionState: EunGabiTransitionState,
predictiveBackTransition: EunGabiPredictiveState,
builder: EunGabiGraphBuilder.() -> Unit
) {
EunGabiNavHostInternal(
modifier = modifier,
startDestination = startDestination,
navTransition = transitionState,
predictiveBackTransition = predictiveBackTransition,
controller = controller,
builder = builder
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright 2024 easternkite
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.easternkite.eungabi.utils

import java.util.UUID

actual val randomUuid: String get() = UUID.randomUUID().toString()
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2024 easternkite
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.easternkite.eungabi.navigation

import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier

@Composable
actual fun EunGabiNavHost(
modifier: Modifier,
controller: EunGabiController,
startDestination: String,
transitionState: EunGabiTransitionState,
predictiveBackTransition: EunGabiPredictiveState,
builder: EunGabiGraphBuilder.() -> Unit
) {
EunGabiNavHostInternal(
modifier = modifier,
startDestination = startDestination,
navTransition = transitionState,
predictiveBackTransition = predictiveBackTransition,
controller = controller,
builder = builder
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright 2024 easternkite
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.easternkite.eungabi.utils

import platform.Foundation.NSUUID

actual val randomUuid: String get() = NSUUID.UUID().UUIDString
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ android.nonTransitiveRClass=true
kotlin.apple.xcodeCompatibility.nowarn=true
kotlin.mpp.androidGradlePluginCompatibility.nowarn=true

org.jetbrains.compose.experimental.macos.enabled=true
10 changes: 6 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
[versions]
agp = "8.6.1"
kotlin = "2.0.20"
kotlin = "2.0.21"
coreKtx = "1.13.1"
compose = "1.7.2"
compose = "1.7.4"
compose-material3 = "1.3.0"
cmp-plugin = "1.7.0-rc01"
androidx-activityCompose = "1.9.2"
cmp-plugin = "1.7.0"
androidx-activityCompose = "1.9.3"
lifecycleRuntimeKtx = "2.8.6"
cupertino = "0.1.0-alpha04"
nexus-publish = "0.29.0"
uri-kmp = "0.0.18"
napier = "2.7.1"
kotlinx-coroutines = "1.9.0"

[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
Expand All @@ -22,6 +23,7 @@ compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref =
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" }
kotlinx-coroutines-swing = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-swing", version.ref = "kotlinx-coroutines" }

uri = { module = "com.eygraber:uri-kmp", version.ref = "uri-kmp" }
napier = { module = "io.github.aakira:napier", version.ref = "napier"}
Expand Down
23 changes: 22 additions & 1 deletion shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ kotlin {
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
iosSimulatorArm64(),
macosArm64(),
macosX64()
).forEach {
it.binaries.framework {
baseName = "shared"
Expand All @@ -26,7 +28,12 @@ kotlin {
}
}

jvm("desktop")


sourceSets {
val desktopMain by getting

commonMain.dependencies {
api(projects.eungabi)
implementation(compose.ui)
Expand All @@ -35,12 +42,26 @@ kotlin {
implementation(compose.material3)
implementation(compose.components.resources)
}
desktopMain.dependencies {
implementation(compose.desktop.macos_arm64)
implementation(libs.kotlinx.coroutines.swing)
}
commonTest.dependencies {
implementation(libs.kotlin.test)
}
}
}

compose.desktop {
application {
mainClass = "com.easternkite.eungabi.MainKt"
}
}

dependencies {
debugImplementation(compose.uiTooling)
}

compose.resources {
publicResClass = false
packageOfResClass = "com.easternkite.sample.resources"
Expand Down
13 changes: 13 additions & 0 deletions shared/src/desktopMain/kotlin/com/easternkite/eungabi/main.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.easternkite.eungabi

import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application

fun main() = application {
Window(
onCloseRequest = ::exitApplication,
title = "Eungabi-Sample",
) {
SampleApp()
}
}

0 comments on commit d2087f7

Please sign in to comment.