glenkpeterson
12/27/2021, 6:33 PMbuild.gradle.kts
files. I've been manually signing in to Sonatype in order to "close" and "release" the uploaded artifacts for a few years. I never had to do this with my maven projects. I think it is not necessary any more with gradle. Is there a build.gradle.kts file you would suggest I copy from somewhere? For reference, here is one project's build file that I have to then close and release manually through the web UI: https://github.com/GlenKPeterson/Indented/blob/master/build.gradle.ktsRainer Schlonvoigt
01/07/2022, 2:24 PMSet<SomeInterface>
translates badly into Swift. While i understand why the language allows for it, i would like to forbid it for our own projects. Does anybody have an idea how to best achieve this?Can
01/14/2022, 1:26 PMbuildSrc
. While most parts were very straightforward I couldn’t find a way to use output.versionNameOverride
in the Kotlin Gradle API. There seems to be the function setVersionCodeOverride
in ApkVariantOutput
but that’s deprecated. ApkVariantOutputImpl
is part of the internal API and thus not useable. Any ideas?ipe_1221
01/20/2022, 10:43 AMClaude Brisson
01/21/2022, 7:13 AMimplementation(project(":common-lib"))
in its dependencies, and does see the common code, but does not see the expect/actual declarations.
Any idea why? Thanks.Ayfri
02/08/2022, 11:43 AMTom Dyas
04/19/2022, 5:51 AMTom Dyas
04/19/2022, 1:25 PMkotlinc
compiler plugins into the Pants build tool’s experimental Kotlin backend. I am getting an AbstractMethodError
in an integration test using the allopen
plugin. Details in thread.elihart
05/25/2022, 12:13 AMThe task was not up-to-date because of the following reasons:
The type of task ':base:compileDebugKotlin' has changed from 'org.jetbrains.kotlin.gradle.tasks.KotlinCompileWithWorkers_Decorated' to 'org.jetbrains.kotlin.gradle.tasks.KotlinCompile_Decorated'.
I am looking for reasons why this would happen. We are on kotlin 1.6.21 and as far as I can tell the KotlinCompileWithWorkers
class doesn’t exist anymore in that branch. Any leads are appreciatedKinylund
05/30/2022, 6:33 PMPaul-Arthur Thiery
06/14/2022, 2:11 PMUnresolved Reference
for every single import in my .kt
files. Using the builtin Intellij compiler works fine however ! Is this a known issue ?Paul-Arthur Thiery
06/14/2022, 3:18 PMPaul-Arthur Thiery
06/14/2022, 7:19 PMAyfri
07/16/2022, 1:16 PMobadz
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!