Eugen Martynov
01/09/2023, 1:16 PM@Nullable
Object createConversation(int var1, @NotNull String var2, @Nullable String var3, boolean var4, @Nullable String var5, @NotNull Continuation<? super CreateConversationResult> var6);
@Nullable
Object retrySdkSessionInit(@NotNull Continuation<? super Unit> var1);
Or could it be R8? (this is an Android library).Lucy
01/16/2023, 7:05 PMpublic final class Test public constructor() {
public final fun addOne(num: <http://kotlin.Int|kotlin.Int>): <http://kotlin.Int|kotlin.Int> { /* compiled code */ }
public final suspend fun suspendAddOne(num: <http://kotlin.Int|kotlin.Int>): <http://kotlin.Int|kotlin.Int> { /* compiled code */ }
}
Same code after using 1.8.0 and minify
public final class Test {
public static final int $stable;
public Test() {
}
public final Object suspendAddOne(int var1, Continuation<? super Integer> var2) {
return Boxing.boxInt(var1 + 1);
}
public final int addOne(int var1) {
return var1 + 2;
}
}
In 1.8.0, I am also getting an extra parameter variable with suspend functions. I can't find any documentation or logs about this change (looked at kotlin, gradle, and minify/R8 release pages). If anyone could point me in the right direction it would be greatly appreciated!jean
02/07/2023, 8:16 AMUnresolved reference
wherever the library is referencing a generated class/function. What am I suppose to do to tell the publish gradle task to also publish the generated code?David Kubecka
04/13/2023, 10:31 AMkotlin-maven-plugin
question: I'm using that plugin to run a (java) annotation processor. That processor uses Diagnostic.Kind.NOTE
for diagnostic messages. These show up as ERROR in the plugin output, whereas the equivalent java plugin shows them as INFO. Is this expected?Daniele Segato
06/06/2023, 7:09 AMjava.lang.IllegalArgumentException: com.intellij.openapi.externalSystem.model.project.dependencies.DependencyScopeNode is not an interface
at java.base/java.lang.reflect.Proxy$ProxyBuilder.validateProxyInterfaces(Unknown Source)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.<init>(Unknown Source)
at java.base/java.lang.reflect.Proxy$ProxyBuilder.<init>(Unknown Source)
at java.base/java.lang.reflect.Proxy.lambda$getProxyConstructor$0(Unknown Source)
at java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(Unknown Source)
at java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(Unknown Source)
at java.base/java.lang.reflect.Proxy.getProxyConstructor(Unknown Source)
at java.base/java.lang.reflect.Proxy.newProxyInstance(Unknown Source)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter.createView(ProtocolToModelAdapter.java:160)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter.convert(ProtocolToModelAdapter.java:276)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter.access$1500(ProtocolToModelAdapter.java:56)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$AdaptingMethodInvoker.invoke(ProtocolToModelAdapter.java:477)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$PropertyCachingMethodInvoker.invoke(ProtocolToModelAdapter.java:705)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$SafeMethodInvoker.invoke(ProtocolToModelAdapter.java:742)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$SupportedPropertyInvoker.invoke(ProtocolToModelAdapter.java:766)
at org.gradle.tooling.internal.adapter.ProtocolToModelAdapter$InvocationHandlerImpl.invoke(ProtocolToModelAdapter.java:432)
at jdk.proxy6/jdk.proxy6.$Proxy166.getCompileDependenciesGraph(Unknown Source)
in ProjectDependenciesSerializationService$2.process(ProjectDependenciesSerializationService.java:90)
The project get stuck at initial import when I open Android Studio, this started happening with AS Hedgehog Canary 6: worked in Canary 5.
https://issuetracker.google.com/issues/285195965dave08
06/19/2023, 11:33 AMCannot use @TaskAction annotation on method AbstractKotlinCompile.execute() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.
when upgrading from an older AGP version to 8.0.2?Norbi
09/05/2023, 12:41 PMcompose {
kotlinCompilerPlugin.set(dependencies.compiler.forKotlin("1.8.20"))
kotlinCompilerPluginArgs.add("suppressKotlinVersionCompatibilityCheck=1.8.21")
}
How should I modify the above configuration to prevent
Compose Multiplatform 1.5.0 doesn't support Kotlin 1.9.10
error?
Thanks.chi
09/18/2023, 5:17 AMkapt
to ksp
but I’m seeing the following error;
Execution failed for task ':app:kspDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
Please any idea what could be the cause and how I can fix this?d4span
11/01/2023, 9:31 PM[INFO] --- kotlin:1.9.20:kapt (default-kapt) @ awesomeproject ---
[ERROR] java.lang.IllegalAccessError: superclass access check failed: class org.jetbrains.kotlin.kapt3.base.javac.KaptJavaCompiler (in unnamed module @0x63300c4b) cannot access class com.sun.tools.javac.main.JavaCompiler (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.main to unnamed module @0x63300c4b
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:524)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:714)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at org.jetbrains.kotlin.kapt3.base.KaptContext.<init>(KaptContext.kt:55)
With Kotlin 1.9.10, everything works as expected.
Any ideas how I can fix this?Christopher Hübner
01/15/2024, 9:08 AMVivek Rajendran
02/21/2024, 6:01 AMDmytro Serdiuk
02/26/2024, 12:34 AM<executions>
<!-- Replacing default-compile as it is treated specially by maven -->
<execution> <id>default-compile</id> <phase>none</phase>
</execution>
<!-- Replacing default-testCompile as it is treated specially by maven --> <execution>
<id>default-testCompile</id>
<phase>none</phase>
I know that default-goal is added as an ID by default, but why “default-compile” is called first even if the plugin defined the second inn the pom file?
Thanks!cfleming
04/09/2024, 6:39 AMczuckie
04/15/2024, 11:08 AMAndy Hebert
04/18/2024, 7:15 PM[5.016s][info ][cds ] Run GC done
[5.016s][error ][cds ] Error: non-empty directory '/home/a/git/u/build/classes/kotlin/main'
Hint: enable -Xlog:class+path=info to diagnose the failure
Because Kotlin is putting a app-name.kotlin_module int the build/classes/kotlin/main/META-INF directory. Anyone have a way to work around this?Norbi
08/16/2024, 1:55 PMrobnik
08/21/2024, 3:57 PM[INFO] --- kotlin-maven-plugin:2.0.10:compile (compile) @ omnisee ---
[WARNING] Using experimental Kotlin incremental compilation
[ERROR] Incremental compilation failed: java.lang.NegativeArraySizeException
java.io.IOException: java.lang.NegativeArraySizeException
at com.intellij.util.io.IOUtil.readString(IOUtil.java:48)
at org.jetbrains.kotlin.incremental.storage.StringExternalizer.read(externalizers.kt:225)
at org.jetbrains.kotlin.incremental.storage.FileDescriptor.read(FileToPathConverter.kt:37)
at org.jetbrains.kotlin.incremental.storage.FileDescriptor.read(FileToPathConverter.kt:30)
Harish Reddy
09/16/2024, 10:28 AMCoreModule
Module-2: FeatureModule
FeatureModule
references CoreModule
internally using api(project(path = ":CoreModule))
. The final artifact FeatureModule
after publishing to maven/maven local is supposed to be integrated in main Android app.
So, now my expectation is to have the code within CoreModule
to be accessible inside the main Android app since FeatureModule
includes the CoreModule
. But, I can’t access the code/classes within CoreModule
inside the main Android app. This is a KMP project which I am not so familiar with. So, not sure if it is a KMP thing or something else. Any idea what could be missing in this setup? I am attaching reference code in the thread.Natalia Mishina
10/09/2024, 9:16 AMjw
10/24/2024, 4:14 AMCharlie Tapping
01/20/2025, 6:15 PMcalidion
02/02/2025, 2:08 PMjoseph_ivie
02/20/2025, 5:39 AM.iml
files to define the modules, but the Gradle integration does not appear to generate any of these files, yet somehow works. Is an IntelliJ plugin necessary to define the projects and modules? If so, can anyone get me a good starting point? My non-multiplatform version of this project just used those `.iml`s but that's not an option this time around.jrod
04/03/2025, 12:36 AMdead.fish
05/05/2025, 3:05 PMjava.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.incremental.IncrementalCompilationFeatures.<init>(boolean, boolean, boolean, boolean, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker)'
at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.makeIncrementalCompilationFeatures(AbstractKotlinCompile.kt:288)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.makeIncrementalCompilationFeatures(KotlinCompile.kt:476)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompilerAsync$kotlin_gradle_plugin_common(KotlinCompile.kt:331)
at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompilerAsync$kotlin_gradle_plugin_common(KotlinCompile.kt:55)
at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.executeImpl(AbstractKotlinCompile.kt:314)
at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.execute(AbstractKotlinCompile.kt:263)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:45)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.execute(IncrementalTaskAction.java:26)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:244)
Anybody has seen this before?dead.fish
05/05/2025, 3:08 PM-Pkotlin.incremental=false
) fixes the issue. This seems to affect both Android and multiplatform projects.jw
06/04/2025, 2:00 AMassociateWith
on a custom compilation seems to depend on the jar output of the target compilation whereas in 2.0 it depended only on the classes. Depending on the jar is problematic because this associateWith
depending on the jar, this creates a task cycle.
Is there some other way to do what associateWith
was doing without depending on the jar?jw
10/02/2025, 6:40 PMcom.android.kotlin.multiplatform.library
plugin creates a KotlinTarget
(com.android.build.api.variant.impl.KotlinMultiplatformAndroidLibraryTargetImpl
) whose platformType
is "jvm" as opposed to "androidJvm". @Sebastian Sellmair [JB] indicated on another Slack workspace that this was intentional. A few questions have come up related to this.
How should we write code that operates on all targets (or a subset of them) and correctly differentiate JVM vs. Android. For example, Android differs from the JVM in having multiple variants by default, having two test compilations (times the number of product flavors), etc.
Should we prefer doing type checks on the target instead of using platformType
? And the fact that this comes with extra burden when you have a compileOnly
dependency on AGP, since you can no longer do a simple as? KotlinMultiplatformAndroidLibraryTarget
without a try/catch on NoClassDefFoundException
, or otherwise doing a Class.forName
and then reflective isInstance
.Timofey Solonin
10/13/2025, 8:25 AMMarcin Mycek
10/14/2025, 2:01 PMlinuxArm64
yes, but not `linux`; macosX64
yes, but not `macos`; etc.)
◦ Ignoring platforms that don't have lower-level (android
and jvm
) :)
• OR higher-level platforms that are not common
(so native
, apple
, web
, or any similar level custom source set)
Please share:
• What do you configure? Why? Is it app module or library module?
◦ What others have seen do?
• Can you point me to the repository if it's public? Share a build script or part of it?
If you want write a bit or just share a link - kodee loving thank you color ! If you have time to write more - kodee loving thank you color !