https://kotlinlang.org logo
Join the conversationJoin Slack
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
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
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
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 Linen
intellij
  • m

    Marc Knaup

    06/24/2019, 10:45 AM
    It would be nice to have more code style options when it comes to blank lines, i.e. • min # of blank lines after last
    import
    statement • min # of blank lines before class header • min # of blank lines between/before/after functions (i.e. have body) • min # of blank lines between/before/after function declarations (i.e. have no body) • min # of blank lines between/before/after variables Also Minimum Blank Lines … After class header doesn't seem to do anything.
    a
    • 2
    • 2
  • s

    simon.vergauwen

    06/25/2019, 3:30 PM
    Perhaps this is a better channel to ask this question :)
    m
    • 2
    • 3
  • g

    gregorbg

    06/26/2019, 12:33 PM
    Ever since upgrading the Kotlin plugin to
    1.3.40
    , my IDE complains about
    One of the tpe variables was implcitly inferred to Nothing. Please, specify type arguments explicitly to hide this warning
    for the following (abridged) example:
    runBlocking { throw Exception('Nope.') }
    When complying with the message, and changing to
    runBlocking<Nothing> {}
    the IDE suggests
    Remove explicit type arguments
    and the type parameter is "greyed out" as usual for redundant generics. Where should I post the bug? IDEA YouTrack? Kotlin GitHub?
    c
    a
    • 3
    • 4
  • r

    rocketraman

    06/27/2019, 11:09 PM
    Plugin 1.3.40 seems to have some major performance regressions over 1.3.x. Not that 1.3.x was all that fast either.
    a
    • 2
    • 1
  • n

    napperley

    06/28/2019, 11:12 PM
    In a open Kotlin Native project the code analysis doesn't complete. When showing the Actions dialog and typing something in (eg Reopen) no suggestions appear. With a open Kotlin JVM project code analysis completes and the Actions dialog behaves normally.
    a
    • 2
    • 10
  • r

    Robert

    06/29/2019, 10:51 AM
    I reported this issue from the IDEA and it gave me a link, but I don't remember it. I tried searching Youtrack but I can't find it. How do I find out the status?
    a
    • 2
    • 4
  • g

    GauthierPLM

    07/01/2019, 5:23 AM
    Is there any improvements planned for Gradle’ Kotlin DSL? Everytime i change something, analysis is so slow and getting a simple completion takes multiple seconds...
    👍 4
    d
    m
    +3
    • 6
    • 22
  • m

    Marc Knaup

    07/02/2019, 2:45 PM
    I do know the concept of constructor parameters. I was just wondering why
    bar2
    is not marked as unused.
    k
    • 2
    • 15
  • e

    eskatos

    07/02/2019, 3:52 PM
    1.3.40 enabled the new inference engine for the IDE analysis. Is there a way to enable the new inference engine in JPS so Kotlin code gets compiled with it? Like passing
    -XXLanguage:+NewInference
    to the compiler, I couldn’t find a place for compiler arguments in the UI.
    m
    • 2
    • 13
  • r

    robstoll

    07/02/2019, 7:05 PM
    I don't know what changed thus wondering, did
    Build
    a project include test sources as well in the past?
    ✔️ 1
    • 1
    • 1
  • j

    Jacob Applin

    07/04/2019, 1:58 PM
    How can I diagnose performance issues with intellij? I've got a 7th gen i7 and 32gb ram and a pretty fast ssd, but I often find the ide very slow to respond in my android project. I've tried increasing the xmx memory to 5g and the ide memory to 5g too as well as turning off almost all plugins. None of these changes seem to have made much of an impact
    r
    • 2
    • 6
  • b

    bootstraponline

    07/04/2019, 4:26 PM
    IntelliJ is crashing when typing Kotlin code on macOS beta. https://youtrack.jetbrains.com/issue/JBR-1641 😭
    i
    • 2
    • 1
  • m

    Marc Knaup

    07/05/2019, 4:21 PM
    Idea: Code formatting setting which automatically changes
    123456789
    to
    123_456_789
    . Thoughts?
    👍 6
    a
    • 2
    • 1
  • p

    poohbar

    07/05/2019, 4:52 PM
    Did anyone notice that when trying to use a Kotlin enum from Java the IDE is super dumb regarding imports? For example I have a java annotation in java code:
    @Hello(MY_ENUM_VALUE)
    where
    MY_ENUM_VALUE
    is a Kotlin enum. If I just type that (like you see it), the IDE will import
    Hello
    automatically but acts like it has no idea what to import for
    MY_ENUM_VALUE
    even though it is super clear since it knows what type it should be.
    ➕ 1
    a
    • 2
    • 1
  • m

    Matej Drobnič

    07/07/2019, 7:49 AM
    Is
    AsynchronousSocketChannel.open()
    method blocking? From what I see, it just opens the empty channel (you need to call
    connect
    afterwards, which can be blocking).
    suspend fun test() {
        val channel = AsynchronousSocketChannel.open()
    }
    Above method will display warning from IntelliJ
    • 1
    • 1
  • r

    Robert Menke

    07/08/2019, 12:59 AM
    Let me know if this is a duplicate - created an issue for crashes while importing a gradle project on OSX Catalina https://youtrack.jetbrains.com/issue/IDEA-217742
    a
    • 2
    • 2
  • b

    Ben Madore

    07/08/2019, 2:25 PM
    i know this was mentioned previously, but i’m curious if everyone has performance issues using kotlin dsl in intellij? it will very frequently cause my ide to lock up momentarily, can’t move the cursor etc. auto-complete is consistently near-on unusable as it takes 3+ seconds? I’ve got a multi-module build that does some child-project configuration in the parent, no clue if that factors into it
    i
    m
    p
    • 4
    • 14
  • p

    poohbar

    07/10/2019, 1:31 PM
    Is adding KDoc to Kotlin enum values a supported feature? IntelliJ is refusing to autoformat the KDoc so I have to do it manually.
    d
    c
    • 3
    • 6
  • p

    poohbar

    07/11/2019, 5:53 PM
    what is this:
    Error:(179, 119) Kotlin: Cannot access built-in declaration 'kotlin.plus'. Ensure that you have a dependency on the Kotlin standard library
    k
    a
    • 3
    • 9
  • s

    Slackbot

    07/15/2019, 3:39 PM
    This message was deleted.
    m
    e
    • 3
    • 7
  • g

    Gary Tierney

    07/16/2019, 9:55 PM
    I'm seeing a bizarre issue with a Kotlin project that depends on
    dokka-fatjar
    . IDEA reports any references to the dokka classes within my project as an error, but has indexed them fine (search by Non-Project symbols works). Gradle can still compile my code fine, so it seems like purely an IDEA issue. Does this sound familiar/does anyone have any ideas on how I could go about debugging this?
    c
    a
    • 3
    • 5
  • p

    PHondogo

    07/18/2019, 5:25 AM
    Hello! IDEA don't want to include my source path: duplicate content root detected. My project is a gradle project. In build.gradle.kts I add one more source path: sourceSets { getByName("main").java.srcDirs("../buildSrc/src/main/java") } I use sames sources from build script directory for build script and for project. When I build from command line (gradle build) it is successfully built. But IDEA don't want to include this source path, so when i build from IDEA (Build/Build Project) - it shows errors of Unresolved References. Question: how can I force IDEA to include same source path to different modules? And why it is not allowed now?
    m
    l
    • 3
    • 3
  • c

    christophsturm

    07/22/2019, 9:07 AM
    why does idea not find junit5 tests in multiplatform projects? gradle runs them fine
    a
    l
    • 3
    • 3
  • c

    christophsturm

    07/24/2019, 9:54 AM
    does it make sense to comment on a closed youtrack when a problem reappearsticket or is it better to create a new one?
    g
    • 2
    • 2
  • k

    kartikpatodi

    07/24/2019, 12:41 PM
    Is there a way to implement the optimize imports functionality via a plugin and not via ide
    m
    • 2
    • 3
  • m

    mbonnin

    07/27/2019, 5:29 PM
    Ever since the 2019.2 update, I can't get my Android project to compile in intelliJ anymore due to
    e: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
    	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
    	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
    	at java.base/java.lang.Class.getConstructor0(Class.java:3342)
    	at java.base/java.lang.Class.newInstance(Class.java:556)
    	at org.jetbrains.kotlin.cli.jvm.plugins.ServiceLoaderLite.loadImplementations(ServiceLoaderLite.kt:51)
    	at org.jetbrains.kotlin.cli.jvm.plugins.ServiceLoaderLite.loadImplementations(ServiceLoaderLite.kt:44)
    	at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension$loadProcessors$efficientProcessorLoader$1.doLoadProcessors(Kapt3Extension.kt:83)
    	at org.jetbrains.kotlin.kapt3.base.ProcessorLoader.loadProcessors(ProcessorLoader.kt:45)
    I do have my gradle JVM set to a java8 directory but no matter what, intelliJ will use the internal java11. Is there another setting I'm missing ?
    m
    • 2
    • 6
  • m

    Matej Drobnič

    07/29/2019, 6:41 AM
    So what is the recommended way of dealing with
    RemoveExplicitTypeArguments
    inspection where inferring type in question is only supported by the new inferrence in IDE and would not compile otherwise? Suppress the warning? Just ignore it?
    l
    • 2
    • 7
  • m

    Mike R

    08/01/2019, 12:08 AM
    Is there an easy way to use Kotlin scratch files? I'm so used to using them in PyCharm, but I feel like there is so much configuration I have to do to make a Kotlin scratch file that it sort of defeats the purpose. Am I doing something way wrong?
    l
    • 2
    • 3
  • m

    Mike R

    08/01/2019, 12:09 AM
    To clarify, I can make the scratch file, but running it requires some messing around
    s
    • 2
    • 1
  • d

    Dico

    08/01/2019, 9:05 PM
    Why is this being deprecated in gradle settings? I use this for things I specifically don't want in the gradle.properties file, to avoid them being added to VCS.
    l
    g
    • 3
    • 3
Powered by Linen
Title
d

Dico

08/01/2019, 9:05 PM
Why is this being deprecated in gradle settings? I use this for things I specifically don't want in the gradle.properties file, to avoid them being added to VCS.
l

louiscad

08/01/2019, 11:06 PM
You can use local.properties
g

gildor

08/02/2019, 1:42 AM
you cannot use local.properties for this
but you can use your
~/.gradle/gradle.properties
View count: 6