Ewald
06/03/2021, 2:59 PMdrawArc
? Sample in threadYan Pujante
06/03/2021, 4:57 PMtheapache64
06/03/2021, 7:24 PM0.4.0
and kotlin version to 1.5.10
but am getting
Caused by: java.lang.IllegalStateException: Unsupported metadata version. Check that your Kotlin version is >= 1.0
(full stacktrace inside the thread) 🧵wiktor
06/03/2021, 9:25 PMtodo
app from examples? Android and iOS works fine but for desktop I get (on mac):
* What went wrong:
Could not determine the dependencies of task ':desktop:compileJava'.
> Could not resolve all dependencies for configuration ':desktop:compileClasspath'.
> A problem occurred configuring project ':common:utils'.
> org.gradle.api.internal.initialization.DefaultClassLoaderScope@2bfecddc must be locked before it can be used to compute a classpath!
xxfast
06/04/2021, 3:15 AMiosMain
and an ios target?Goregius
06/04/2021, 2:39 PMColton Idle
06/05/2021, 4:33 AMFont(R.font.montserrat_light, FontWeight.Light)
How do you work with R.whatever in CfD?
2. Theme.kt -> Surprisingly most everything in here works too. But isSystemInDarkTheme
does not compile on desktop. import androidx.compose.foundation.isSystemInDarkTheme
Appreciate any advice. Thanks!xxfast
06/05/2021, 9:04 AMjvmTarget
for Compose for desktop?theapache64
06/05/2021, 11:19 AMAman Bansal
06/05/2021, 3:22 PMjava.lang.IncompatibleClassChangeError: Found class org.jetbrains.kotlin.ir.declarations.IrClass, but interface was expected
at androidx.compose.compiler.plugins.kotlin.VersionChecker.check(VersionChecker.kt:62)
at androidx.compose.compiler.plugins.kotlin.ComposeIrGenerationExtension.generate(ComposeIrGenerationExtension.kt:42)
at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory$generateModule$1.invoke(JvmIrCodegenFactory.kt:93)
at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory$generateModule$1.invoke(JvmIrCodegenFactory.kt:89)
at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment(Psi2IrTranslator.kt:91)
at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.generateModule(JvmIrCodegenFactory.kt:106)
at org.jetbrains.kotlin.codegen.KotlinCodegenFacade.compileCorrectFiles(KotlinCodegenFacade.java:35)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.generate(KotlinToJVMBytecodeCompiler.kt:595)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:211)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:154)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:169)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:386)
at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:110)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:286)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl$rebuild(IncrementalCompilerRunner.kt:99)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:114)
at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:74)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:607)
at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:96)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1659)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Colton Idle
06/05/2021, 9:39 PMxxfast
06/06/2021, 3:38 AM@Composable
button between desktop
and android
and getting this
org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during code generation
Complete stacktrace and source in the threadspierce7
06/06/2021, 3:39 AMdesktopMain
source set, but I couldn’t use jvm dependencies in it (It was looked at / viewed as a common source-set I think). What else could I try?xxfast
06/07/2021, 2:53 AM:packageDeb
:packageMsi
or any other native distribution tasks from a single OS (for eg:- mac osx)? If i were to automate builds through ci - would i need to spin up three pipelines for each build?spierce7
06/07/2021, 4:21 AMDropdownMenu
widget. I see internal widgets like DropdownMenuContent
and DropdownMenuPositionProvider
, but not the actual DropdownMenu
. Am I doing something wrong, or has this been removed from Desktop?uli
06/07/2021, 10:16 AM> Task :androidApp:compileDebugKotlin
warning: ATTENTION!
This build uses unsafe internal compiler arguments:
-XXLanguage:+NonParenthesizedAnnotationsOnFunctionalTypes
This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
exception: java.lang.NoClassDefFoundError: kotlin/KotlinNothingValueException
compose 0.0.0-unmerged-build79, kotlin 1.5.10, coroutines 1.4.32-native-mt, gradle 7.0.1
To my knowledge, all versions match. Any idea what could be going wrong?Kirill Grouchnikov
06/07/2021, 11:05 AMsigmadelta
06/07/2021, 6:45 PMron
06/07/2021, 9:32 PMfun main() {
val _state = MutableStateFlow("")
val state = _state.asStateFlow()
GlobalScope.launch {
while (true) {
_state.emit(Date().toString())
delay(1000)
}
}
GlobalScope.launch {
state.collect {
println("received $it")
}
}
Window {
var text by remember { mutableStateOf(state) }
MaterialTheme {
Text(text.value)
}
}
}
Whatever I try I either run into an exception that the state is out of sync. Or nothing works. I have searched the internet all over, but I have been unable to find anything that sheds any light on what I am trying to do.gbaldeck
06/08/2021, 5:54 PMThiago
06/09/2021, 1:22 AM.use {}
function to avoid leak pointers?
I know there is many functions in the Compose canvas but the more powerful still using NativeCanvas.darkmoon_uk
06/09/2021, 6:46 AM0.5.0
don't yet include a critical hotfix that was made to Web between their dev release 14
-> 14.1
.
In Web 14
, kotlinx.coroutines
wasn't updated to 1.5.0
so JS build consistently fails with could not convert sym to ClassifierSymbol
.
I hope this can be fixed for 0.5.0
release, or it won't support 3-platform development 😢
@Igor Demin?Kirill Grouchnikov
06/09/2021, 12:51 PMapplication
composable gone in 0.5.0 builds?Colton Idle
06/09/2021, 2:43 PMhttps://www.youtube.com/watch?v=q8G6nzGhSEE▾
Colton Idle
06/09/2021, 7:53 PM/androidApp
/commonCode
/commonMain
/desktopMain
/iosMain
/androidMain
/iosApp
/desktop
or
/androidApp
/commonComposables
/commonMain
/desktopMain
/androidMain
/commonCode
/commonMain
/desktopMain
/iosMain
/androidMain
/iosApp
/desktop
Basically would you just have a single common module and internally that somehow had both the shared networking code and shared composables (even no compose for ios ui) or just have two modules that are multiplatform modules. one for us and one for network?Rafs
06/09/2021, 11:13 PMPath
object in compose-desktop whilst pivoting at the center? The only transformation method that exists in the Path
object is translate
which internally converts the path object to a skija path and applies matrix transformation to it by calling Matrix33.makeTranslate
. I tried to use the Matrix33.makeRotate
method in this class but it only accepts an angle in degrees without a pivot.Kirill Grouchnikov
06/10/2021, 2:54 PMKeyboard.setShortcut
. This function is no longer found in build224Casey Brooks
06/11/2021, 3:18 PMAbstractJPackageTask
in my build.gradle.kts.
but it still doesn’t seem to be workingKirill Grouchnikov
06/12/2021, 9:29 AMMichael Paus
06/12/2021, 10:43 AMLSOpenURLsWithRole() failed with error -10810 for the file ...MyApp.app.
which is also not very informative. When I then manually run the contents of the created app-image as a Java program I get:
Caused by: org.jetbrains.skiko.LibraryLoadException: Cannot find libskiko-macos-x64.dylib.sha256, proper native dependency missing.
at org.jetbrains.skiko.Library.load(Library.kt:43)
at org.jetbrains.skija.impl.Library$Companion.staticLoad(Library.kt:12)
at org.jetbrains.skija.impl.Library.staticLoad(Library.kt)
at org.jetbrains.skija.Path.<clinit>(Path.java:27)
The app-image contains both libskiko-macos-x64.dylib and libskiko-macos-x64.dylib.sha256. Does anybody have an idea what is going on here?Michael Paus
06/12/2021, 10:43 AMLSOpenURLsWithRole() failed with error -10810 for the file ...MyApp.app.
which is also not very informative. When I then manually run the contents of the created app-image as a Java program I get:
Caused by: org.jetbrains.skiko.LibraryLoadException: Cannot find libskiko-macos-x64.dylib.sha256, proper native dependency missing.
at org.jetbrains.skiko.Library.load(Library.kt:43)
at org.jetbrains.skija.impl.Library$Companion.staticLoad(Library.kt:12)
at org.jetbrains.skija.impl.Library.staticLoad(Library.kt)
at org.jetbrains.skija.Path.<clinit>(Path.java:27)
The app-image contains both libskiko-macos-x64.dylib and libskiko-macos-x64.dylib.sha256. Does anybody have an idea what is going on here?darkmoon_uk
06/12/2021, 11:48 AMcompose.desktop {
application {
...
nativeDistributions {
...
modules("java.net.http")
LSOpenURLsWithRole()
...that's because Java HTTP is missing and can be included with the above line.modules("<http://java.net|java.net>.http")
api(compose.desktop.common)
instead of
api(compose.desktop.currentOs)
...but it doesn't sound like this is the same in your case. You say you're running the contents of the App image manually; is this bypassing scripts that would otherwise be setting the JVM library path?
libskiko-macos-x64.dylib.sha256
would certainly need to be on the JVM's library path.suggestRuntimeModules
that can search the classes you're using and advise on the Java modules to include. I don't know how reliable it is.Michael Paus
06/12/2021, 12:23 PMmodules("java.base","java.naming","java.prefs","java.scripting","java.sql","jdk.jfr","jdk.unsupported","jdk.unsupported.desktop","<http://jdk.crypto.ec|jdk.crypto.ec>","jdk.localedata")
I found them by using jdeps
on my original JavaFX application where I do the packaging more manually and therefore have more insight on what is going on.
Its embarrassing but I should have known that because I have written a tutorial
about that for JavaFX myself together with Dirk Lemmermann. (https://github.com/dlemmermann/JPackageScriptFX)#!/bin/bash
APP_CONTENTS=build/compose/binaries/main/app/MapDemoDesktop.app/Contents
# This works only if the native commands are not stripped
#JAVA_HOME=${APP_CONTENTS}/runtime/Contents/Home
${JAVA_HOME}/bin/java \
-cp "${APP_CONTENTS}/app/*" \
-Djava.library.path="${APP_CONTENTS}/app/" \
-ea \
-Xmx2048m \
MainKt
darkmoon_uk
06/12/2021, 12:43 PMlibskiko-macos-x64.dylib.sha256
can be found in build/compose/binaries/main/app/MapDemoDesktop.app/Contents/app/
? Otherwise there's your problem.Michael Paus
06/12/2021, 12:45 PMsuggestRuntimeModules
task also works. The list can then be shortened to
modules("java.instrument", "java.prefs", "java.sql", "jdk.unsupported","<http://jdk.crypto.ec|jdk.crypto.ec>","jdk.localedata")
The last two had to be added manually and where not suggested. The first of these is needed for https connections.darkmoon_uk
06/12/2021, 12:46 PMjava.instrument
for HTTPS! I'll run into that sooner or later...Michael Paus
06/12/2021, 12:47 PM<http://jdk.crypto.ec|jdk.crypto.ec>
I meant the first of the two which I added manually.darkmoon_uk
06/12/2021, 12:48 PM<http://jdk.crypto.ec|jdk.crypto.ec>
...Michael Paus
06/12/2021, 12:51 PM