refactor: move resources to flexiui-resources

This commit is contained in:
2023-11-23 01:46:55 +08:00
parent 845606a59a
commit 6190a4fccf
13 changed files with 77 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
<component name="ArtifactManager">
<artifact type="jar" name="flexiui-resources-desktop">
<output-path>$PROJECT_DIR$/flexiui-resources/build/libs</output-path>
<root id="archive" name="flexiui-resources-desktop.jar">
<element id="module-output" name="FlexiUI.flexiui-resources.desktopMain" />
</root>
</artifact>
</component>

View File

@@ -32,6 +32,7 @@ kotlin {
implementation(compose.foundation)
// TODO: We need to remove this and replace with "material-ripple"
implementation(compose.material)
implementation(projects.flexiuiResources)
}
}
val androidMain by getting {

1
flexiui-resources/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

View File

@@ -0,0 +1,64 @@
plugins {
autowire(libs.plugins.kotlin.multiplatform)
autowire(libs.plugins.android.library)
autowire(libs.plugins.jetbrains.compose)
}
group = property.project.groupName
kotlin {
androidTarget()
jvm("desktop")
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64(),
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = projects.flexiuiResources.name
isStatic = true
}
}
jvmToolchain(17)
sourceSets {
val commonMain by getting {
dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
}
}
val androidMain by getting
val desktopMain by getting
val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by creating {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
}
}
}
android {
namespace = property.project.groupName
compileSdk = property.project.android.compileSdk
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
sourceSets["main"].res.srcDirs("src/androidMain/res")
sourceSets["main"].resources.srcDirs("src/commonMain/resources")
defaultConfig {
minSdk = property.project.android.minSdk
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest />

View File

@@ -20,4 +20,4 @@ sweetProperty {
}
rootProject.name = "FlexiUI"
include(":samples:androidApp", ":samples:desktopApp", ":samples:shared")
include(":flexiui-core")
include(":flexiui-core", "flexiui-resources")