From 743415f3d15230b9f0bb5eef42797e9e94a557f0 Mon Sep 17 00:00:00 2001 From: Carlos Martino Date: Wed, 17 Sep 2025 12:16:04 -0300 Subject: [PATCH] Initial commit --- .gitignore | 18 +++++++ README.md | 38 ++------------- build/reports/problems/problems-report.html | 2 +- .../resources/ActualResourceCollectors.kt | 38 --------------- .../resources/Drawable0.commonMain.kt | 23 --------- .../resources/ExpectResourceCollectors.kt | 19 -------- .../composeapp/generated/resources/Res.kt | 47 ------------------- .../resources/ActualResourceCollectors.kt | 38 --------------- .../resources/ActualResourceCollectors.kt | 38 --------------- settings.gradle.kts | 2 +- 10 files changed, 25 insertions(+), 238 deletions(-) create mode 100644 .gitignore delete mode 100644 composeApp/build/generated/compose/resourceGenerator/kotlin/androidMainResourceCollectors/triplogic/composeapp/generated/resources/ActualResourceCollectors.kt delete mode 100644 composeApp/build/generated/compose/resourceGenerator/kotlin/commonMainResourceAccessors/triplogic/composeapp/generated/resources/Drawable0.commonMain.kt delete mode 100644 composeApp/build/generated/compose/resourceGenerator/kotlin/commonMainResourceCollectors/triplogic/composeapp/generated/resources/ExpectResourceCollectors.kt delete mode 100644 composeApp/build/generated/compose/resourceGenerator/kotlin/commonResClass/triplogic/composeapp/generated/resources/Res.kt delete mode 100644 composeApp/build/generated/compose/resourceGenerator/kotlin/iosArm64MainResourceCollectors/triplogic/composeapp/generated/resources/ActualResourceCollectors.kt delete mode 100644 composeApp/build/generated/compose/resourceGenerator/kotlin/iosSimulatorArm64MainResourceCollectors/triplogic/composeapp/generated/resources/ActualResourceCollectors.kt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7d9c0e4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +*.iml +.kotlin +.gradle +**/build/ +xcuserdata +!src/**/build/ +local.properties +.idea +.DS_Store +captures +.externalNativeBuild +.cxx +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcodeproj/project.xcworkspace/ +!*.xcworkspace/contents.xcworkspacedata +**/xcshareddata/WorkspaceSettings.xcsettings diff --git a/README.md b/README.md index 7e7d049..1ef958b 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,7 @@ -This is a Kotlin Multiplatform project targeting Android, iOS. +This is a Kotlin Multiplatform project targeting Android and iOS. -* [/composeApp](./composeApp/src) is for code that will be shared across your Compose Multiplatform applications. - It contains several subfolders: - - [commonMain](./composeApp/src/commonMain/kotlin) is for code that’s common for all targets. - - Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name. - For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app, - the [iosMain](./composeApp/src/iosMain/kotlin) folder would be the right place for such calls. - Similarly, if you want to edit the Desktop (JVM) specific part, the [jvmMain](./composeApp/src/jvmMain/kotlin) - folder is the appropriate location. +### Getting Started +To start you have to do some changes on the following files -* [/iosApp](./iosApp/iosApp) contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, - you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project. - -### Build and Run Android Application - -To build and run the development version of the Android app, use the run configuration from the run widget -in your IDE’s toolbar or build it directly from the terminal: -- on macOS/Linux - ```shell - ./gradlew :composeApp:assembleDebug - ``` -- on Windows - ```shell - .\gradlew.bat :composeApp:assembleDebug - ``` - -### Build and Run iOS Application - -To build and run the development version of the iOS app, use the run configuration from the run widget -in your IDE’s toolbar or open the [/iosApp](./iosApp) directory in Xcode and run it from there. - ---- - -Learn more about [Kotlin Multiplatform](https://www.jetbrains.com/help/kotlin-multiplatform-dev/get-started.html)… \ No newline at end of file +[settings.gradle.kts](settings.gradle.kts) +- Change `rootProject.name` to your projects name \ No newline at end of file diff --git a/build/reports/problems/problems-report.html b/build/reports/problems/problems-report.html index 2ab4ce8..75a885e 100644 --- a/build/reports/problems/problems-report.html +++ b/build/reports/problems/problems-report.html @@ -650,7 +650,7 @@ code + .copy-button { diff --git a/composeApp/build/generated/compose/resourceGenerator/kotlin/androidMainResourceCollectors/triplogic/composeapp/generated/resources/ActualResourceCollectors.kt b/composeApp/build/generated/compose/resourceGenerator/kotlin/androidMainResourceCollectors/triplogic/composeapp/generated/resources/ActualResourceCollectors.kt deleted file mode 100644 index a708e75..0000000 --- a/composeApp/build/generated/compose/resourceGenerator/kotlin/androidMainResourceCollectors/triplogic/composeapp/generated/resources/ActualResourceCollectors.kt +++ /dev/null @@ -1,38 +0,0 @@ -@file:OptIn(org.jetbrains.compose.resources.InternalResourceApi::class) - -package triplogic.composeapp.generated.resources - -import kotlin.OptIn -import kotlin.String -import kotlin.collections.Map -import org.jetbrains.compose.resources.DrawableResource -import org.jetbrains.compose.resources.FontResource -import org.jetbrains.compose.resources.PluralStringResource -import org.jetbrains.compose.resources.StringArrayResource -import org.jetbrains.compose.resources.StringResource - -internal actual val Res.allDrawableResources: Map by lazy { - val map = mutableMapOf() - _collectCommonMainDrawable0Resources(map) - return@lazy map -} - -internal actual val Res.allStringResources: Map by lazy { - val map = mutableMapOf() - return@lazy map -} - -internal actual val Res.allStringArrayResources: Map by lazy { - val map = mutableMapOf() - return@lazy map -} - -internal actual val Res.allPluralStringResources: Map by lazy { - val map = mutableMapOf() - return@lazy map -} - -internal actual val Res.allFontResources: Map by lazy { - val map = mutableMapOf() - return@lazy map -} diff --git a/composeApp/build/generated/compose/resourceGenerator/kotlin/commonMainResourceAccessors/triplogic/composeapp/generated/resources/Drawable0.commonMain.kt b/composeApp/build/generated/compose/resourceGenerator/kotlin/commonMainResourceAccessors/triplogic/composeapp/generated/resources/Drawable0.commonMain.kt deleted file mode 100644 index 4fc52d2..0000000 --- a/composeApp/build/generated/compose/resourceGenerator/kotlin/commonMainResourceAccessors/triplogic/composeapp/generated/resources/Drawable0.commonMain.kt +++ /dev/null @@ -1,23 +0,0 @@ -@file:OptIn(InternalResourceApi::class) - -package triplogic.composeapp.generated.resources - -import kotlin.OptIn -import kotlin.String -import kotlin.collections.MutableMap -import org.jetbrains.compose.resources.DrawableResource -import org.jetbrains.compose.resources.InternalResourceApi -import org.jetbrains.compose.resources.ResourceItem - -private const val MD: String = "composeResources/triplogic.composeapp.generated.resources/" - -internal val Res.drawable.compose_multiplatform: DrawableResource by lazy { - DrawableResource("drawable:compose_multiplatform", setOf( - ResourceItem(setOf(), "${MD}drawable/compose-multiplatform.xml", -1, -1), - )) - } - -@InternalResourceApi -internal fun _collectCommonMainDrawable0Resources(map: MutableMap) { - map.put("compose_multiplatform", Res.drawable.compose_multiplatform) -} diff --git a/composeApp/build/generated/compose/resourceGenerator/kotlin/commonMainResourceCollectors/triplogic/composeapp/generated/resources/ExpectResourceCollectors.kt b/composeApp/build/generated/compose/resourceGenerator/kotlin/commonMainResourceCollectors/triplogic/composeapp/generated/resources/ExpectResourceCollectors.kt deleted file mode 100644 index 46b64ed..0000000 --- a/composeApp/build/generated/compose/resourceGenerator/kotlin/commonMainResourceCollectors/triplogic/composeapp/generated/resources/ExpectResourceCollectors.kt +++ /dev/null @@ -1,19 +0,0 @@ -package triplogic.composeapp.generated.resources - -import kotlin.String -import kotlin.collections.Map -import org.jetbrains.compose.resources.DrawableResource -import org.jetbrains.compose.resources.FontResource -import org.jetbrains.compose.resources.PluralStringResource -import org.jetbrains.compose.resources.StringArrayResource -import org.jetbrains.compose.resources.StringResource - -internal expect val Res.allDrawableResources: Map - -internal expect val Res.allStringResources: Map - -internal expect val Res.allStringArrayResources: Map - -internal expect val Res.allPluralStringResources: Map - -internal expect val Res.allFontResources: Map diff --git a/composeApp/build/generated/compose/resourceGenerator/kotlin/commonResClass/triplogic/composeapp/generated/resources/Res.kt b/composeApp/build/generated/compose/resourceGenerator/kotlin/commonResClass/triplogic/composeapp/generated/resources/Res.kt deleted file mode 100644 index d1c3dea..0000000 --- a/composeApp/build/generated/compose/resourceGenerator/kotlin/commonResClass/triplogic/composeapp/generated/resources/Res.kt +++ /dev/null @@ -1,47 +0,0 @@ -@file:OptIn(InternalResourceApi::class) -@file:Suppress( - "RedundantVisibilityModifier", - "REDUNDANT_VISIBILITY_MODIFIER", -) - -package triplogic.composeapp.generated.resources - -import kotlin.ByteArray -import kotlin.OptIn -import kotlin.String -import kotlin.Suppress -import org.jetbrains.compose.resources.InternalResourceApi -import org.jetbrains.compose.resources.getResourceUri -import org.jetbrains.compose.resources.readResourceBytes - -internal object Res { - /** - * Reads the content of the resource file at the specified path and returns it as a byte array. - * - * Example: `val bytes = Res.readBytes("files/key.bin")` - * - * @param path The path of the file to read in the compose resource's directory. - * @return The content of the file as a byte array. - */ - public suspend fun readBytes(path: String): ByteArray = readResourceBytes("composeResources/triplogic.composeapp.generated.resources/" + path) - - /** - * Returns the URI string of the resource file at the specified path. - * - * Example: `val uri = Res.getUri("files/key.bin")` - * - * @param path The path of the file in the compose resource's directory. - * @return The URI string of the file. - */ - public fun getUri(path: String): String = getResourceUri("composeResources/triplogic.composeapp.generated.resources/" + path) - - public object drawable - - public object string - - public object array - - public object plurals - - public object font -} diff --git a/composeApp/build/generated/compose/resourceGenerator/kotlin/iosArm64MainResourceCollectors/triplogic/composeapp/generated/resources/ActualResourceCollectors.kt b/composeApp/build/generated/compose/resourceGenerator/kotlin/iosArm64MainResourceCollectors/triplogic/composeapp/generated/resources/ActualResourceCollectors.kt deleted file mode 100644 index a708e75..0000000 --- a/composeApp/build/generated/compose/resourceGenerator/kotlin/iosArm64MainResourceCollectors/triplogic/composeapp/generated/resources/ActualResourceCollectors.kt +++ /dev/null @@ -1,38 +0,0 @@ -@file:OptIn(org.jetbrains.compose.resources.InternalResourceApi::class) - -package triplogic.composeapp.generated.resources - -import kotlin.OptIn -import kotlin.String -import kotlin.collections.Map -import org.jetbrains.compose.resources.DrawableResource -import org.jetbrains.compose.resources.FontResource -import org.jetbrains.compose.resources.PluralStringResource -import org.jetbrains.compose.resources.StringArrayResource -import org.jetbrains.compose.resources.StringResource - -internal actual val Res.allDrawableResources: Map by lazy { - val map = mutableMapOf() - _collectCommonMainDrawable0Resources(map) - return@lazy map -} - -internal actual val Res.allStringResources: Map by lazy { - val map = mutableMapOf() - return@lazy map -} - -internal actual val Res.allStringArrayResources: Map by lazy { - val map = mutableMapOf() - return@lazy map -} - -internal actual val Res.allPluralStringResources: Map by lazy { - val map = mutableMapOf() - return@lazy map -} - -internal actual val Res.allFontResources: Map by lazy { - val map = mutableMapOf() - return@lazy map -} diff --git a/composeApp/build/generated/compose/resourceGenerator/kotlin/iosSimulatorArm64MainResourceCollectors/triplogic/composeapp/generated/resources/ActualResourceCollectors.kt b/composeApp/build/generated/compose/resourceGenerator/kotlin/iosSimulatorArm64MainResourceCollectors/triplogic/composeapp/generated/resources/ActualResourceCollectors.kt deleted file mode 100644 index a708e75..0000000 --- a/composeApp/build/generated/compose/resourceGenerator/kotlin/iosSimulatorArm64MainResourceCollectors/triplogic/composeapp/generated/resources/ActualResourceCollectors.kt +++ /dev/null @@ -1,38 +0,0 @@ -@file:OptIn(org.jetbrains.compose.resources.InternalResourceApi::class) - -package triplogic.composeapp.generated.resources - -import kotlin.OptIn -import kotlin.String -import kotlin.collections.Map -import org.jetbrains.compose.resources.DrawableResource -import org.jetbrains.compose.resources.FontResource -import org.jetbrains.compose.resources.PluralStringResource -import org.jetbrains.compose.resources.StringArrayResource -import org.jetbrains.compose.resources.StringResource - -internal actual val Res.allDrawableResources: Map by lazy { - val map = mutableMapOf() - _collectCommonMainDrawable0Resources(map) - return@lazy map -} - -internal actual val Res.allStringResources: Map by lazy { - val map = mutableMapOf() - return@lazy map -} - -internal actual val Res.allStringArrayResources: Map by lazy { - val map = mutableMapOf() - return@lazy map -} - -internal actual val Res.allPluralStringResources: Map by lazy { - val map = mutableMapOf() - return@lazy map -} - -internal actual val Res.allFontResources: Map by lazy { - val map = mutableMapOf() - return@lazy map -} diff --git a/settings.gradle.kts b/settings.gradle.kts index aabd2e7..d7ce749 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,4 +1,4 @@ -rootProject.name = "Triplogic" +rootProject.name = "Template" enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") pluginManagement {