Skip to content

Commit cdbbae9

Browse files
committed
Update versions, add Koog dependency
1 parent b839d69 commit cdbbae9

17 files changed

Lines changed: 204 additions & 60 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.iml
22
.gradle
3+
.kotlin/
34
/local.properties
45
/.idea
56
.DS_Store

androidApp/build.gradle.kts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2+
13
plugins {
24
kotlin("multiplatform")
35
id("com.android.application")
46
id("org.jetbrains.compose")
7+
kotlin("plugin.compose")
58
id("org.jlleitschuh.gradle.ktlint")
69
}
710

811
kotlin {
9-
androidTarget()
12+
androidTarget {
13+
compilerOptions {
14+
jvmTarget.set(JvmTarget.JVM_21)
15+
}
16+
}
17+
18+
1019
sourceSets {
1120
val androidMain by getting {
1221
dependencies {
@@ -30,10 +39,10 @@ android {
3039
versionName = "1.0.0"
3140
}
3241
compileOptions {
33-
sourceCompatibility = JavaVersion.VERSION_17
34-
targetCompatibility = JavaVersion.VERSION_17
42+
sourceCompatibility = JavaVersion.VERSION_21
43+
targetCompatibility = JavaVersion.VERSION_21
3544
}
3645
kotlin {
37-
jvmToolchain(17)
46+
jvmToolchain(21)
3847
}
3948
}

build.gradle.kts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
plugins {
2-
// this is necessary to avoid the plugins to be loaded multiple times
3-
// in each subproject's classloader
42
kotlin("multiplatform").apply(false)
53
kotlin("plugin.serialization").apply(false)
64
id("com.android.application").apply(false)
75
id("com.android.library").apply(false)
86
id("org.jetbrains.compose").apply(false)
7+
kotlin("plugin.compose").apply(false)
98
id("org.jlleitschuh.gradle.ktlint").version("12.2.0").apply(false)
109
}
11-
12-
buildscript {
13-
dependencies {
14-
classpath("com.twitter.compose.rules:ktlint:0.0.26")
15-
}
16-
}

desktopApp/build.gradle.kts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
2+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
23

34
plugins {
45
kotlin("multiplatform")
56
id("org.jetbrains.compose")
67
id("org.jlleitschuh.gradle.ktlint")
8+
kotlin("plugin.compose")
79
}
810

911
kotlin {
10-
jvm()
12+
jvm {
13+
compilerOptions {
14+
jvmTarget.set(JvmTarget.JVM_21)
15+
}
16+
}
17+
1118
sourceSets {
1219
val jvmMain by getting {
1320
dependencies {
14-
implementation(compose.desktop.currentOs)
1521
implementation(project(":shared"))
22+
implementation(compose.desktop.currentOs)
1623
}
1724
}
1825
}

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ android.targetSdk=34
1616
android.minSdk=24
1717

1818
#Versions
19-
kotlin.version=1.9.21
20-
agp.version=8.0.2
21-
compose.version=1.5.11
22-
ktor.version=2.3.6
19+
kotlin.version=2.1.20
20+
agp.version=8.5.1
21+
compose.version=1.7.0
22+
ktor.version=3.3.0

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

settings.gradle.kts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ include(":desktopApp")
66

77
pluginManagement {
88
repositories {
9-
gradlePluginPortal()
10-
mavenCentral()
119
google()
10+
mavenCentral()
11+
gradlePluginPortal()
1212
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
1313
}
1414

@@ -26,14 +26,11 @@ pluginManagement {
2626
id("com.android.application").version(agpVersion)
2727
id("com.android.library").version(agpVersion)
2828
id("org.jetbrains.compose").version(composeVersion)
29+
kotlin("plugin.compose").version(kotlinVersion)
2930
id("io.ktor.plugin").version(ktorVersion)
3031
}
3132
}
3233

33-
plugins {
34-
id("org.gradle.toolchains.foojay-resolver-convention") version("0.4.0")
35-
}
36-
3734
dependencyResolutionManagement {
3835
repositories {
3936
mavenCentral()

shared/build.gradle.kts

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1+
12
import java.io.FileInputStream
2-
import java.util.*
3+
import java.util.Properties
34
import org.jetbrains.dokka.gradle.DokkaTask
5+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
46
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
57

68
plugins {
79
kotlin("multiplatform")
8-
kotlin("plugin.serialization")
10+
kotlin("plugin.serialization") version "2.1.20"
911
id("com.android.library")
1012
id("org.jetbrains.compose")
13+
id("org.jetbrains.kotlin.plugin.compose")
1114
id("maven-publish")
1215
id("signing")
13-
id("org.jetbrains.dokka") version "1.9.20"
16+
id("org.jetbrains.dokka") version "2.0.0"
1417
id("org.jlleitschuh.gradle.ktlint")
1518
}
1619

@@ -77,8 +80,17 @@ tasks.withType<DokkaTask>().configureEach {
7780
}
7881

7982
kotlin {
80-
androidTarget()
81-
jvm()
83+
androidTarget {
84+
compilerOptions {
85+
jvmTarget.set(JvmTarget.JVM_21)
86+
}
87+
}
88+
89+
jvm {
90+
compilerOptions {
91+
jvmTarget.set(JvmTarget.JVM_21)
92+
}
93+
}
8294

8395
val xcf = XCFramework()
8496
val iosTargets = listOf(iosX64(), iosArm64(), iosSimulatorArm64())
@@ -93,18 +105,21 @@ kotlin {
93105
sourceSets {
94106
val commonMain by getting {
95107
dependencies {
96-
implementation("com.aallam.openai:openai-client:3.8.2")
97-
implementation("io.ktor:ktor-client-core:2.3.12")
98-
implementation("com.squareup.okio:okio:3.9.0")
99-
implementation("com.mikepenz:multiplatform-markdown-renderer:0.12.0")
100-
implementation("co.touchlab:kermit:2.0.4")
108+
implementation(kotlin("reflect"))
109+
101110
implementation(compose.runtime)
102111
implementation(compose.foundation)
103112
implementation(compose.material)
104113
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
105114
implementation(compose.components.resources)
106115
implementation(compose.materialIconsExtended)
107-
implementation(kotlin("reflect"))
116+
117+
implementation("ai.koog:koog-agents:0.4.2")
118+
implementation("com.aallam.openai:openai-client:4.0.1")
119+
implementation("io.ktor:ktor-client-core:3.3.0")
120+
implementation("com.squareup.okio:okio:3.16.0")
121+
implementation("com.mikepenz:multiplatform-markdown-renderer:0.37.0")
122+
implementation("co.touchlab:kermit:2.0.8")
108123
}
109124
}
110125
val commonTest by getting {
@@ -114,19 +129,21 @@ kotlin {
114129
}
115130
val androidMain by getting {
116131
dependencies {
117-
api("androidx.activity:activity-compose:1.9.1")
118-
api("androidx.appcompat:appcompat:1.7.0")
119-
api("androidx.core:core-ktx:1.13.1")
120132
implementation(compose.uiTooling)
133+
134+
api("androidx.activity:activity-compose:1.11.0")
135+
api("androidx.appcompat:appcompat:1.7.1")
136+
api("androidx.core:core-ktx:1.17.0")
121137
implementation("com.lordcodes.turtle:turtle:0.10.0")
122-
implementation("io.ktor:ktor-client-okhttp:2.3.6")
138+
implementation("io.ktor:ktor-client-okhttp:3.3.0")
123139
}
124140
}
125141
val jvmMain by getting {
126142
dependencies {
127143
implementation(compose.desktop.common)
144+
128145
implementation("com.lordcodes.turtle:turtle:0.10.0")
129-
implementation("io.ktor:ktor-client-okhttp:2.3.6")
146+
implementation("io.ktor:ktor-client-okhttp:3.3.0")
130147
}
131148
}
132149
val jvmTest by getting {
@@ -144,7 +161,7 @@ kotlin {
144161
iosSimulatorArm64Main.dependsOn(this)
145162

146163
dependencies {
147-
implementation("io.ktor:ktor-client-darwin:2.3.6")
164+
implementation("io.ktor:ktor-client-darwin:3.3.0")
148165
}
149166
}
150167
}
@@ -172,11 +189,11 @@ android {
172189
minSdk = (findProperty("android.minSdk") as String).toInt()
173190
}
174191
compileOptions {
175-
sourceCompatibility = JavaVersion.VERSION_17
176-
targetCompatibility = JavaVersion.VERSION_17
192+
sourceCompatibility = JavaVersion.VERSION_21
193+
targetCompatibility = JavaVersion.VERSION_21
177194
}
178195
kotlin {
179-
jvmToolchain(17)
196+
jvmToolchain(21)
180197
}
181198
}
182199

shared/src/androidMain/kotlin/link/socket/kore/ui/agent/AgentCreationScreenPreview.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import androidx.compose.runtime.Composable
55
import androidx.compose.ui.Modifier
66
import androidx.compose.ui.tooling.preview.Preview
77
import link.socket.kore.domain.agent.bundled.WriteCodeAgent
8-
import link.socket.kore.domain.ai.AI
8+
import link.socket.kore.domain.ai.AI_OpenAI
99
import link.socket.kore.domain.llm.LLM_OpenAI
1010
import link.socket.kore.ui.model.ModelSelector
1111

@@ -17,7 +17,7 @@ fun PreviewAgentCreationScreen() {
1717
selectedAgentDefinition = WriteCodeAgent,
1818
setSelectedAgentDefinitionChanged = {},
1919
onCreateAgent = {},
20-
onBackClicked = {}
20+
onBackClicked = {},
2121
)
2222
}
2323

@@ -26,15 +26,15 @@ fun PreviewAgentCreationScreen() {
2626
fun PreviewAgentColumn() {
2727
AgentColumn(
2828
modifier = Modifier.fillMaxSize(),
29-
onAgentSelected = {}
29+
onAgentSelected = {},
3030
)
3131
}
3232

3333
@Preview(showBackground = true, widthDp = 360, heightDp = 220)
3434
@Composable
3535
fun PreviewProviderModelSelector() {
3636
ModelSelector(
37-
selectedProvider = AI._OpenAI,
37+
selectedProvider = AI_OpenAI,
3838
selectedModel = LLM_OpenAI.DEFAULT,
3939
selectableProviders = emptyList(),
4040
selectableModels = emptyList(),

shared/src/commonMain/kotlin/link/socket/kore/domain/ai/AI.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ sealed interface AI<
2929
val name: String
3030
val defaultModel: L
3131
val availableModels: List<L>
32+
val apiToken: String
3233

3334
val client: Client
3435

0 commit comments

Comments
 (0)