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
  • k

    kartikpatodi

    12/01/2018, 7:13 PM
    also should i provide dependencies for each submodule seperately in their build.gradle.kts like if I need kotlin(jvm) dependency in all my subprojects then should I mention them seperately or is there a way to mention it in a common root build file?
    g
    • 2
    • 1
  • z

    zjuhasz

    12/01/2018, 11:03 PM
    It looks like settings.gradle.kts has no
    project.properties
    there is
    rootProject
    but it has no
    properties
    field
    g
    • 2
    • 6
  • l

    louiscad

    12/02/2018, 11:36 AM
    Hi, I'm tired of javascript Groovy in my gradle files, but I have dozens of files to migrate across several projects, so I'm writing a Kotlin script to convert them to Kotlin. If anyone have some experience finding text patterns and replacing them properly (avoiding code comments) and can give some time to help, you're welcome! Note that I'm focused on Android and JVM projects, but if I can get help to support more projects types, and more gradle plugins, it's a good thing!
    g
    t
    • 3
    • 5
  • t

    Torbilicious

    12/02/2018, 3:41 PM
    Hi! I am quite new to the kotlin gradle dsl so sorry if this is a newbie question. Whenever i include the multiplatform plugin like so:
    plugins {
          id("org.jetbrains.kotlin.multiplatform") version "1.3.10"
    }
    I keep getting the error: "Unable to load class 'org.gradle.api.internal.FeaturePreviews'." I am using gradle gradle 5.0
    s
    • 2
    • 6
  • s

    snowe

    12/04/2018, 3:47 AM
    g
    • 2
    • 1
  • s

    snowe

    12/04/2018, 3:50 AM
    additionally attempting to use the
    register
    method results in this error.
    g
    • 2
    • 1
  • s

    snowe

    12/04/2018, 3:55 AM
    also, for some reason it thinks register is unstable
    g
    o
    • 3
    • 2
  • s

    snowe

    12/04/2018, 4:00 AM
    no details here. https://docs.gradle.org/current/userguide/kotlin_dsl.html
    g
    • 2
    • 5
  • s

    snowe

    12/04/2018, 4:07 AM
    ok, I applied the plugin, but still no dice…
    g
    • 2
    • 17
  • b

    Bernhard

    12/04/2018, 9:44 AM
    Hi I want to move some versions into a configuration so that I can use that in both buildSrc and src. I thought about moving it to the settings.gradle.kts. Does buildSrc have access to that and how do I use settings in my build.gradle.kts?
    g
    k
    • 3
    • 19
  • r

    rjhdby

    12/04/2018, 2:10 PM
    Hello. I'm sorry fo stupid question, but... How in gradle kotlin dsl I can add task for copy file from one location to other? (Unfortunatly, I can't understand this example https://github.com/gradle/kotlin-dsl/blob/master/samples/copy/build.gradle.kts)
    t
    g
    • 3
    • 13
  • s

    snowe

    12/04/2018, 4:35 PM
    might be due to groovy and kotlin interop, but I’m not sure.
    o
    • 2
    • 6
  • z

    zjuhasz

    12/05/2018, 6:01 AM
    Posted the problem I'm having on SO: https://stackoverflow.com/questions/53625966/unsupported-method-ideamoduledependency-getdependencymodule-error-when-migrat
    o
    • 2
    • 4
  • b

    bjonnh

    12/06/2018, 12:19 AM
    https://gist.github.com/bjonnh/a858259caae88c7f363a2ae7a0a3da1d
    g
    • 2
    • 7
  • b

    bjonnh

    12/06/2018, 7:24 PM
    where should I put the shadowjar minimize() in my build.gradle.kts?
    🤦 1
    • 1
    • 1
  • b

    bjonnh

    12/06/2018, 7:50 PM
    what would you recommend as a gradle compatible fatjar plugin?
    g
    • 2
    • 1
  • d

    digitalsanctum

    12/06/2018, 8:35 PM
    anyone have an example of a multi-project build using kotlin dsl? preferably one that has just one build.gradle.kts in root dir
    j
    • 2
    • 1
  • p

    pajatopmr

    12/07/2018, 8:05 AM
    I have been attempting to publish my KFile project to Maven Central using (indirectly) the SQLDelight scripts. However it occurs to me that maybe someone has another, simpler, project that is an example of publishing a Kotlin multiplatform project to Maven Central. I can attest that there is significant amount of work to accomplish such as generating an account on Sonatype, generating a PGP signing key, configuring the projects POM file (in the publications closure) and probably some steps I’m forgetting. In any case, if there is a Kotlin MPP project successfully deployed to Maven Central, boyo would I love to hear about it and study the code.
    s
    m
    i
    • 4
    • 15
  • j

    jlleitschuh

    12/07/2018, 5:57 PM
    Are Kotlin Sequences assumed to be thread safe? IE, can two threads both read from a sequence in parallel and not have issues? If they don't I think I found a bug in the Kotlin compiler's
    LazyScriptDefinitionProvider
    .
    o
    i
    i
    • 4
    • 13
  • o

    octylFractal

    12/07/2018, 11:19 PM
    huh, it actually exists in the class files.... that's pretty weird
    s
    • 2
    • 30
  • u

    ursus

    12/08/2018, 8:24 PM
    guys, I dont get, when is
    exclude group: '...'
    actually needed?
    g
    • 2
    • 3
  • u

    ursus

    12/08/2018, 8:24 PM
    when gradle replaces all instances of the same transitive depdency with latest version anyways?
    g
    • 2
    • 1
  • o

    octylFractal

    12/08/2018, 8:48 PM
    it's basically a cheap version of dependency locking
    g
    • 2
    • 6
  • u

    ursus

    12/08/2018, 8:50 PM
    why would it not use the latest everywhere? by latest im mean the largest of declared versions
    g
    • 2
    • 9
  • b

    bjonnh

    12/09/2018, 12:48 AM
    should I add gradlew and all of that to my git repos?
    g
    • 2
    • 2
  • t

    tapchicoma

    12/09/2018, 4:55 PM
    How to get related `SourceSet`s for
    KotlinTarget
    in new multiplatform plugin?
    • 1
    • 1
  • s

    snowe

    12/10/2018, 4:36 PM
    Ok. so all those issues last week I can’t get past, so I’m trying to step back and start over. I’ve stepped back to the start and am just trying to convert the project to gradle 5 from gradle 1.12. It’s quite difficult.
    g
    • 2
    • 8
  • m

    Marc Knaup

    12/10/2018, 5:02 PM
    Hello 👋 Anyone knows how can I fix this? 🤔
    The
    embedded-kotlin
    and
    kotlin-dsl
    plugins rely on features of Kotlin
    1.3.10
    that might work differently than in the requested version
    1.3.11
    .
    s
    e
    g
    • 4
    • 8
  • u

    ursus

    12/11/2018, 3:23 AM
    Is is there a perf difference between building app with a library module from source (2nd build; 1st is obviously compiling everything) vs. prebuilt .aar (think internal maven artefact)?
    j
    • 2
    • 7
  • d

    dave08

    12/12/2018, 5:48 AM
    Is gradle 5.0.0 and kotlin dsl supported in android studio 3.2?
    g
    s
    • 3
    • 20
