https://kotlinlang.org logo
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
benchmarks
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
confetti
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
lincheck
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by
Title
x

Xhivat Hoxhiq

01/26/2023, 1:46 PM
How can I compile the compose library and load the local version in my project? I cloned the repo and I think I built the library using
./gradlew :compose:assemble
I have no idea where to from this though and I did spend a whole trying to make it work. Should I post this in #androidx instead as it's library stuff?
b

Big Chungus

01/26/2023, 2:15 PM
Try adding it as gradle included build and see if it resolves
x

Xhivat Hoxhiq

01/26/2023, 2:22 PM
Thanks for the reply, I'll be honest I'm a noob to this and especially so with the Kotlin DSL that the desktop compose project generated, it's completely different from what I get on an Android project. How would I that?
e

eygraber

01/26/2023, 2:38 PM
x

Xhivat Hoxhiq

01/26/2023, 2:39 PM
Oh wow! Thanks a lot, that's exactly what I was looking for.
I imagine it'd be super useful to set up a local maven repo right?
k

Kirill Grouchnikov

01/26/2023, 2:40 PM
https://github.com/JetBrains/androidx is where the multiplatform version of Compose lives. There’s a lot of branches in there. Looks like 1.3.0 is getting almost ready at https://github.com/JetBrains/compose-jb/tree/release/1.3.0
As for a local repo, the question is what do you need. Are you planning to do local changes to the Compose sources? Are you in a situation without network connectivity and you want all your dependencies available locally? Something else that would need a local copy of Compose?
x

Xhivat Hoxhiq

01/26/2023, 2:42 PM
Aha! So I should clone this, and not from the one from Google?
I want to create a text editor widget
k

Kirill Grouchnikov

01/26/2023, 2:43 PM
OK, you don’t need a local repo for that
x

Xhivat Hoxhiq

01/26/2023, 2:43 PM
Need multi-cursor support and some other features that I think would be cleaner to modify the library
What do you recommend I do instead?
I need to modify some internals I think, and I need to have a delegate that handles the multi cursors and a shared edit buffer
k

Kirill Grouchnikov

01/26/2023, 2:45 PM
Step back for a second. Do you know that you need to modify Compose sources, or you think you might need to? These are two different things. And if you are modifying Compose sources, you need a plan to get them upstreamed so that your library / widget is useful outside of your local environment.
x

Xhivat Hoxhiq

01/26/2023, 2:46 PM
I don't have to but if I don't the solution is pretty hacky although very simple. But I'd like to try what a tailor made solution would look like. Hmm, is there a use for this in upstream?
k

Kirill Grouchnikov

01/26/2023, 2:46 PM
That’s impossible to answer until you show the usefullness of the code to the project owners
x

Xhivat Hoxhiq

01/26/2023, 2:47 PM
I will be using a ropes data structure internally and this would allow for rich text editing with large files but I wonder how much of those features would be considered bloat
Or maybe I should decouple the ropes structure from the internal and pass strings to the internals, I have no idea what is better but I'd like to test things out first and get familiar with building the library and modifying it first which will take me a few days for sure
k

Kirill Grouchnikov

01/26/2023, 2:50 PM
Back to your original question, I haven’t tried local deployment with Compose, but for Skiko it was pretty easy.
./gradlew :skiko:publishToMavenLocal
was the only thing to run, and then update your sample module to local at local maven first and use
0.0.0-SNAPSHOT
as the version. Might be different for Compose though
Ah, the instructions for Compose are at the link that Eliezer posted earlier
x

Xhivat Hoxhiq

01/26/2023, 2:56 PM
Yup, thanks a lot both of you, this is amazing! And to think that I didn't even clone the correct repo to begin with lol
k

Kirill Grouchnikov

01/26/2023, 3:01 PM
And to the second part. If there are things that “need” to exist in the upstream Compose (common for all platforms, or only desktop) that would enable a rich text editor widget, that’s certainly something that would be worth pushing for. That’s what I did when I contributed a few patches to Skiko to enable shader based render effects. Smaller contributions are usually easier to get in, as project owners / maintainers need to think about long term support for any such contribution, and how it plays with other parts of the project - today and in the future.
My own personal preference is also to communicate such information ahead of time - in the project bug tracker - to get a feel of what the project owners think about it. You probably wouldn’t want to spend months of your time working on something that has no chance of being included upstream.
x

Xhivat Hoxhiq

01/26/2023, 3:10 PM
If anything I really need the experience as this is completely new territory to me and the project I'm doing this for has no real time limit as it's a long term personal project of mine. Even if I fail to get anything to work this will at the very least be a great opportunity to learn. Upstream quality code would be great but that was not my original intention, and wouldn't be able to do that without rewriting anyways since I am jumping head first into the library. You mentioned Skiko, what are the things you can do with it that you can't do with Composables? I wonder if Skiko (I'm assuming I can use it together with compose) would be an easier solution to my problem?
k

Kirill Grouchnikov

01/26/2023, 3:12 PM
Skiko is low level bindings to Skia, which is the rendering engine that puts pixels on the screen
x

Xhivat Hoxhiq

01/26/2023, 3:14 PM
I see, if I were to guess I'd say it wouldn't help much as from the initial look the classes of interest to me are probably
TextPainter
,
TextInputService
,
TextFieldValue
, and
EditProcessor
Now I am stuck fighting the build system or whatever is preventing the LSP from working 🙁 How can I get the LSP to work with the compose-jb source? It doesn't work in android studio or emacs with
fwcd/kotlin-language-server
.
kotlin-language-server
displays a lot of messages of things being compiled with kotlin 1.8.0, messages look something like
'kotlin.Unit' was compiled with an incompatible version...
as for android studio here's a screenshot:
k

Kirill Grouchnikov

02/01/2023, 2:06 PM
The project uses the internal APIs of the Kotlin compiler.
- looks like the project author isn’t keeping it up to date with the changes that are going into Kotlin
x

Xhivat Hoxhiq

02/01/2023, 2:09 PM
I should add that I am completely new to gradle and large projects' build systems in general so I might be missing something obvious
k

Kirill Grouchnikov

02/01/2023, 2:10 PM
Why are you bringing in the language server into the mix?
x

Xhivat Hoxhiq

02/01/2023, 2:10 PM
I will try to make this work with android studio if not ig no LSP for this one, for now. The reason I was trying to set-up emacs is due to hardware limitations although I can just about get away with android studio
Oh, when I say LSP I mean with emacs and not with android studio, but I kind of want intellisense to work on studio otherwise what's the point of using it lol
but I can't either to work
k

Kirill Grouchnikov

02/01/2023, 2:11 PM
Nothing to do with compose-jb or this channel then
x

Xhivat Hoxhiq

02/01/2023, 2:12 PM
It's just with compose-jb that it doesn't work that's why I asked here. Normal compose projects and android apps work fine.
Where should I ask for help instead?
k

Kirill Grouchnikov

02/01/2023, 2:28 PM
There’s #emacs which isn’t super active. Maybe #getting-started to get a bit more exposure. Provide some details on the setup, what works and what doesn’t. Don’t just drop people in the middle of it.