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
gradle
  • i

    ilya.gorbunov

    10/02/2017, 3:24 AM
    Why an initial value for a delegated extra property has been constrained to be non-null since kotlin dsl version coming with gradle 4.2? Is it illegal for an extra property to have null value?
    j
    • 2
    • 1
  • j

    jlleitschuh

    10/03/2017, 1:36 PM
    @bamboo Shouldn’t this be re-labeled as a bug? https://github.com/gradle/kotlin-dsl/issues/519
    b
    • 2
    • 1
  • j

    jlleitschuh

    10/04/2017, 4:24 PM
    @bamboo The whole Github project and the planning makes so much more sense when you turn on zenhub. 😛
    b
    • 2
    • 1
  • r

    roman_empire

    10/04/2017, 4:37 PM
    I try to write my android gradle scripts in Kotlin. The first parts (buildscript, dependencies, …) work fine, but i have to add the import statments manually. But when i try to create a
    android
    domain, i cannot find the right package to import to. Is there a good beginner guide in gradle kotlin scripts aside of the samples in the github repo?
    ☝️ 1
    j
    • 2
    • 5
  • u

    user

    10/05/2017, 3:49 PM
    v0.12.0 Release 0.12.0
    :gradle: 1
    🎉 13
    b
    f
    +2
    • 4
    • 6
  • j

    jlleitschuh

    10/06/2017, 3:09 PM
    TYVM!
    e
    • 2
    • 5
  • j

    jlleitschuh

    10/10/2017, 5:23 PM
    @bamboo Should be the most recent version of android studio be pretty much equivalent to the newest version of IntelliJ?? https://github.com/gradle/kotlin-dsl/issues/530
    b
    • 2
    • 1
  • j

    jlleitschuh

    10/11/2017, 4:16 PM
    @bamboo @eskatos I'm not sure if this is a Gradle Kotlin DSL issue or not, but this is weird: https://travis-ci.org/gradle/kotlin-dsl/jobs/286593264 @oehme Does the mainline gradle build get tested with IBM J9 as part of your regular CI testing?
    e
    • 2
    • 1
  • b

    barteks2x

    10/11/2017, 5:34 PM
    I'm trying to port this to kotlin and merge it with my buildscript for last 3-4 hours and I'm completely stuck... https://github.com/PaleoCrafter/Dependency-Extraction-Example/blob/coremod-separation/build.gradle
    j
    e
    • 3
    • 48
  • s

    sdeleuze

    10/11/2017, 8:44 PM
    Is there a Gradle Kotlin DSL version usable with Kotlin 1.2 beta ? I have
    Class 'org.jetbrains.kotlin.gradle.tasks.KotlinCompile is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler
    errors with Gradle 4.2.1 when I try.
    a
    • 2
    • 2
  • j

    jtonic

    10/14/2017, 11:11 AM
    Hi, Could you please shed a light why the application:run task is available in the parent module. I did not declare or enable application plugin, but it is available (at least I see it in the gradle idea tool window). Is this plugin enabled by default? gradle.build.kts (only the important part shown)
    plugins {
        base
    }
    Thank you in advance for your help. Antonel
    • 1
    • 1
  • j

    jmfayard

    10/15/2017, 3:37 PM
    What's the status of kotlin-dsl for android projects? Is it supposed to work with Android Studio? Stable or canary? Is the sample kotlin-android up to date?
    n
    d
    • 3
    • 5
  • o

    oleksandr.samsonov

    10/17/2017, 9:24 AM
    Does anyone solved: Caused by: org.gradle.cache.CacheOpenException: Could not open cache directory Java 9
    j
    • 2
    • 2
  • s

    Sam

    10/17/2017, 6:29 PM
    Is there anyway to get the kotlin dsl support in IntelliJ without importing the project as a gradle project? I'd like to be able to have proper syntax highlighting, import resolution, etc for build.gradle.kotlin files, but without the IntelliJ gradle management. We have a project at work where we don't use the IntelliJ gradle integration - instead we use the gradle idea plugin and open the generated *.ipr file.
    j
    m
    +2
    • 5
    • 5
  • b

    bamboo

    10/19/2017, 6:18 PM
    The problem with
    Jar
    is that there are two tasks with the same name that are implicitly imported
    s
    • 2
    • 2
  • k

    kartikpatodi

    10/20/2017, 9:28 AM
    I want to try the gradle-kotlin but i just can't figure oit how to start a new gradle-kotlin project from scratch in IntelliJ idea..
    b
    • 2
    • 9
  • j

    jlleitschuh

    10/20/2017, 10:52 PM
    @bamboo @eskatos Kind of cool idea that I had driving home: https://github.com/gradle/kotlin-dsl/issues/565 Have a good weekend!
    b
    • 2
    • 2
  • i

    ilya.gorbunov

    10/21/2017, 6:44 PM
    I cannot use
    tasks.withType<VerificationTask> { }
    because
    VerificationTask
    is an interface unrelated to
    Task
    , and the type parameter of
    withType
    is constrained to be a subtype of
    Task
    m
    • 2
    • 3
  • m

    Marc Knaup

    10/21/2017, 8:55 PM
    Is it possible to prevent the compiler from inlining methods defined in a specific package or module (even if they’re marked
    inline
    )? The compiler option
    -Xno-inline
    prevents inlining also of stdlib functions which causes plenty of errors:
    java.lang.IllegalAccessError: tried to access method kotlin.collections.MapsKt__MapsKt.mutableMapOf()Ljava/util/Map; from class tests.TestData$Companion
            at tests.TestData$Companion.ofEncodable(TestData.kt:74)
            at tests.NumberDataKt.<clinit>(numberData.kt:61)
            …
    i
    • 2
    • 4
  • s

    sdeleuze

    10/25/2017, 9:45 AM
    Any idea of Kotlin Gradle plugin + its dependency size ? It is for Spring Boot support, see https://github.com/spring-projects/spring-boot/pull/10511
    k
    • 2
    • 1
  • n

    nikolaymetchev

    10/30/2017, 6:26 PM
    Hello, what is the best way to transitively walk all project dependencies and search in each one for a particularly named artifact and then unzip it if it exists?
    d
    • 2
    • 4
  • a

    aurimas

    10/31/2017, 12:58 AM
    Dumb question: how does one apply a plugin that is local to the project (from buildSrc)? Is the same
    plugins {
      id("com.example.Plugin")
    }
    supposed to work?
    e
    m
    • 3
    • 2
  • n

    nikolaymetchev

    11/01/2017, 1:22 PM
    what does
    with(tasks["jar"] as CopySpec)
    achieve?
    c
    • 2
    • 10
  • a

    apomelov

    11/01/2017, 1:34 PM
    Hi. I'm new to gradle but trying use it with kotlin DSL. Currently I have troubles with a lot of samples written for groovy config -- I can't translate them proper (probably because of lack of gradle experience). I'm trying to configure spring boot wsdl sample with kotlin dsl. I refer to official guide https://spring.io/guides/gs/producing-web-service/ as well as kotlin-dsl/samples/ant. I also found https://github.com/jacobono/gradle-jaxb-plugin that probably should simplify my config, but its samples are again for groovy config and I'm failing to translate to kotlin. Can anyone recommend the learning curve for starting using of kotlin DSL? kotlin-dsl project has a readme on plugin configuration but still it seems not to be enough for me. I'm not asking the solution for my original task, but some piece of advice how can I develop it. Thanks!
    c
    n
    • 3
    • 2
  • s

    Slackbot

    11/01/2017, 1:59 PM
    This message was deleted.
    c
    • 2
    • 1
  • m

    mkobit

    11/02/2017, 1:48 PM
    could use
    tasks
    block
    import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
    tasks {
      "compileKotlin"(KotlinCompile::class) {
        kotlinOptions.jvmTarget = "1.8"
      }
    }
    c
    • 2
    • 2
  • a

    antonioleiva

    11/03/2017, 8:22 AM
    but honestly don’t know how to create a class in the root script that then can be imported in the module script…
    a
    • 2
    • 2
  • j

    jtravis

    11/06/2017, 6:13 PM
    Is there a known issue with Kotlin 1.2.0-rc39 and Jackson? I’m seeing all kinds of KotlinReflectionInternalError, and ClassNotFoundExceptions
    m
    • 2
    • 4
  • w

    warren

    11/08/2017, 6:48 PM
    it still doesn’t like
    repositories {
      maven(uri("http://<our internal nexus server>/nexus/content/groups/public"))
    }
    i
    • 2
    • 2
  • w

    warren

    11/08/2017, 6:51 PM
    nor in
    dependencies {
      compile(kotlin("stdlib"))
    }
    k
    c
    • 3
    • 4
Powered by Linen
Title
w

warren

11/08/2017, 6:51 PM
nor in
dependencies {
  compile(kotlin("stdlib"))
}
k

kartikpatodi

11/08/2017, 7:37 PM
I had the same issues but then I used Gradle 4.3 RC4 the issues were resolved
also try
invadidate cache and restart
c

Czar

11/09/2017, 8:33 AM
@warren, it would help us to help you if you posted your complete
build.gradle.kts
as a snippet here
w

warren

11/09/2017, 3:35 PM
thanks for your help! it seems the problem in my case was due to another build file in a superproject. when I opened this project on its own, it was fine. my bad.
View count: 2