Initial commit
This commit is contained in:
18
.gitignore
vendored
Normal file
18
.gitignore
vendored
Normal file
@@ -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
|
||||||
38
README.md
38
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.
|
### Getting Started
|
||||||
It contains several subfolders:
|
To start you have to do some changes on the following files
|
||||||
- [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.
|
|
||||||
|
|
||||||
* [/iosApp](./iosApp/iosApp) contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform,
|
[settings.gradle.kts](settings.gradle.kts)
|
||||||
you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.
|
- Change `rootProject.name` to your projects name
|
||||||
|
|
||||||
### 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)…
|
|
||||||
@@ -650,7 +650,7 @@ code + .copy-button {
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function configurationCacheProblems() { return (
|
function configurationCacheProblems() { return (
|
||||||
// begin-report-data
|
// begin-report-data
|
||||||
{"diagnostics":[{"locations":[{},{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Retrieving attribute with a null key. This behavior has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This will fail with an error in Gradle 10.0."}],"contextualLabel":"Retrieving attribute with a null key. This behavior has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#null-attribute-lookup","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"retrieving-attribute-with-a-null-key-this-behavior-has-been-deprecated","displayName":"Retrieving attribute with a null key. This behavior has been deprecated."}],"solutions":[[{"text":"Don't request attributes from attribute containers using null keys."}]]},{"locations":[{},{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Retrieving attribute with a null key. This behavior has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This will fail with an error in Gradle 10.0."}],"contextualLabel":"Retrieving attribute with a null key. This behavior has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#null-attribute-lookup","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"retrieving-attribute-with-a-null-key-this-behavior-has-been-deprecated","displayName":"Retrieving attribute with a null key. This behavior has been deprecated."}],"solutions":[[{"text":"Don't request attributes from attribute containers using null keys."}]]},{"locations":[{},{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Retrieving attribute with a null key. This behavior has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This will fail with an error in Gradle 10.0."}],"contextualLabel":"Retrieving attribute with a null key. This behavior has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#null-attribute-lookup","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"retrieving-attribute-with-a-null-key-this-behavior-has-been-deprecated","displayName":"Retrieving attribute with a null key. This behavior has been deprecated."}],"solutions":[[{"text":"Don't request attributes from attribute containers using null keys."}]]},{"locations":[{},{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Retrieving attribute with a null key. This behavior has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This will fail with an error in Gradle 10.0."}],"contextualLabel":"Retrieving attribute with a null key. This behavior has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#null-attribute-lookup","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"retrieving-attribute-with-a-null-key-this-behavior-has-been-deprecated","displayName":"Retrieving attribute with a null key. This behavior has been deprecated."}],"solutions":[[{"text":"Don't request attributes from attribute containers using null keys."}]]},{"locations":[{},{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Retrieving attribute with a null key. This behavior has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This will fail with an error in Gradle 10.0."}],"contextualLabel":"Retrieving attribute with a null key. This behavior has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#null-attribute-lookup","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"retrieving-attribute-with-a-null-key-this-behavior-has-been-deprecated","displayName":"Retrieving attribute with a null key. This behavior has been deprecated."}],"solutions":[[{"text":"Don't request attributes from attribute containers using null keys."}]]}],"problemsReport":{"totalProblemCount":5,"buildName":"Triplogic","requestedTasks":"","documentationLink":"https://docs.gradle.org/8.14.3/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
|
{"diagnostics":[{"locations":[{},{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Retrieving attribute with a null key. This behavior has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This will fail with an error in Gradle 10.0."}],"contextualLabel":"Retrieving attribute with a null key. This behavior has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#null-attribute-lookup","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"retrieving-attribute-with-a-null-key-this-behavior-has-been-deprecated","displayName":"Retrieving attribute with a null key. This behavior has been deprecated."}],"solutions":[[{"text":"Don't request attributes from attribute containers using null keys."}]]},{"locations":[{},{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Retrieving attribute with a null key. This behavior has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This will fail with an error in Gradle 10.0."}],"contextualLabel":"Retrieving attribute with a null key. This behavior has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#null-attribute-lookup","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"retrieving-attribute-with-a-null-key-this-behavior-has-been-deprecated","displayName":"Retrieving attribute with a null key. This behavior has been deprecated."}],"solutions":[[{"text":"Don't request attributes from attribute containers using null keys."}]]},{"locations":[{},{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Retrieving attribute with a null key. This behavior has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This will fail with an error in Gradle 10.0."}],"contextualLabel":"Retrieving attribute with a null key. This behavior has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#null-attribute-lookup","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"retrieving-attribute-with-a-null-key-this-behavior-has-been-deprecated","displayName":"Retrieving attribute with a null key. This behavior has been deprecated."}],"solutions":[[{"text":"Don't request attributes from attribute containers using null keys."}]]},{"locations":[{},{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Retrieving attribute with a null key. This behavior has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This will fail with an error in Gradle 10.0."}],"contextualLabel":"Retrieving attribute with a null key. This behavior has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#null-attribute-lookup","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"retrieving-attribute-with-a-null-key-this-behavior-has-been-deprecated","displayName":"Retrieving attribute with a null key. This behavior has been deprecated."}],"solutions":[[{"text":"Don't request attributes from attribute containers using null keys."}]]},{"locations":[{},{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Retrieving attribute with a null key. This behavior has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This will fail with an error in Gradle 10.0."}],"contextualLabel":"Retrieving attribute with a null key. This behavior has been deprecated.","documentationLink":"https://docs.gradle.org/8.14.3/userguide/upgrading_version_8.html#null-attribute-lookup","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"retrieving-attribute-with-a-null-key-this-behavior-has-been-deprecated","displayName":"Retrieving attribute with a null key. This behavior has been deprecated."}],"solutions":[[{"text":"Don't request attributes from attribute containers using null keys."}]]}],"problemsReport":{"totalProblemCount":5,"buildName":"Template","requestedTasks":"","documentationLink":"https://docs.gradle.org/8.14.3/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
|
||||||
// end-report-data
|
// end-report-data
|
||||||
);}
|
);}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -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<String, DrawableResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, DrawableResource>()
|
|
||||||
_collectCommonMainDrawable0Resources(map)
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
|
|
||||||
internal actual val Res.allStringResources: Map<String, StringResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, StringResource>()
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
|
|
||||||
internal actual val Res.allStringArrayResources: Map<String, StringArrayResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, StringArrayResource>()
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
|
|
||||||
internal actual val Res.allPluralStringResources: Map<String, PluralStringResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, PluralStringResource>()
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
|
|
||||||
internal actual val Res.allFontResources: Map<String, FontResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, FontResource>()
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
@@ -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<String, DrawableResource>) {
|
|
||||||
map.put("compose_multiplatform", Res.drawable.compose_multiplatform)
|
|
||||||
}
|
|
||||||
@@ -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<String, DrawableResource>
|
|
||||||
|
|
||||||
internal expect val Res.allStringResources: Map<String, StringResource>
|
|
||||||
|
|
||||||
internal expect val Res.allStringArrayResources: Map<String, StringArrayResource>
|
|
||||||
|
|
||||||
internal expect val Res.allPluralStringResources: Map<String, PluralStringResource>
|
|
||||||
|
|
||||||
internal expect val Res.allFontResources: Map<String, FontResource>
|
|
||||||
@@ -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
|
|
||||||
}
|
|
||||||
@@ -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<String, DrawableResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, DrawableResource>()
|
|
||||||
_collectCommonMainDrawable0Resources(map)
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
|
|
||||||
internal actual val Res.allStringResources: Map<String, StringResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, StringResource>()
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
|
|
||||||
internal actual val Res.allStringArrayResources: Map<String, StringArrayResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, StringArrayResource>()
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
|
|
||||||
internal actual val Res.allPluralStringResources: Map<String, PluralStringResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, PluralStringResource>()
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
|
|
||||||
internal actual val Res.allFontResources: Map<String, FontResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, FontResource>()
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
@@ -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<String, DrawableResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, DrawableResource>()
|
|
||||||
_collectCommonMainDrawable0Resources(map)
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
|
|
||||||
internal actual val Res.allStringResources: Map<String, StringResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, StringResource>()
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
|
|
||||||
internal actual val Res.allStringArrayResources: Map<String, StringArrayResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, StringArrayResource>()
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
|
|
||||||
internal actual val Res.allPluralStringResources: Map<String, PluralStringResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, PluralStringResource>()
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
|
|
||||||
internal actual val Res.allFontResources: Map<String, FontResource> by lazy {
|
|
||||||
val map = mutableMapOf<String, FontResource>()
|
|
||||||
return@lazy map
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
rootProject.name = "Triplogic"
|
rootProject.name = "Template"
|
||||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||||
|
|
||||||
pluginManagement {
|
pluginManagement {
|
||||||
|
|||||||
Reference in New Issue
Block a user