Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions sdks/community/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl

plugins {
kotlin("multiplatform") version "2.1.21"
kotlin("plugin.serialization") version "2.1.21"
plugins {
kotlin("multiplatform") version "2.2.20"
kotlin("plugin.serialization") version "2.2.20"
id("com.android.library") version "8.2.2"
id("io.gitlab.arturbosch.detekt") version "1.23.4"
id("maven-publish")
Expand Down Expand Up @@ -34,8 +34,8 @@ kotlin {
freeCompilerArgs.add("-Xopt-in=kotlin.RequiresOptIn")
freeCompilerArgs.add("-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi")
freeCompilerArgs.add("-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi")
languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_1)
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_1)
languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
}
}
}
Expand Down Expand Up @@ -226,4 +226,4 @@ tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
sarif.required.set(true)
md.required.set(true)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ android {
}

composeOptions {
kotlinCompilerExtensionVersion = "1.6.21"
kotlinCompilerExtensionVersion = "1.5.15"
}

packagingOptions {
Expand Down Expand Up @@ -62,4 +62,4 @@ dependencies {
// }
// }
// }
//}
//}
5 changes: 2 additions & 3 deletions sdks/community/kotlin/examples/chatapp/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ kotlin.code.style=official
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.applyDefaultHierarchyTemplate=false
kotlin.native.cacheKind=none
kotlin.native.useEmbeddableCompilerJar=true
kotlin.mpp.enableCInteropCommonization=true

# Compose
Expand All @@ -26,10 +25,10 @@ android.nonTransitiveRClass=true
xcodeproj=./iosApp

# K2 Compiler Settings
kotlin.compiler.version=2.2.0
kotlin.compiler.version=2.2.20
kotlin.compiler.languageVersion=2.2
kotlin.compiler.apiVersion=2.2
kotlin.compiler.k2=true

# Disable Kotlin Native bundling service
kotlin.native.disableCompilerDaemon=true
kotlin.native.disableCompilerDaemon=true
25 changes: 16 additions & 9 deletions sdks/community/kotlin/examples/chatapp/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ core = "1.6.1"
core-ktx = "1.16.0"
junit = "4.13.2"
junit-version = "1.2.1"
kotlin = "2.1.21"
kotlin = "2.2.20"
#Downgrading to avoid an R8 error
ktor = "3.1.3"
kotlinx-serialization = "1.8.1"
Expand All @@ -19,17 +19,18 @@ multiplatform-settings-coroutines = "1.2.0"
okio = "3.13.0"
runner = "1.6.2"
slf4j = "2.0.9"
ui-test-junit4 = "1.8.3"
voyager-navigator = "1.0.0"
compose-richtext = "1.0.0-alpha03"
markdown-renderer = "0.37.0"
compose = "1.9.1"
compose-material3 = "1.4.0"

[libraries]
# Ktor
activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activity-compose" }
agui-client = { module = "com.agui:kotlin-client", version.ref = "agui-core" }
agui-core = { module = "com.agui:kotlin-core", version.ref = "agui-core" }
agui-tools = { module = "com.agui:kotlin-tools", version.ref = "agui-core" }
androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "ui-test-junit4" }
androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
core = { module = "androidx.test:core", version.ref = "core" }
core-ktx = { module = "androidx.core:core-ktx", version.ref = "core-ktx" }
Expand Down Expand Up @@ -59,13 +60,19 @@ multiplatform-settings-coroutines = { module = "com.russhwolf:multiplatform-sett
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }
runner = { module = "androidx.test:runner", version.ref = "runner" }
slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" }
ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "ui-test-junit4" }
androidx-compose-runtime = { module = "androidx.compose.runtime:runtime", version.ref = "compose" }
androidx-compose-runtime-saveable = { module = "androidx.compose.runtime:runtime-saveable", version.ref = "compose" }
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "compose" }
androidx-compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" }
androidx-compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "compose" }
ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose" }
voyager-navigator = { module = "cafe.adriel.voyager:voyager-navigator", version.ref = "voyager-navigator" }
voyager-screenmodel = { module = "cafe.adriel.voyager:voyager-screenmodel", version.ref = "voyager-navigator" }
voyager-transitions = { module = "cafe.adriel.voyager:voyager-transitions", version.ref = "voyager-navigator" }
richtext-commonmark = { module = "com.halilibo.compose-richtext:richtext-commonmark", version.ref = "compose-richtext" }
richtext-ui = { module = "com.halilibo.compose-richtext:richtext-ui", version.ref = "compose-richtext" }
richtext-ui-material3 = { module = "com.halilibo.compose-richtext:richtext-ui-material3", version.ref = "compose-richtext" }
markdown-renderer-m3 = { module = "com.mikepenz:multiplatform-markdown-renderer-m3", version.ref = "markdown-renderer" }

