martmists
01/13/2022, 1:39 PMError:Kotlin: [Internal Error] java.lang.IllegalStateException: The provided plugin androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar is not compatible with this version of compiler
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerExtensionsFromPlugins$cli(KotlinCoreEnvironment.kt:675)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$ProjectEnvironment.registerExtensionsFromPlugins(KotlinCoreEnvironment.kt:169)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:216)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment.<init>(KotlinCoreEnvironment.kt:111)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:485)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.createCoreEnvironment(K2JVMCompiler.kt:227)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:153)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:92)
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.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1542)
at jdk.internal.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
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:829)
Caused by: java.lang.AbstractMethodError: Receiver class androidx.compose.compiler.plugins.kotlin.ComposeComponentRegistrar does not define or inherit an implementation of the resolved method 'abstract void registerProjectComponents(com.intellij.mock.MockProject, org.jetbrains.kotlin.config.CompilerConfiguration)' of interface org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar.
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerExtensionsFromPlugins$cli(KotlinCoreEnvironment.kt:667)
... 27 more
My build.gradle.kts:
import org.jetbrains.compose.compose
plugins {
kotlin("multiplatform") version "1.5.31"
kotlin("plugin.serialization") version "1.5.31"
id("org.jetbrains.compose") version "1.0.0"
application
id("com.github.ben-manes.versions") version "0.39.0"
}
group = "com.martmists.mods"
version = "1.0"
repositories {
google()
mavenCentral()
maven("<https://maven.pkg.jetbrains.space/public/p/compose/dev>")
maven("<https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven>")
}
kotlin {
js(IR) {
browser {
}
binaries.executable()
}
jvm {
compilations.all {
kotlinOptions.jvmTarget = "16"
}
withJava()
}
sourceSets {
val jsMain by getting {
dependencies {
implementation(npm("highlight.js", "10.7.2"))
implementation(compose.web.core)
implementation(compose.runtime)
implementation("io.ktor:ktor-client-core:1.6.3")
}
}
val jvmMain by getting {
dependencies {
implementation("io.ktor:ktor-server-tomcat:1.6.3")
implementation("io.ktor:ktor-html-builder:1.6.3")
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.2")
implementation("ch.qos.logback:logback-classic:1.2.6")
implementation("org.jetbrains:markdown:0.2.4")
}
}
val commonMain by getting {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0")
api(compose.runtime) // Needed to make jvmMain/commonMain compile despite only using compose web for frontend
}
}
}
}
application {
mainClass.set("com.martmists.mods.backend.ServerKt")
}
tasks.named<Copy>("jvmProcessResources") {
val jsBrowserDistribution = tasks.named("jsBrowserDistribution")
from(jsBrowserDistribution)
}
tasks.named<JavaExec>("run") {
dependsOn(tasks.named<Jar>("jvmJar"))
classpath(tasks.named<Jar>("jvmJar"))
}
Using Java 16/17 and gradle 7.3Brian Guertin
01/13/2022, 3:34 PMСтефан Јовановић
01/14/2022, 6:17 PMGrouvie
01/16/2022, 2:27 PM.container.button-pressed .show-overlay {
transform: translateX(0);
}
At the moment my Stylesheets look similar to this:
object SpanStyleSheet : StyleSheet() {
val span by style {
fontSize(12.px)
maxWidth(20.vw)
}
}
Second question:
How can I combine multiple StyleSheets together?Greg Steckman
01/18/2022, 4:38 AMe: Could not find "org.jetbrains.compose.web:web-svg" in [C:\Users\Greg\AppData\Local\kotlin\daemon]
e: java.lang.IllegalStateException: FATAL ERROR: Could not find "org.jetbrains.compose.web:web-svg" in [C:\Users\Greg\AppData\Local\kotlin\daemon]
rocketraman
01/18/2022, 8:56 AMDiv
. Do we have something like React's __dangerouslySetInnerHtml
function?Artur Gniewowski
01/18/2022, 11:05 AMLubomir Pisk
01/21/2022, 8:09 AMimplementation(project(":shared:gallery"))
kotlin {
js(IR) {
browser()
binaries.executable()
}
sourceSets {
val jsMain by getting {
dependencies {
implementation(compose.web.core)
implementation(compose.runtime)
implementation(project(":shared:gallery"))
}
}
}
}
then I receive blank screen and error in Web Inspector (Safari).
Without dependency is everything ok.
I can share more details.
Thank you.spierce7
01/21/2022, 5:04 PMMini
01/21/2022, 6:12 PMEduardo Zuza
01/21/2022, 7:41 PMDavid Herman
01/23/2022, 12:05 AMRohan Maity
01/24/2022, 8:33 AMmodals/dialog forms
compose web
I added Bootstrap modal but it's loaded as different screenRohan Maity
01/24/2022, 7:13 PMobject ModalStyle: StyleSheet() {
val btsModal by style {
keyframes {
from { this.property("top",0.px) }
to { this.property("top", 30.px) }
}
}
}
I added this to my div's style like below, but its not animating
Div(
attrs = {
classes("modal")
id(id)
tabIndex(-1)
attr("aria-labelledby", label)
style {
display(displayState.value)
// background("#0000004d")
position(Position.Relative)
animation(ModalStyle.btsModal) {
duration(10.s)
}
}
}
)
But no animation happensIlya Kalibrov [JB]
01/25/2022, 10:28 AMSteffen Funke
01/26/2022, 1:49 PMjava.net.URI
is not accessible, obviously 🤔Derek Ellis
01/27/2022, 2:02 AMdynamic
as the type of a parameter in a composable function? (Stack trace in thread)
@Composable
fun myComposable(value: dynamic) {
}
hfhbd
01/30/2022, 4:12 PMrouting-compose:0.1.7
is out, with support for redirection if the routing tree changed. Simple use case: You got a link which requires a login first.
https://github.com/hfhbd/routing-composeDavid Herman
02/08/2022, 11:33 PMStyleSheet
s work under the hood. I'd like to save my page after it renders once and see the styles in the DOM, but instead, it seems like only empty <style>
tags are there.Marcin Wisniowski
02/09/2022, 3:29 PMfair_enough
02/09/2022, 4:39 PMrocketraman
02/09/2022, 5:16 PMelectrolobzik
02/10/2022, 9:14 AM/
, /users
and /profile
. What is the best approach for navigation? Should my backend serve different html files with different Compose js scrips inside for each of this pages or can I use just one entry point (backend returns the same html file for all 3 urls) in the Compose app and show different content depending on url?hfhbd
02/10/2022, 5:19 PMElementBuilderImplementation
private? How do you implement new html elements, without copying this class?David Herman
02/11/2022, 4:21 PMRahul Rawat
02/12/2022, 2:20 PMImg(
src = "../resources/ic_splash.svg",
attrs = {
style {
width(300.px)
height(300.px)
}
}
)
Slackbot
02/13/2022, 9:31 AMRahul Rawat
02/13/2022, 2:26 PMModule not found: Error: Can't resolve 'fs' in '/Users/rahulrawat/Desktop/Projects/web/Address/build/js/node_modules/sql.js/dist'
Has anyone faced this and been able to resolve?Big Chungus
02/15/2022, 8:20 AMDavid Herman
02/16/2022, 7:49 PMe: This version (1.1.0-alpha06) of the Compose Compiler requires Kotlin version 1.5.31 but you appear to be using Kotlin version 1.6.10 which is no
t known to be compatible. Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).