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
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ object ProjectSettings {
const val Debug = "debug"
const val Enterprise = "enterprise"
const val Release = "release"

val all = listOf(Debug, Enterprise, Release)
}

object Signing {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.gradle.accessors.dm.LibrariesForLibs
import org.gradle.kotlin.dsl.support.uppercaseFirstChar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

// As of now, we cannot use Gradle version catalogs with Precompiled Script plugins: https://github.com/gradle/gradle/issues/15383
Expand All @@ -8,8 +9,21 @@ plugins {

// Allow configuring which processor to use (or both)
abstract class AnnotationsExtension {

/**
* Configures Koin annotations if enabled.
*/
var useKoin: Boolean = false

/**
* Configures Component factory generation if enabled
*/
var useComponentFactory: Boolean = false

/**
* Configures Android build variant KSP task dependencies for each build variant provided
*/
var androidBuildTypes: List<String> = emptyList()
}

val extension = extensions.create("annotations", AnnotationsExtension::class)
Expand All @@ -19,7 +33,7 @@ afterEvaluate {
if (extension.useKoin) {
ksp {
// enable compile time check
arg("KOIN_CONFIG_CHECK", "true")
arg("KOIN_CONFIG_CHECK", "false")
Comment on lines -22 to +36
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm disabling this for now because Koin annotations somehow refuses to detect dependencies with named qualifier from the same subproject.

// disable default module generation
arg("KOIN_DEFAULT_MODULE", "false")
}
Expand Down Expand Up @@ -58,3 +72,11 @@ tasks.withType<KotlinCompilationTask<*>>().configureEach {
}
}
}

// Manual wiring of task dependencies needed for build variant-dependent KSP tasks
tasks.named { taskName ->
val taskNames = extension.androidBuildTypes.map { "ksp${it.uppercaseFirstChar()}KotlinAndroid" }
taskName in taskNames
}.configureEach {
mustRunAfter("kspCommonMainKotlinMetadata")
}
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Gradle
org.gradle.jvmargs=-Xmx6g -Xms256m -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dkotlin.daemon.jvm.options=-XX:MaxMetaspaceSize=1g
org.gradle.jvmargs=-Xmx6g -Xms256m -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError
kotlin.daemon.jvm.options=-XX:MaxMetaspaceSize=1g
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configureondemand=true
Expand Down
18 changes: 9 additions & 9 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
agp = "8.11.1"
kotlin = "2.1.20"
ksp = "2.1.20-1.0.32" # Must be compatible with: `kotlin`
agp = "8.13.1"
kotlin = "2.2.20"
ksp = "2.3.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

CRITICAL: KSP version does not meet Koin Annotations 2.3.1 requirement.

Koin Annotations 2.3.1 requires KSP 2.3.2, but Line 4 specifies KSP 2.3.0. This version mismatch will cause compilation failures.

Update Line 4 to match the requirement:

- ksp = "2.3.0"
+ ksp = "2.3.2"

Also applies to: 13-13

🤖 Prompt for AI Agents
In gradle/libs.versions.toml around lines 4 and 13, the KSP version is pinned to
2.3.0 which is incompatible with Koin Annotations 2.3.1; update the ksp entries
on those lines to 2.3.2 so they match Koin's requirement (ensure both
occurrences are changed and any related dependency entries remain consistent).

desugarLibs = "2.1.5"
androidxLifecycle = "2.9.1"
androidxComposeBom = "2025.06.01"
Expand All @@ -10,7 +10,7 @@ androidxActivity = "1.10.1"
decompose = "3.3.0"
essenty = "2.5.0"
koin = "4.1.0"
koinAnnotations = "2.1.0" # Must be compatible with: `ksp`
koinAnnotations = "2.3.1" # Must be compatible with: `ksp`
kotlinx-coroutines = "1.10.2"
kotlinx-immutableCollections = "0.4.0"
kotlinx-dateTime = "0.6.2"
Expand All @@ -19,16 +19,16 @@ ktlint = "1.6.0"
detektGradlePlugin = "1.23.8"
composeLint = "1.4.2"
apollo = "4.3.1"
ktorfit = "2.4.0" # Must be compatible with: `ksp`
ktor = "3.1.0" # Must be compatible with: `ktorfit`
ktorfit = "2.6.5" # Must be compatible with: `ksp`
ktor = "3.3.3" # Must be compatible with: `ktorfit`
kotlinx-serialization = "1.8.0" # Must be compatible with: `kotlin`
timber = "5.0.1"
kermit = "2.0.4"
skie = "0.10.2" # Must be compatible with: `kotlin`
kermit = "2.0.8"
skie = "0.10.8" # Must be compatible with: `kotlin`
buildkonfig = "0.17.1"
nsExceptionKt = "1.0.0-BETA-7"
datastore = "1.1.1"
moko-resources = "0.24.5"
moko-resources = "0.25.2"
baselineProfile = "1.3.4"
junit = "1.2.1"
espressoCore = "3.6.1"
Expand Down
1 change: 1 addition & 0 deletions shared/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ plugins {

annotations {
useKoin = true
androidBuildTypes = ProjectSettings.Android.BuildTypes.all
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions shared/feature/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ plugins {
annotations {
useKoin = true
useComponentFactory = true
androidBuildTypes = ProjectSettings.Android.BuildTypes.all
}

dependencies {
Expand Down
1 change: 1 addition & 0 deletions shared/network/graphql/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ plugins {

annotations {
useKoin = true
androidBuildTypes = ProjectSettings.Android.BuildTypes.all
}

kotlin {
Expand Down
1 change: 1 addition & 0 deletions shared/persistence/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ plugins {

annotations {
useKoin = true
androidBuildTypes = ProjectSettings.Android.BuildTypes.all
}

kotlin {
Expand Down
Loading