[plugins]
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
Expand All @@ -84,4 +91,4 @@ kotlinx-common = [
"kotlinx-coroutines-core",
"kotlinx-serialization-json",
"kotlinx-datetime"
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 56;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -286,6 +286,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 96FAHJ5ZD7;
ENABLE_PREVIEWS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -301,7 +302,7 @@
"-framework",
shared,
);
PRODUCT_BUNDLE_IDENTIFIER = "com.agui.example.chatapp";
PRODUCT_BUNDLE_IDENTIFIER = com.agui.example.chatapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -314,6 +315,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 96FAHJ5ZD7;
ENABLE_PREVIEWS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -329,7 +331,7 @@
"-framework",
shared,
);
PRODUCT_BUNDLE_IDENTIFIER = "com.agui.example.chatapp";
PRODUCT_BUNDLE_IDENTIFIER = com.agui.example.chatapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -360,4 +362,4 @@
/* End XCConfigurationList section */
};
rootObject = 7555FF73242A565900829871 /* Project object */;
}
}
6 changes: 3 additions & 3 deletions sdks/community/kotlin/examples/chatapp/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ pluginManagement {
}

plugins {
val kotlinVersion = "2.1.21"
val composeVersion = "1.7.3"
val kotlinVersion = "2.2.20"
val composeVersion = "1.9.0-rc02"
val agpVersion = "8.10.1"

kotlin("multiplatform") version kotlinVersion
Expand All @@ -43,4 +43,4 @@ dependencyResolutionManagement {
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
mavenLocal()
}
}
}
13 changes: 9 additions & 4 deletions sdks/community/kotlin/examples/chatapp/shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ kotlin {
implementation(libs.okio)

// Markdown rendering
implementation(libs.richtext.commonmark)
implementation(libs.richtext.ui)
implementation(libs.richtext.ui.material3)
implementation(libs.markdown.renderer.m3)
}
}

Expand All @@ -101,6 +99,13 @@ kotlin {
api(libs.activity.compose)
api(libs.appcompat)
api(libs.core.ktx)
implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.compose.runtime.saveable)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.material)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.tooling.preview)
implementation(libs.ktor.client.android)
}
}
Expand All @@ -123,7 +128,7 @@ kotlin {

// Fixed Compose testing dependencies with explicit versions
implementation(libs.ui.test.junit4)
implementation("androidx.compose.ui:ui-test-manifest:1.8.3")
implementation(libs.androidx.compose.ui.test.manifest)
implementation(libs.activity.compose)
implementation(libs.androidx.ui.tooling)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.agui.example.chatapp.ui.screens.chat.DisplayMessage
import com.agui.example.chatapp.ui.screens.chat.MessageRole
import com.halilibo.richtext.commonmark.Markdown
import com.halilibo.richtext.ui.material3.RichText
import com.mikepenz.markdown.m3.Markdown
import kotlinx.datetime.Instant
import kotlinx.datetime.TimeZone
import kotlinx.datetime.toLocalDateTime
Expand Down Expand Up @@ -166,13 +165,12 @@ fun MessageBubble(
// Regular text for non-ephemeral messages
ProvideTextStyle(MaterialTheme.typography.bodyLarge) {
CompositionLocalProvider(LocalContentColor provides messageTextColor) {
RichText(
Markdown(
content = message.content,
modifier = Modifier
.fillMaxWidth()
.semantics { text = AnnotatedString(message.content) }
) {
Markdown(message.content)
}
)
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions sdks/community/kotlin/examples/tools/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ kotlin {
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
freeCompilerArgs.add("-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi")
freeCompilerArgs.add("-opt-in=kotlinx.serialization.ExperimentalSerializationApi")
languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_1)
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_1)
languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
}
}
}
Expand Down Expand Up @@ -131,4 +131,4 @@ android {

tasks.withType<Test> {
useJUnitPlatform()
}
}
9 changes: 4 additions & 5 deletions sdks/community/kotlin/examples/tools/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ kotlin.code.style=official
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.applyDefaultHierarchyTemplate=false
kotlin.native.cacheKind=none
kotlin.native.useEmbeddableCompilerJar=true
kotlin.mpp.enableCInteropCommonization=true

