Initial commit.

This commit is contained in:
2025-09-03 18:16:07 +02:00
parent 666d6a05f1
commit 2977d3c922
11 changed files with 190 additions and 0 deletions

8
.idea/artifacts/shared.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<component name="ArtifactManager">
<artifact type="jar" name="shared">
<output-path>$PROJECT_DIR$/shared/build/libs</output-path>
<root id="archive" name="shared.jar">
<element id="module-output" name="Klottr.shared.androidMain" />
</root>
</artifact>
</component>

26
docs/plan.txt Normal file
View File

@@ -0,0 +1,26 @@
0.2.6 Nuvarande version.
0.3.0 Ska ha samma funktioner som senaste 0.2.x men multiplattform.
0.4.0 Utbytt utseende i appen (tänkte ha några knappikoner längst ned och sedan något grejs längst upp kanske hamburgermeny, men vi får skissa och testa lite.)
0.5.0 Dynamiska lager (har en ganska klar bild över hur det skall fungera, bör gå ganska lätt att implementera, det kluriga är hur man gör det enkelt för användaren så det inte ser ut som manöverbordet på de gamla rymdfärjorna).
0.6.0 Klottr Chat (kräver dynamiska lager, men behöver enskild serverkod).
0.7.0 ?
0.8.0 ?
0.9.x Sista betorna innan publikt släpp.
1.0.0 Första publika versionen.
1.0.x Buggfixar1.1.0 Förbättringar baserad på erfarenheter av den publika användningen.
2.0.0 Klottr Voice Chat
Någonstans skall också premiumabonnemang, företagsabonnemang och liknande in.
Någonstans skall också modereringsfunktioner in. Definitivt innan version 1.0.
Senare: Klotter Video Chat? 
Skapa ett git-dokument gällande modereringssystemet.
Möjlighet att blocka personer kan krävas för åldersgräns 12 år.
Byte av användarnamn möjligt, men måste vara begränsat. Kanske kosta? Kanske en gång i halvåret? Man fortsätter med samma ID ändå.

1
shared/.gitignore vendored Normal file
View File

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

100
shared/build.gradle.kts Normal file
View File

@@ -0,0 +1,100 @@
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.kotlin.multiplatform.library)
alias(libs.plugins.android.lint)
}
kotlin {
// Target declarations - add or remove as needed below. These define
// which platforms this KMP module supports.
// See: https://kotlinlang.org/docs/multiplatform-discover-project.html#targets
androidLibrary {
namespace = "app.klottr.shared"
compileSdk = 36
minSdk = 26
withHostTestBuilder {
}
withDeviceTestBuilder {
sourceSetTreeName = "test"
}.configure {
instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
}
// For iOS targets, this is also where you should
// configure native binary output. For more information, see:
// https://kotlinlang.org/docs/multiplatform-build-native-binaries.html#build-xcframeworks
// A step-by-step guide on how to include this library in an XCode
// project can be found here:
// https://developer.android.com/kotlin/multiplatform/migrate
val xcfName = "sharedKit"
iosX64 {
binaries.framework {
baseName = xcfName
}
}
iosArm64 {
binaries.framework {
baseName = xcfName
}
}
iosSimulatorArm64 {
binaries.framework {
baseName = xcfName
}
}
// Source set declarations.
// Declaring a target automatically creates a source set with the same name. By default, the
// Kotlin Gradle Plugin creates additional source sets that depend on each other, since it is
// common to share sources between related targets.
// See: https://kotlinlang.org/docs/multiplatform-hierarchy.html
sourceSets {
commonMain {
dependencies {
implementation(libs.kotlin.stdlib)
// Add KMP dependencies here
}
}
commonTest {
dependencies {
implementation(libs.kotlin.test)
}
}
androidMain {
dependencies {
// Add Android-specific dependencies here. Note that this source set depends on
// commonMain by default and will correctly pull the Android artifacts of any KMP
// dependencies declared in commonMain.
}
}
getByName("androidDeviceTest") {
dependencies {
implementation(libs.androidx.runner)
implementation(libs.androidx.core)
implementation(libs.androidx.junit)
}
}
iosMain {
dependencies {
// Add iOS-specific dependencies here. This a source set created by Kotlin Gradle
// Plugin (KGP) that each specific iOS target (e.g., iosX64) depends on as
// part of KMP’s default source set hierarchy. Note that this source set depends
// on common by default and will correctly pull the iOS artifacts of any
// KMP dependencies declared in commonMain.
}
}
}
}

View File

@@ -0,0 +1,24 @@
package app.klottr.shared
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("app.klottr.shared.test", appContext.packageName)
}
}

View File

@@ -0,0 +1,16 @@
package app.klottr.shared
import kotlin.test.Test
import kotlin.test.assertEquals
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

View File

@@ -0,0 +1,3 @@
package app.klottr.shared
actual fun platform() = "Android"

View File

@@ -0,0 +1,2 @@
class SharedPing {
}

View File

@@ -0,0 +1,3 @@
package app.klottr.shared
expect fun platform(): String

View File

@@ -0,0 +1,3 @@
package app.klottr.shared
actual fun platform() = "iOS"