Skip to content

Commit

Permalink
分离 py 模块
Browse files Browse the repository at this point in the history
  • Loading branch information
xfqwdsj committed May 2, 2024
1 parent 27e8ea4 commit 37143c7
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 5 deletions.
5 changes: 3 additions & 2 deletions client-py/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ project.version = projectVersion

kotlin {
val defaultSharedLibConfigure: SharedLibrary.() -> Unit = {
export(project(":py"))
export(project(":py-common"))
}

linuxArm64 {
Expand Down Expand Up @@ -68,7 +68,8 @@ kotlin {
sourceSets {
val nativeMain by getting {
dependencies {
api(project(":py"))
api(projects.pyCommon)
api(projects.pyInternal)
implementation(libs.kotlinx.datetime)
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.websockets)
Expand Down
2 changes: 2 additions & 0 deletions compose-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ kotlin {
val commonMain by getting {
dependencies {
implementation(projects.shared)
implementation(projects.pyCommon)
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.animation)
Expand Down Expand Up @@ -107,6 +108,7 @@ kotlin {
dependencies {
implementation(libs.kotlin.reflect)
implementation(libs.kotlinx.coroutines.android)
implementation(libs.androidx.camera)
implementation(libs.androidx.core.splashscreen)
implementation(libs.androidx.window)
implementation(libs.androidx.activity.compose)
Expand Down
4 changes: 3 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ kotlinx-coroutines = "1.8.0"
kotlinx-datetime = "0.5.0"
kotlinx-serilization = "1.6.3"
agp = "8.2.2"
androidx-camera = "1.3.3"
androidx-core-splashscreen = "1.0.1"
androidx-window = "1.2.0"
androidx-activity-compose = "1.9.0"
androidx-browser = "1.8.0"
androidx-datastore = "1.1.0"
compose = "1.6.10-beta01"
decompose = "3.0.0-beta01"
decompose = "3.0.0"
javaCv = "1.5.10"
ktor = "3.0.0-beta-2-eap-930"
ktor-plugin = "3.0.0-beta-1"
Expand All @@ -33,6 +34,7 @@ kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutine
kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "kotlinx-coroutines" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinx-datetime" }
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "kotlinx-serilization" }
androidx-camera = { module = "androidx.camera:camera-camera2", version.ref = "androidx-camera" }
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "androidx-core-splashscreen" }
androidx-window = { module = "androidx.window:window", version.ref = "androidx-window" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
Expand Down
3 changes: 3 additions & 0 deletions py/build.gradle.kts → py-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* with Fhraise. If not, see <https://www.gnu.org/licenses/>.
*/

import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import xyz.xfqlittlefan.fhraise.buildsrc.projectVersion

plugins {
Expand All @@ -33,6 +34,8 @@ kotlin {
linuxX64()
mingwX64()

@OptIn(ExperimentalWasmDsl::class) wasmJs()

applyDefaultHierarchyTemplate()

sourceSets {
Expand Down
File renamed without changes.
48 changes: 48 additions & 0 deletions py-internal/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* This file is part of Fhraise.
* Copyright (c) 2024 HSAS Foodies. All Rights Reserved.
*
* Fhraise is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Fhraise is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with Fhraise. If not, see <https://www.gnu.org/licenses/>.
*/

import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import xyz.xfqlittlefan.fhraise.buildsrc.projectVersion

plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.kotlinSerialization)
}

group = "xyz.xfqlittlefan.fhraise"
project.version = projectVersion

kotlin {
jvm()

linuxArm64()
linuxX64()
mingwX64()

@OptIn(ExperimentalWasmDsl::class) wasmJs()

applyDefaultHierarchyTemplate()

sourceSets {
val commonMain by getting {
dependencies {
implementation(libs.kotlinx.serialization.core)
}
}
}
}
File renamed without changes.
3 changes: 2 additions & 1 deletion server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ application {
}

dependencies {
implementation(project(":py"))
implementation(projects.shared)
implementation(projects.pyCommon)
implementation(projects.pyInternal)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.ktor.server.core)
implementation(libs.ktor.server.cio)
Expand Down
3 changes: 2 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ include(":shared")

include(":compose-app")
include(":server")
include(":py")
include(":py-common")
include(":py-internal")
include(":client-py")

include(":keycloak-spi")

0 comments on commit 37143c7

Please sign in to comment.