# Compose
Expand All @@ -25,10 +24,10 @@ android.nonTransitiveRClass=true
xcodeproj=./iosApp

# K2 Compiler Settings
kotlin.compiler.version=2.1.21
kotlin.compiler.languageVersion=2.1
kotlin.compiler.apiVersion=2.1
kotlin.compiler.version=2.2.20
kotlin.compiler.languageVersion=2.2
kotlin.compiler.apiVersion=2.2
kotlin.compiler.k2=true

# Disable Kotlin Native bundling service
kotlin.native.disableCompilerDaemon=true
kotlin.native.disableCompilerDaemon=true
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ core = "1.6.1"
core-ktx = "1.16.0"
junit = "4.13.2"
junit-version = "1.2.1"
kotlin = "2.1.21"
kotlin = "2.2.20"
#Downgrading to avoid an R8 error
ktor = "3.1.3"
kotlinx-serialization = "1.8.1"
Expand All @@ -19,7 +19,6 @@ multiplatform-settings-coroutines = "1.2.0"
okio = "3.13.0"
runner = "1.6.2"
slf4j = "2.0.9"
ui-test-junit4 = "1.8.3"
voyager-navigator = "1.0.0"

[libraries]
Expand All @@ -28,7 +27,6 @@ activity-compose = { module = "androidx.activity:activity-compose", version.ref
agui-client = { module = "com.agui:kotlin-client", version.ref = "agui-core" }
agui-core = { module = "com.agui:kotlin-core", version.ref = "agui-core" }
agui-tools = { module = "com.agui:kotlin-tools", version.ref = "agui-core" }
androidx-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "ui-test-junit4" }
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
core = { module = "androidx.test:core", version.ref = "core" }
core-ktx = { module = "androidx.core:core-ktx", version.ref = "core-ktx" }
Expand Down Expand Up @@ -58,7 +56,6 @@ multiplatform-settings-coroutines = { module = "com.russhwolf:multiplatform-sett
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }
runner = { module = "androidx.test:runner", version.ref = "runner" }
slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" }
ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "ui-test-junit4" }
voyager-navigator = { module = "cafe.adriel.voyager:voyager-navigator", version.ref = "voyager-navigator" }
voyager-screenmodel = { module = "cafe.adriel.voyager:voyager-screenmodel", version.ref = "voyager-navigator" }
voyager-transitions = { module = "cafe.adriel.voyager:voyager-transitions", version.ref = "voyager-navigator" }
Expand All @@ -80,4 +77,4 @@ kotlinx-common = [
"kotlinx-coroutines-core",
"kotlinx-serialization-json",
"kotlinx-datetime"
]
]
4 changes: 2 additions & 2 deletions sdks/community/kotlin/examples/tools/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pluginManagement {
}

plugins {
val kotlinVersion = "2.1.21"
val kotlinVersion = "2.2.20"
val agpVersion = "8.10.1"

kotlin("multiplatform") version kotlinVersion
Expand All @@ -30,4 +30,4 @@ dependencyResolutionManagement {
mavenCentral()
mavenLocal()
}
}
}
6 changes: 3 additions & 3 deletions sdks/community/kotlin/library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// All modules are configured individually - see each module's build.gradle.kts

plugins {
kotlin("multiplatform") version "2.1.21" apply false
kotlin("plugin.serialization") version "2.1.21" apply false
kotlin("multiplatform") version "2.2.20" apply false
kotlin("plugin.serialization") version "2.2.20" apply false
id("com.android.library") version "8.10.1" apply false
id("org.jetbrains.dokka") version "2.0.0"
}
Expand Down Expand Up @@ -95,4 +95,4 @@ tasks.register("dokkaHtmlMultiModule") {

println("Unified documentation generated at: ${outputDir.absolutePath}/index.html")
}
}
}
6 changes: 3 additions & 3 deletions sdks/community/kotlin/library/client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ kotlin {
freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn")
freeCompilerArgs.add("-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi")
freeCompilerArgs.add("-opt-in=kotlinx.serialization.ExperimentalSerializationApi")
languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_1)
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_1)
languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_2)
}
}
}
Expand Down Expand Up @@ -198,4 +198,4 @@ signing {

tasks.withType<Test> {
useJUnitPlatform()
}
}
Loading