baxter
05/21/2025, 8:30 PMlibrary
depends on feature
• library
also depends on a custom ksp processor
The problem I'm running into is that when I make a change in the strings.xml
file in feature
, the first run generates the source files fine from my ksp processor, but the second run fails due to the generated files being deleted and not generated.
It seems to be an issue with incremental builds, because turning incremental off will cause everything to generate just fine. More in 🧵:Edoardo Luppi
05/28/2025, 12:10 PMKSLogger.error
while returning an empty list, or should I prefer a "never error out" approach?Hamza GATTAL
05/30/2025, 3:04 PMjamireh
06/05/2025, 3:57 PMcompileOnly
dependency on com.google.devtools.ksp:symbol-processing-aa
so that we can invoke KSP manually (for classpath isolation reasons) but we're finding we can't upgrade to 2.1.21-2.0.1
and are stuck on 2.1.20-1.0.31
because the binary version of the former is 2.2.0
, which is still in RC. Our project uses Gradle 8.13 but even on 8.14.1, we can't seem to compile against this new version, presumably because the embedded Kotlin version is still on 2.0.0
Given the KSP version implies compatibility with 2.1.21
, why is the binary version 2.2.0
? Is this is a mistake or do we just need to wait for a version of Gradle that embeds at least 2.1.x?Maya
06/10/2025, 10:53 PMpablisco
06/11/2025, 11:03 PMeygraber
06/23/2025, 6:32 PM-Werror
specified and it isn't yet possible to suppress this one)
w: Language version 1.9 is deprecated and its support will be removed in a future version of Kotlin
e: warnings found and -Werror specified
Seokjae Lee
06/24/2025, 8:54 AMAnton Saatze
06/27/2025, 12:56 PMviluon
06/27/2025, 5:18 PMstartOffset
or on textOffset
. All feedback is welcome! So far no one approved even running the CI on this one 😅Pratik Sahu
07/02/2025, 4:53 PMLog
, both the kaptKotlin
and kspKotlin
are running which takes around 2 mins. When I compared this with before all the changes the build is almost instantRafael Diaz
07/05/2025, 6:54 PMwhen
statements to filter through all schema types, filtering by a specific schema version, or filtering by a specific schema variant (e.g. base DTOs).
There's a Readme with more info. I hope someone could comment if the project seems interesting and/or if the README is understandable. There's a lot of examples, but just the first two examples are important to understanding it.
https://github.com/AvaileDev/KReplicaRafael Diaz
07/07/2025, 5:25 PM@Replicate.Model(variants = [DtoVariant.DATA, DtoVariant.PATCH, DtoVariant.CREATE])
private interface V1 : UserAccount {
val name: Pair<String, String> // this is included in all the variants
@Replicate.Property(include = [DtoVariant.DATA])
val id: Int
@Replicate.Property(exclude = [DtoVariant.CREATE])
val banReason: String?
}
Now say you have Version 2 of User Account (notice we have nominal typing turned on which is another feature):
@OptIn(ExperimentalUuidApi::class)
@Replicate.Model(
variants = [DtoVariant.DATA, DtoVariant.PATCH],
nominalTyping = NominalTyping.ENABLED
)
private interface V2 : UserAccount {
val firstName: String
val lastName: String
@Replicate.Property(include = [DtoVariant.DATA], nominalTyping = NominalTyping.DISABLED)
val id: Uuid
}
I will continue the rest in a thread so this message doesn't get too long.Bernd Prünster
07/11/2025, 9:04 AMAnton Saatze
07/21/2025, 9:01 PMShivam Verma
07/24/2025, 9:25 AMksp(:processor)
, the code is generated in /build/generated/ksp/debug/
but then the generated code is not able to resolve the androidTest dependencies.
2. If I apply kspAndroidTest(:processor)
, my processor is not able to find the annotations in the main source set.
Any tips ?Anton Saatze
07/24/2025, 4:29 PMcomponentN()
function of data classes have modifier override but has no SuperClass with the same function?
Does anybody know ?Sha Sha Chu
07/24/2025, 6:05 PMalexey.andreev
07/30/2025, 6:22 AMproperties
files in src/main/resources
?sindrenm
07/31/2025, 8:00 AMritesh
08/01/2025, 5:29 AMAlexander Ioffe
08/04/2025, 4:07 AMkotlin {
jvm()
...
sourceSets {
val commonMain by getting { ... }
val jvmMain by getting { ... }
}
}
dependencies {
add("kspCommonMainMetadata", project(":my-processor"))
add("kspJvm", project(":my-processor"))
}
In practice however, this seems to blow up my build by generating the same code in commonMain twice!
The first time in MyProject/build/generated/ksp/metadata/commonMain/kotlin
and the second in MyProject/build/generated/ksp/jvm/jvmMain/kotlin
.
Now to be fair, if I have some class in jvmMain it will only appear in the latter location but why is everything from the commonMain directory also there???Hakan Mehmed
08/04/2025, 8:36 PMDeprecation notice for KSP1
KSP1 is deprecated and support will be removed. We are focusing our development efforts on KSP2 to provide better performance, improved APIs, and a more robust architecture for the future.
Compatibility Limitations
Please be aware that KSP1 will not be updated to support upcoming major versions of the Android and Kotlin toolchains. Specifically, KSP1 will not be compatible with:
Kotlin version 2.3.0 and higher.
Android Gradle Plugin (AGP) version 9.0 and higher.
Projects using KSP1 may not behave correctly (or fail the build) if you upgrade to these or any subsequent versions of AGP or Kotlin.
To ensure your annotation processors continue to function correctly and to take advantage of future tooling advancements, it is crucial to migrate your projects to use KSP2 (which has been the default since beginning of 2025)
Support for KSP1 is expected to be removed by end of 2025 (possibly even earlier)
If there are any bugs in KSP2 that are total blockers for the migration to it, please let us knowscana
08/05/2025, 6:02 PM> A failure occurred while executing com.google.devtools.ksp.gradle.KspAAWorkerAction
> Error while resolving ksp.org.jetbrains.kotlin.fir.declarations.impl.FirRegularClassImpl
from RAW_FIR to STATUS
current declaration phase STATUS
origin: Source
session: class ksp.org.jetbrains.kotlin.analysis.low.level.api.fir.sessions.LLFirSourcesSession (Kotlin reflection is not available)
module data: class ksp.org.jetbrains.kotlin.analysis.low.level.api.fir.projectStructure.LLFirModuleData (Kotlin reflection is not available)
KaModule: class ksp.org.jetbrains.kotlin.analysis.project.structure.impl.KaSourceModuleImpl (Kotlin reflection is not available)
platform: JVM (21)
Sandeep Dhami
08/06/2025, 12:07 PMError type '<ERROR TYPE: PlatformResourcesWrapper>' is not resolvable in the current round of processing.
I’ve detailed the problem and shared a code snippet in this GitHub issue:
🔗 https://github.com/evant/kotlin-inject/issues/499
Would appreciate any guidance or workaround suggestions 🙏! CC @evant @eygrabermicah
08/06/2025, 5:55 PMrnett
08/09/2025, 5:50 AMKSValueArgument.value
, it states that it may be a KSClassDeclaration for annotation arguments of type Enum (in this caseKSClassDeclaration.classKind equals to ClassKind.ENUM_CLASS);
. However, ClassKind.ENUM_CLASS
is used for the enclosing enum class
. If this is accurate, how can you determine the entry that is the actual value of the argument? Or is the documentation just mistaken and it's actually ClassKind.ENUM_ENTRY
?Zach G
08/13/2025, 11:42 PMJonas Bernemann
08/14/2025, 1:02 PMgetSymbolsWithAnnotation
and having aggregating
on true?
Context: I am generating a Single Registry class for a bunch of classes annotated, all of the classes are listed in the kspDirtySet
as inputsHakan Mehmed
08/26/2025, 8:22 PMKSP Gradle plugin 2.0.3 to require minimum AGP version 8.4.0+
Please be aware that starting with version 2.0.3, the Kotlin Symbol Processing (KSP) Gradle plugin will introduce a new minimum requirement for the Android Gradle Plugin (AGP). To ensure your project continues to build successfully, you must use AGP version 8.4.0 or higher when using KSP 2.0.3 or any newer release. This will be a runtime requirement, meaning your builds will fail if you update KSP without also updating AGP to the required minimum version or a newer one.
The reason for this is to allow cleaning up various runtime checks related to AGP version within KSP itself. If for any reason this version of AGP seems too new for your project using KSP, do let us know.
We also plan to update the min AGP version as time progresses. :)