Powered by Linen
Title
d

dave08

12/12/2018, 5:48 AM
Is gradle 5.0.0 and kotlin dsl supported in android studio 3.2?
g

gildor

12/12/2018, 5:58 AM
Yes, but Idea 2018.1 (on which AS 3.2 is based) has a lot of tooling problems with Kotlin DSL not even related to Gradle 5.0, but in general Kotlin DSL is supported UPD: Gradle 5 is not supported in 3.2
s

Slava Glushenkov

12/12/2018, 6:44 AM
If you are using Gradle for Android, you need to move to version 3.4 or higher of both the Android Gradle Plugin and Android Studio. https://docs.gradle.org/5.0/userguide/upgrading_version_4.html
👍 1
g

gildor

12/12/2018, 6:47 AM
3.3 acutally works with Gradle 5
d

dave08

12/12/2018, 7:16 AM
Is it stable enough to use for production apps? Should I just use Intellij Ultimate (I heard the support for android isn't great without AS?)
g

gildor

12/12/2018, 7:37 AM
Yes, we use 3.3 without issues, it’s already rc1, rc2 is comming
👍🏼 1
Depends on your use case. What do you actually want to use?
d

dave08

12/12/2018, 7:39 AM
A multiproject android app with a combination of spek 1.x and junit 4.12 unit tests, they haven't been working together yet... but at least with kotlin dsl I might get docs and hints to see where my configs are wrong...
g

gildor

12/12/2018, 7:41 AM
they haven’t been working together yet
they? Do you mean spek and junit 4? Isn’t Spek based on Junit-Platform
d

dave08

12/12/2018, 7:41 AM
Spek tests run junit 4 reports empty test suite...
Yes i'm using the latest junit together with 4.12 support
If I put includeEngine 'spek', 'junit...' in configs nothing works, I remove both, only spek works 🤔
g

gildor

12/12/2018, 7:46 AM
not sure about Spek, I always though that Spek uses Junit 5 API to run own tests
d

dave08

12/12/2018, 7:46 AM
Any known problems with 3.3 in my case?
g

gildor

12/12/2018, 7:47 AM
I don’t know any particular ones
d

dave08

12/12/2018, 7:48 AM
I think it does, I used the install instructions from its docs... I really want to migrate out of it, but with this problem I'm forced to keep on writing new spek tests
Is there a way to create another test module in android, one for spek and the other for junit?
g

gildor

12/12/2018, 7:51 AM
Yes, why not? Just create a new module only with tests and add module that should be tested as dependency, but you cannot test
internal
declarations in this case
Also maybe you can just configure test runner for spek and junit4 to use diffferent source paths or something like that
d

dave08

12/12/2018, 7:54 AM
I tried putting the RunWith Junit annotation on the junit test class, still no go... where/how could I configure the test runner like that? Any docs on this, I searched alot and couldn't find anything (but then I'm no gradle expert...)
g

gildor

12/12/2018, 8:09 AM
You can configure runner using Gradle Test tasks, see docs, have no particular advices in this case, maybe better to ask in #spek
View count: 3