no
02/22/2022, 7:52 AMspierce7
02/23/2022, 9:06 PMMatthias Geisler
02/24/2022, 1:54 AMksp/jvmTest
, it is in 1.0.4. ksp/jvm/jvmTest
. Is that change intensional?PixelHamster
02/26/2022, 3:37 PMmyotive
03/01/2022, 11:49 PM@SerializedName
annotation and Moshi’s @Json
annotation to all the properties of a data class. Everything seems to be working in my transformer (IrElementTransformerVoidWithContext
) , but the resulting class doesn’t seem to have the annotations when I try to run a unit test (which loads the class from a temp working directory).
If anyone has any documentation or resources that could help, I would be most grateful. Thanks!jameskleeh
03/16/2022, 12:12 AMjean
03/16/2022, 8:34 PMMatthias Geisler
03/17/2022, 7:48 PMjameskleeh
03/18/2022, 3:13 AMMatthias Geisler
03/22/2022, 5:12 PMAndrea Di Menna
03/23/2022, 12:23 PMdebug
and release
build types. Different source folders are created for each build type, i.e. build/generated/ksp/debug/kotlin
and build/generated/ksp/release/kotlin
respectively.
In order to be able to consume the generated code I have added the following code in my build.gradle.kts
buildTypes {
getByName("debug") {
sourceSets {
getByName("main") {
kotlin.srcDir(file("build/generated/ksp/debug/kotlin"))
}
}
}
getByName("release") {
sourceSets {
getByName("main") {
kotlin.srcDir(file("build/generated/ksp/release/kotlin"))
}
}
}
}
Unfortunately, if I run kspDebugKotlin
and kspReleaseKotlin
w.o. cleaning the build
folder my generated classes are marked with errors in Android Studio. The error reads Redeclaration
as if both folders were added to the same source set.
Do you know how to get rid of this error?
Using:
• ksp 1.5.31-1.0.0
• Kotlin 1.5.31
• Android Studio Bumblebee
• AGP 7.1.0
efemoney
03/23/2022, 6:45 PMTwoClocks
03/26/2022, 3:35 AMFileAlreadyExistsException
. It seems really hard to get any debugging info out of grradle, but I think my annotation process is only called once, and the annotation only exists once. Any ideas? The file it's complaining about is a file I generate.TwoClocks
03/26/2022, 11:53 PMmkrussel
03/31/2022, 9:05 PMprimaryConstructor
to get the constructor. With the following code the constructors docString
property is null.
/**
* A fake service that needs to be removed.
*/
@MainThread
@NotThreadSafe
public class FooService @GenerateOptions
/**
* The constructor.
*
* @param other The other thing
*/
public constructor(
/**
* The bar.
*/
@get:MainThread public val bar: Int,
/**
* The id.
*/
@get:MainThread public val id: String? = null,
other: String? = null,
)
Zac Sweers
04/02/2022, 5:57 PMVladimir Tagakov
04/06/2022, 3:42 AMKDoc
for com.google.devtools.ksp.symbol.KSTypeReference#resolve
and it says
Calling [resolve] is expensive and should be avoided if possible.
Does anyone know should I bother about memoizing the result if I plan to call resolve
several times on the same type in different places? Or is it being cached somewhere inside?haoxiqiang
04/07/2022, 4:00 AM@Layout(R.layout.album_medium)
class AlbumViewHolder(view: View) : FlowHolder<Album>(view) ...
I have two problems
1.when I used KSAnnotated.annotations, I have got the int value of R.layout.album_medium, Is there any way to get the defined text?
2.I want to get Album class defined by Layout annotation. Could I get it from KSAnnotated? If not, what should I do?Dmitriy Tarasevich
04/10/2022, 7:25 PMgetSymbolsWithAnnotation
returns 0 symbols when my modules are only targeting the jvm
. If i re-add my js
or ios
targets it picks up the annotations correctly.Rafael Costa
04/12/2022, 2:43 PM@Keep
(from Android) and will it always work in a way that I can safely call it via reflection from my library? Or should I just use a rule on the consumer proguard? (I’m not sure if I can write rules for classes from other modules, although I’m guessing I cannot?)Justin Tullgren
04/12/2022, 6:01 PMefemoney
04/14/2022, 2:16 PMGrégory Lureau
04/14/2022, 8:32 PMcharbgr
04/20/2022, 10:39 AMmartmists
04/20/2022, 5:48 PMmartmists
04/21/2022, 8:54 AMGrégory Lureau
04/21/2022, 7:51 PMkotlin.Any
(which is a class) as superTypes
, is there a reason for that?Norbi
04/22/2022, 4:22 PMOliver.O
04/22/2022, 6:01 PMCornelius Wichering
04/22/2022, 7:47 PM@OneAnnotation(value = "someDetail")
fun methodA() { ... }
I want ksp to add another annotation like this
@AnotherAnnotation(value = "someDetail") // value taken from "original" annotation
@OneAnnotation(value = "someDetail")
fun methodA() { ... }
Do you think ksp is a good fit for this task? Any hints on how to do it?Cornelius Wichering
04/22/2022, 7:47 PM@OneAnnotation(value = "someDetail")
fun methodA() { ... }
I want ksp to add another annotation like this
@AnotherAnnotation(value = "someDetail") // value taken from "original" annotation
@OneAnnotation(value = "someDetail")
fun methodA() { ... }
Do you think ksp is a good fit for this task? Any hints on how to do it?yigit
04/22/2022, 7:48 PMCornelius Wichering
04/22/2022, 7:50 PM