epool
05/23/2018, 3:18 PM@DataBuilder
, my classes annotated with this annotation are located in com.my.package.model
and the generated builder class is also located in the same package com.my.package.model
but in the generated directory of course build/generated/source/kapt/debug/com/my/package/model/MyModelBuilder.kt
, I can use these generated classes fine inside of my model classes(written in Kotlin)
BUT I cannot use the generated MyModelBuilder
Kotlin class inside of a java class as a class member
package com.my.package.home;
import com.my.package.model.MyModelBuilder;
public class Home {
MyModelBuilder builder; // <=== AS recognizes the class, but I'm having an compilation issue
}
AndroidStudio recognizes the class, but I’m having this compilation issue
com/my/package/home/Home.java:4: error: cannot find symbol
MyModelBuilder builder;
^
symbol: class MyModelBuilder
location: class Home
it’s weird because I can use this generated builder class only inside of methods, this code works fine
package com.my.package.home;
import com.my.package.model.MyModelBuilder;
public class Home {
public void hello() {
MyModelBuilder builder;
}
}
could somebody here help me to understand this behavior? In advance, thanks!pavel.shackih
05/26/2018, 9:54 PMclass User(var age: Int = 18)
get 18
value.grandstaish
06/12/2018, 12:57 PMspierce7
06/13/2018, 10:16 PMokaymak
07/04/2018, 2:14 PMDataBindingComponent
inside a library module which is being used from an app module (in an android project):
e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class <redacted>.CustomComponent, unresolved supertypes: android.databinding.DataBindingComponent
Is this a bug in kapt?ralf
07/11/2018, 3:50 AMe: Unknown option: infoAsWarnings
with 1.2.60-eap-44
. Anyone else seeing this?yogurtearl
08/01/2018, 11:48 PMIsolationMode.PROCESS
? Maybe could have a flag to use IsolationMode.NONE
?cristiangm
08/22/2018, 3:14 PMagrosner
08/22/2018, 3:49 PMpoohbar
08/27/2018, 1:26 PMkapt
used as an execution in kotlin-maven-plugin
breaks IntelliJ's pom.xml
parsing with Kotlin version 1.2.61
and IntelliJ version 2018.2.2.
Source folders are not marked correctly upon reimporting the maven project, it only marks kapt's generated source directory as source.serj
09/10/2018, 4:11 PMagrosner
09/13/2018, 3:02 PMserj
09/20/2018, 8:58 AMbuild/generated/source/kaptKotlin
?karelpeeters
09/25/2018, 9:03 PMkarelpeeters
09/26/2018, 10:39 AMjmccance
09/26/2018, 3:43 PMquiro
09/29/2018, 5:38 PMkapt.use.worker.api
enabled by default from Kotlin 1.2.70. Did it happen? Is it now the default?bdawg.io
10/10/2018, 12:42 AMRiccardo Montagnin
10/18/2018, 9:26 PM> Task :app:kaptGenerateStubsDebugKotlin
e: error: cannot access Retrofit
class file for retrofit2.Retrofit not found
Consult the following stack trace for details.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for retrofit2.Retrofit not found
The problem is that that class is present inside the following dependency:
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
When I switch from implementation
to compile
, the error disappears. What could it be?Riccardo Montagnin
10/18/2018, 9:30 PMraulraja
11/03/2018, 1:40 AMTypeElement
or the Kotlin Metadata library by @Eugenio for a function of the shape: A.() -> B
it always shows up as Function1<A, B>
but I have not found a place or API that denotes the declaration of such function as being the type of a receiver function.poohbar
11/05/2018, 5:15 PM[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.935 s
[INFO] Finished at: 2018-11-05T12:14:25-05:00
[INFO] Final Memory: 46M/570M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.3.0:kapt (kapt) on project redacted: Execution kapt of goal org.jetbrains.kotlin:kotlin-maven-plugin:1.3.0:kapt failed: A required class was missing while executing org.jetbrains.kotlin:kotlin-maven-plugin:1.3.0:kapt: kotlin/reflect/full/KClasses
deviant
11/06/2018, 1:41 PMkapt
so i enabled it in the gradle config and got this crash:
...
Caused by: java.lang.UnsupportedOperationException: no descriptor for type constructor of TypeVariable(R)?
at org.jetbrains.kotlin.load.kotlin.TypeSignatureMappingKt.mapType(typeSignatureMapping.kt:89)
at org.jetbrains.kotlin.codegen.state.KotlinTypeMapper.mapType(KotlinTypeMapper.java:502)
at org.jetbrains.kotlin.codegen.state.KotlinTypeMapper.mapType(KotlinTypeMapper.java:456)
at org.jetbrains.kotlin.codegen.CodegenUtilKt.asmType(codegenUtil.kt:274)
at org.jetbrains.kotlin.codegen.CodegenUtilKt.asmType(codegenUtil.kt:277)
at org.jetbrains.kotlin.codegen.ExpressionCodegen.expressionType(ExpressionCodegen.java:459)
at org.jetbrains.kotlin.codegen.ExpressionCodegen.visitSafeQualifiedExpression(ExpressionCodegen.java:3159)
at org.jetbrains.kotlin.codegen.ExpressionCodegen.visitSafeQualifiedExpression(ExpressionCodegen.java:108)
at org.jetbrains.kotlin.psi.KtSafeQualifiedExpression.accept(KtSafeQualifiedExpression.kt:23)
at org.jetbrains.kotlin.codegen.CodegenStatementVisitor.visitKtElement(CodegenStatementVisitor.java:31)
at org.jetbrains.kotlin.codegen.CodegenStatementVisitor.visitKtElement(CodegenStatementVisitor.java:22)
at org.jetbrains.kotlin.psi.KtVisitor.visitExpression(KtVisitor.java:182)
at org.jetbrains.kotlin.psi.KtVisitor.visitQualifiedExpression(KtVisitor.java:286)
at org.jetbrains.kotlin.psi.KtVisitor.visitSafeQualifiedExpression(KtVisitor.java:306)
at org.jetbrains.kotlin.psi.KtSafeQualifiedExpression.accept(KtSafeQualifiedExpression.kt:23)
at org.jetbrains.kotlin.codegen.ExpressionCodegen.genQualified(ExpressionCodegen.java:296)
... 103 more
have anybody expected similar issues?kschlesselmann
11/30/2018, 8:24 AM> Task :kaptGenerateStubsKotlin
e: …/Condition.java:16: error: invalid method declaration; return type required
Condition() {
^
with an enum class like
enum class Condition {
EXACT {
override fun evaluate(actual: Set<String>, expected: Set<String>) = actual == expected
},
//....
abstract fun evaluate(actual: Set<String>, expected: Set<String>): Boolean
}
My build setup is
➜ gradle -v
executing gradlew instead of gradle
------------------------------------------------------------
Gradle 5.0
------------------------------------------------------------
Build time: 2018-11-26 11:48:43 UTC
Revision: 7fc6e5abf2fc5fe0824aec8a0f5462664dbcd987
Kotlin DSL: 1.0.4
Kotlin: 1.3.10
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 11.0.1 (Oracle Corporation 11.0.1+13)
OS: Linux 4.19.4-arch1-1-ARCH amd64
Any suggestions how to handle this error?raulraja
12/03/2018, 12:14 PMKDoc
of a class and its functions programmatically?
I looked in both APIs and could not find any references to the content about kdoc.mzgreen
12/13/2018, 8:36 AMEugen Martynov
01/12/2019, 11:50 PMkapt.use.worker.api=true
android build fails with OOMNikky
01/13/2019, 2:16 AMe: /home/nikky/dev/fabric/config/build/tmp/kapt3/stubs/main/config/CottonConfig.java:6: error: incompatible types: NonExistentClass cannot be converted to Annotation
Nikky
01/13/2019, 5:31 AMprocessingEnv.messager
seems to not do anythngmersan
01/13/2019, 9:10 PM