0.9.1 Released (<https://github.com/nacular/doodle...
# doodle
n
0.9.1 Released (https://github.com/nacular/doodle/releases/tag/v0.9.1) This release includes some new features and lots of bug fixes: • First-class support for Popups • Flexible Modals built using the new
PopupManager
• More Powerful Text Rendering • New LazyPhoto Widget • New API Docs Site
alphabet yellow d 4
🙌 3
a
I love the new API for text rendering, it gives alot of flexibility for what we are doing. Kudos! Just to understand this line:
fitText = setOf(Height)
We mostly set it to empty to have control over width and height. But in the above, you only set height, can you give a little explanation??
On one of our label widget we want to set the size of the Label according to the size of the text passed in. We can use TextMetrics to achieve that. But when the text is longer and we need to wrap, we couldn't get a wrapped height and width.
I had to hack it right now by dividing the text length by max width, to get a proper height, still. But I feel
fitText
is what I need to use, but been busy with other work stuff.
s
@Nick, well done. I am having gradle/java compat problems, like I had/have in v0.9.0. I am going through a list of gradle versions to see what the oldest gradle version that works for me. I am using JDK12. Starting with your Gradle version
Copy code
7.1.1
as defined in your gradle-wrapper properties file. I'll let you know... (I work around it by using Gradle 8.0.2 for my doodle build, but decided not to bother you about it until after the new release -- of the problem still exists.)
When I use your release's gradle-7.1.1, I get a java NoClassDefFoundError:
java.lang.NoClassDefFoundError: Could not initialize class <http://org.jetbrains.kotlin.com|org.jetbrains.kotlin.com>.intellij.pom.java.LanguageLevel
at <http://org.jetbrains.kotlin.com|org.jetbrains.kotlin.com>.intellij.core.CoreLanguageLevelProjectExtension.<init>(CoreLanguageLevelProjectExtension.java:26)
at <http://org.jetbrains.kotlin.com|org.jetbrains.kotlin.com>.intellij.core.JavaCoreProjectEnvironment.<init>(JavaCoreProjectEnvironment.java:42)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreProjectEnvironment.<init>(KotlinCoreProjectEnvironment.kt:26)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$ProjectEnvironment.<init>(KotlinCoreEnvironment.kt:121)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:425)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.createCoreEnvironment(K2JVMCompiler.kt:226)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:152)
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:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360)
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(AccessController.java:712)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
I edited your
gradle-wrapper.properties
, trying each version below. All versions listed below work:
distributionUrl=https\:<//services.gradle.org/distributions/gradle-8.0.2-bin.zip>
distributionSha256Sum=ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7
distributionUrl=https\:<//services.gradle.org/distributions/gradle-7.6.1-bin.zip>
distributionUrl=https\:<//services.gradle.org/distributions/gradle-7.5.1-bin.zip>
distributionUrl=https\:<//services.gradle.org/distributions/gradle-7.4.2-bin.zip>
distributionUrl=https\:<//services.gradle.org/distributions/gradle-7.3.3-bin.zip>
distributionUrl=https\:<//services.gradle.org/distributions/gradle-7.2-bin.zip>
Only
Gradle version 7.1.1
(the one released with v0.9.1) did not work.
distributionUrl=https\:<//services.gradle.org/distributions/gradle-7.1.1-bin.zip>
My IDE is IntelliJ IDEA 2022.3.3 (Ultimate Edition), with JDK12 as the project's JDK.
n
@Stan I'll see if i can repro your issue.
@ayodele the fitText lets the Label chose which of the dimensions it wants to hug to. Setting both width/height will cause the label to adjust so it fits all its text on a single line. Setting just the Height allows you to create labels that wrap (once wrapsWords set) and auto scale vertically to fit their text as you change their width.
s
RE @Stan I'll see if i can repro your issue.... In projects that have gradle wrappers, I always use the
./gradlew
script -- using the version defined in your
gradle-wrapper.properties
, never the gradle version defined in my system profile's
$GRADLE_HOME
, which can be a different gradle version.
.stop.
n
@Stan have you root-caused the issue?
s
v7.1.1 is trying to use a Java class that does not exist in the [CLASSPATH]:
NoClassDefFoundError: Could not initialize class <http://org.jetbrains.kotlin.com|org.jetbrains.kotlin.com>.intellij.pom.java.LanguageLevel
My explanation is not good. LanguageLevel does exit in
kotlin-compiler-embeddable-1.7.21.jar
. It seems to be a reflection related error. There are many reports of this issue, going back a couple of years, and never having a definitive solution for all, other than using different gradle/jdk versions.
n
I'll update the gradle version in the next release.
s
I can work around it. Gradle 8.0.2 works fine.
a
@Stan why do you wanna go that lower with Gradle though
s
@Joe, I want to use latest Gradle, not lower (older). Maybe I don't understand your question. I was testing versions starting with v7.1.1, working through more recent versions, up to 8.0.2
a
Oh okay