S.
04/24/2022, 7:06 PMDropdownMenu
when it contains a lot of items while LazyColumn
with the same amount of items works just fine. It doesn't lag while scrolling but it takes ages to show up and update it's content.
is this a known issue and dropdowns are simply not cut out for >100 items or is the problem rather in my code?Landry Norris
04/24/2022, 9:09 PMspierce7
04/25/2022, 8:20 AMsourceSets.getByName("main").runtimeClasspath.filter { it.path.endsWith(".jar") }
How would I get the same data in the Multiplatform Plugin for the JVM source set?
I'm trying to get a list of all jars so that I can run them through an obfuscator. Everyone else I've seen attempt this seems to be using the jvm plugin, not multiplatformAlina Grebenkina
04/25/2022, 2:10 PMspierce7
04/25/2022, 9:15 PMynsok
04/26/2022, 7:40 AMmin.jar
. The problem is that native distribution packages don’t want to use the obfuscated jar to create .dmg, even when I’ve clearly specified the location.
import com.netguru.extensions.desktopMain
import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
buildscript {
dependencies {
classpath(libs.desktop.proguard)
}
}
plugins {
kotlin("multiplatform")
alias(libs.plugins.compose)
}
group = libs.versions.project.group.get()
version = libs.versions.project.version.get()
kotlin {
jvm("desktop")
sourceSets {
desktopMain {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":application"))
}
}
}
}
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = libs.versions.desktop.packageName.get()
packageVersion = libs.versions.desktop.packageVersion.get()
}
disableDefaultConfiguration()
from(kotlin.targets["desktop"])
val file: File? =
fileTree("build/compose/jars").files.firstOrNull { file: File -> file.name.contains(".min.jar") }
mainJar.set(file)
}
}
tasks.register("createDesktopPackage") {
group = "desktop package"
dependsOn("obfuscate")
dependsOn("package")
}
tasks.register<proguard.gradle.ProGuardTask>("obfuscate") {
val packageUberJarForCurrentOS by tasks.getting
dependsOn(packageUberJarForCurrentOS)
val files = packageUberJarForCurrentOS.outputs.files
injars(files)
outjars(files.map { file -> File(file.parentFile, "${file.nameWithoutExtension}.min.jar") })
val library = if (System.getProperty("java.version").startsWith("1.")) "lib/rt.jar" else "jmods"
libraryjars("${System.getProperty("java.home")}/$library")
configuration("<http://proguard-rules.pro|proguard-rules.pro>")
}
Slackbot
04/27/2022, 11:48 AMDragos Rachieru
04/27/2022, 2:13 PMjs
and ios
in my app using the dev builds, but they don't support material3
yet.
Going through the code here I have found that in the build.gradle
these platforms are not defined. Can you add js
and darwin
in the next version? I saw that there's only one file to create an actual which is just something that returns some hardcoded strings and can be copied from desktop.eygraber
04/28/2022, 10:32 PM1.2.0-alpha01-dev620
to 1.2.0-alpha01-dev675
and it isn't getting found. The latest version on maven central is `dev620`:
Could not find org.jetbrains.compose.material:material:1.2.0-alpha01-dev675.
Searched in the following locations:
- <https://repo.maven.apache.org/maven2/org/jetbrains/compose/material/material/1.2.0-alpha01-dev675/material-1.2.0-alpha01-dev675.pom>
- <https://oss.sonatype.org/content/repositories/snapshots/org/jetbrains/compose/material/material/1.2.0-alpha01-dev675/material-1.2.0-alpha01-dev675.pom>
- <https://s01.oss.sonatype.org/content/repositories/snapshots/org/jetbrains/compose/material/material/1.2.0-alpha01-dev675/material-1.2.0-alpha01-dev675.pom>
lazt omen
04/29/2022, 6:37 AMgalex
04/29/2022, 10:08 AMCody Mikol
05/01/2022, 12:32 AMCody Mikol
05/01/2022, 3:53 PMDavid Herman
05/01/2022, 8:25 PMonKeyEvent
for a Window
, and it's giving me a KeyEvent
, but I'm not sure how to tell if that event represents a typeable character or not without simply creating a huge mapping of Key to chars myself.Sean Proctor
05/01/2022, 8:50 PMDavid Herman
05/02/2022, 6:24 AMGuilherme Delgado
05/02/2022, 9:01 PMandroid.graphics.Camera
equivalent (for 3D operations) so we can perform code like this:
val matrix = android.graphics.Matrix() //we have androidx.compose.ui.graphics.Matrix
val camera = Camera()
drawScope.drawIntoCanvas { canvas ->
//camera transformations like camera.rotateZ, etc..
camera.getMatrix(matrix)
matrix.preTranslate(-x, -y)
matrix.postTranslate(x, y)
canvas.save()
canvas.nativeCanvas.concat(matrix)
drawScope.draw...
canvas.restore()
}
Thanks.David Herman
05/02/2022, 10:36 PMxxfast
05/03/2022, 5:10 AMGrégory Lureau
05/03/2022, 6:54 AMeygraber
05/03/2022, 9:22 AMNoSuchMethodError
when using 1.2.0-alpha01-dev679 with an Android app but not jvm. Is that expected?
java.lang.NoSuchMethodError: No static method isTraceInProgress()Z in class Landroidx/compose/runtime/ComposerKt; or its super classes
Sean Proctor
05/04/2022, 1:53 PMArkadii Ivanov
05/04/2022, 11:08 PMjavaMain
), but keep assembling a normal iOS framework (to be consumed from an XCode project with SwiftUI), and also use Kotlin/React for UI in jsMain
. I managed to put the Compose code into javaMain
and android
and desktop
target compile just fine. I also managed to disable the Compose plugin for JS by adding compose.web.targets()
, and it also compiles just fine. But I can't find a way to disable the Compose plugin for iOS. My iOS build fails with:
Compilation failed: Cannot find the Composer class in the classpath
Is there any workaround? I'm using Compose 1.1.1
.mcpiroman
05/05/2022, 9:41 AMModifier.graphicsLayer()
, every recomposition causes whole screen/everything to redraw, even when not everything is recomposed?spierce7
05/06/2022, 2:47 PM.toComposeImageBitmap().toAwtImage()
and then use ImageIO
to write PNG to an output stream or file.
I’m wondering if there is a way to do skia Image to PNG directly.Paul Woitaschek
05/06/2022, 4:40 PMspierce7
05/06/2022, 4:47 PMThomas
05/06/2022, 5:46 PMCody Mikol
05/07/2022, 2:43 PMMitchell Syer
05/07/2022, 3:58 PMMitchell Syer
05/07/2022, 3:58 PMMichael Paus
05/07/2022, 6:50 PMMitchell Syer
05/07/2022, 6:54 PMMichael Paus
05/07/2022, 7:23 PMMitchell Syer
05/07/2022, 7:28 PMsmooth-scrolling
😄Kirill Grouchnikov
05/08/2022, 4:06 AM