obadz
09/10/2022, 9:18 AMpardom
11/08/2022, 3:29 PMFatFrameworkTask
for native targets. Is there a canonical way to produce a fat JAR?Sam Gammon
01/01/2023, 2:52 AMnative-image
is supported out of the box.
• 🚀 Trying it out
curl -sSL --tlsv1.2 dl.elide.dev/cli/install.sh | bash -s -
👆 the one liner works on Darwin (amd64/arm64), and Linux (amd64) so far.If you prefer NPX:
npx @elide-dev/elide@alpha shell
K Building Kotlin apps with it
•
Elide can be used as a plain library with a regular Micronaut server, and Ktor support is on the way. There are Maven artifacts in a custom repository which is easy to use during the alpha; you can see a sample here.
• G Gradle plugin
You can easily install the Gradle plugin to build your frontend assets and your Kotlin/JS, and package it into your server binary. It will handle building for SSR and CSR both, so you can easily switch between browser rendering modes. Check it out here. Maven and Bazel support are planned.
• 🖥️ Using the shell
elide shell
drops you into a shell just like Node (see attached screenshot), the difference being the URL
class we're using here is implemented in Kotlin, backed by the road-tested power of Micronaut, KotlinX, Netty, and the Java standard library. It has simply been adapted for use in JavaScript, according to the WhatWG URL Spec.
• js Use Kotlin/JS or regular Node stack
Elide packages and consumes your JS/TS with built-in support for esbuild
, so you can use a standard Node toolchain or the Kotlin/JS stack.
• 💨 Super fast React SSR
Because Elide is basically Kotlin with a super-fast JS runtime attached, it can do JS SSR without leaving the JVM. This can soon be drop-in compatible with many React apps. You can see a live sample here to confirm it is fast and server-rendered. The code for that sample is pasted below to show how simple it is to call back and forth between Kotlin and your React app:
@Page class Index : PageWithProps<YourProps>(YourProps.serializer()) {
// Serve React SSR.
@Get("/") suspend fun indexPage(request: HttpRequest<*>) = ssr(request) { // 1: tell the server we're going to do SSR for this request
head {
title { +"Hello, Elide!" }
stylesheet("/styles/base.css")
stylesheet("/styles/main.css")
script("/scripts/ui.js", defer = true) // <-- 2: serve the CSR bundle so it can hydrate the react SSR response
}
body {
injectSSR(this@Index, request) // <-- 3: execute the JS VM to produce the SSR response, and splice it into the server response
}
}
}
• 🐙 Contributors needed
The future of software is much more polyglot than today's paradigm: developers love to fight about frameworks, but at the end of the day, we're all writing code, and eliminating barriers between languages means easier collaboration and more value for all of us. It shouldn't be a Node vs. The World or a Rust vs. The World argument; we should get to pick and pull the best code we want from anywhere and use it to build our apps, especially from a multi-platform language like Kotlin.
This runtime and framework are designed for that future. *If you agree, join us and make a dent in the universe*; you'll have a chance to be impactful and shape a brave new idea from the ground up.
• 🙏 Thank you
We chose Kotlin because of the fantastic community. 2023 will be a massive year for Kotlin, and we think that betting the farm on it is reasonable and smart. We are super excited about what JetBrains and Kotlin have in store for us with K2, context receivers, value classes... just so much to look forward to.
Cheers and happy new year, Kotlin devs,
K sam
Slack ConversationDavid Kubecka
01/02/2023, 3:01 PMmaven-compiler-plugin
I get the same error during manual maven compilation ("package does not exist") as I get in IDEA when the pom is set up correctly.
Can anyone shed more light into this issue?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.