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

    pakoito

    09/04/2017, 9:11 PM
    is there any gradle task to invoke a repl after building that starts with the current project pre-loaded?
    j
    • 2
    • 5
  • d

    dave08

    09/05/2017, 1:35 PM
    How do I check/update ... I'm using gradle wrapper and intellij ultimate
    c
    a
    d
    • 4
    • 24
  • e

    Eugen Martynov

    09/06/2017, 2:23 PM
    Not related to Kotlin, does anyone know what should I copy between build machines to keep working gradle as incremental?
    c
    • 2
    • 1
  • m

    masc3d

    09/07/2017, 4:19 PM
    setting the classes output dir for kotlin doesn’t seem to work (using
    gradle-4.1
    )
    sourceSets.main.output.classesDir =  new File(buildDir, “classes/main”)
    sourceSets.main.kotlin.outputDir =  new File(buildDir, “classes/main”)
    h
    • 2
    • 7
  • e

    eriwen

    09/08/2017, 8:34 PM
    So I hear the new kotlin Gradle plugin 1.1.4-3 is awesome, but I'm having a hard time finding a changelog. Help?
    j
    • 2
    • 2
  • e

    efemoney

    09/09/2017, 5:28 PM
    (I'm trying to setup an android project build on Android Studio 3.0 beta)
    d
    • 2
    • 2
  • c

    Czar

    09/12/2017, 10:19 AM
    if gradle encounters both
    build.gradle
    and
    build.gradle.kts
    , which file will be used by default (no other configuration is present specifying any of these two files)?
    e
    • 2
    • 2
  • m

    mkobit

    09/12/2017, 3:54 PM
    (this is probably better reported as an issue) im writing a plugin (in kotlin) and wanted to test it against both Groovy and the Kotlin DSLs using Gradle Test Kit im seeing a test fail that i dont expect to when using the Kotlin DSL which works locally if I use
    publishToMavenLocal
    and consume from there test: https://github.com/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/blob/failing-kotlin-dsl-test/src/test/kotlin/com/mkobit/jenkins/pipelines/IntegrationTestSourceIntegrationTest.kt#L113-L117 build script: https://github.com/mkobit/jenkins-pipeline-shared-libraries-gradle-plugin/blob/failing-kotlin-dsl-test/src/pipelineTestResources/com/mkobit/jenkins/pipelines/IntegrationTestSourceIntegrationTest/Kotlin%20DSL%20extension%20configuration/build.gradle.kts scan: https://scans.gradle.com/s/keusy27t7l2rm
    :youtrack: 1
    e
    • 2
    • 1
  • m

    mkobit

    09/12/2017, 3:57 PM
    im going to just create an issue in
    kotlin-dsl
    because it will be easier to track and discuss there
    j
    • 2
    • 3
  • h

    hkokocin

    09/14/2017, 12:23 PM
    how do I say
    maven { url "<https://oss.sonatype.org/content/repositories/snapshots/>" }
    in kts ?
    b
    g
    • 3
    • 17
  • b

    bamboo

    09/14/2017, 1:45 PM
    Nice, thanks @orangy!
    o
    g
    • 3
    • 3
  • h

    hendrik

    09/15/2017, 8:59 AM
    I trying to set up a
    buildSrc
    module. It seems like I can not put code into packages but only plain into
    src/main/kotlin
    ? (If I use packages autocompletion in my build script works but when building gradle says it cannot find the stuff impored from my
    buildSrc
    )
    b
    • 2
    • 4
  • t

    trubesv

    09/16/2017, 12:15 PM
    message has been deleted
    j
    • 2
    • 4
  • m

    mkobit

    09/18/2017, 1:41 PM
    @hendrik like a local folder that isn't a maven repository? you should be able to do
    compile(files("libs/mylib.jar"))
    h
    • 2
    • 2
  • j

    jlleitschuh

    09/18/2017, 4:32 PM
    @bamboo You have any more thoughts on the JDK 9 PR re: why travis might be failing?
    b
    • 2
    • 16
  • i

    ilya.gorbunov

    09/20/2017, 6:26 PM
    How to convert the following groovy block to kts:
    mavenDeployer {
           beforeDeployment { MavenDeployment deployment ->
                            if (signing.required)
                                signing.signPom(deployment)
                        }
    }
    I've heard about the recent improvements about
    withGroovyBuilder
    , but I can't get how to pass that lambda with the single parameter.
    b
    • 2
    • 8
  • j

    jlleitschuh

    09/21/2017, 4:03 PM
    Can the
    pluginManagement
    in
    settings.gradle
    be used with
    apply from: "someKtsFile.gradle.kts"
    ?
    b
    m
    • 3
    • 4
  • b

    bdawg.io

    09/24/2017, 4:31 AM
    Sorry I should clarify, I'm using a
    kts
    file. I don't care about it being available to dependencies, I'm just trying to provide version strings of dependencies for my local build script using the kotlin dsl
    👍 1
    a
    • 2
    • 1
  • c

    Czar

    09/25/2017, 8:50 AM
    That worked for some reason. But in IntelliJ whole build file is still red.
    g
    • 2
    • 2
  • c

    Czar

    09/25/2017, 9:26 AM
    Found the reason. The pom for the dependency is there on jcenter, but jar is not, so when pom is found gradle stops searching in other repositories, but fails to download the dependency since jar isn't there, this is Spring issue, not gradle or kt-dsl related.
    g
    • 2
    • 5
  • c

    Czar

    09/25/2017, 2:06 PM
    how can I share a variable between
    buildscript
    block and other places? I want to declare
    kotlinVersion
    once and use it throughout the build file. In Groovy Gradle it would've been
    buildscript { ext.kotlinVersion = "" }
    But in kotlin-dsl
    buildscript { val kotlinVersion by extra { "" } }
    does not work, in
    dependencies
    block it is not resolved.
    n
    j
    • 3
    • 2
  • n

    napperley

    09/27/2017, 3:47 AM
    Is there a way to print out the version of the Kotlin compiler being used in the build script (using Gradle Kotlin DSL)? Encountered issues with Kotlin JS not working with Dokka, and it has been mentioned to make make sure that the compiler version (https://youtrack.jetbrains.com/issue/KT-20479) matches the standard library version.
    g
    • 2
    • 2
  • c

    Czar

    09/27/2017, 7:14 AM
    Oh, I remember now, I'll need to use some unstable gradle probably if it at all exists. Well, I'll have to wait for 1.2 stable, I guess 😕
    a
    • 2
    • 1
  • f

    fourlastor

    09/28/2017, 10:19 AM
    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
        it.doFirst {
            it.setSource(project.file('build/generated/source/food'))
        }
    }
    this makes it compile correctly
    e
    • 2
    • 2
  • m

    mbonnin

    09/28/2017, 10:23 AM
    not 100% sure the
    task.outputs.dir
    is needed actually
    • 1
    • 1
  • m

    mbonnin

    09/28/2017, 12:14 PM
    does kotlin script support automatic SAM conversion ? I get an error when I do
    val action = Action<String> { println(it) }
    b
    • 2
    • 10
  • j

    jordanjennings

    09/28/2017, 5:47 PM
    @mbonnin are you using IntelliJ 2017.2.5 with kotlin plugin 1.1.50 with gradle 4.2?
    m
    d
    • 3
    • 14
  • m

    mbonnin

    09/29/2017, 8:49 AM
    @leigh something like this?
    (task("test") as Test?)?.testLogging?.showStandardStreams = true
    l
    m
    d
    • 4
    • 13
  • j

    jlleitschuh

    10/01/2017, 5:05 PM
    Is it official? I read the blog post and it didn't say it was. Just that things were being back potted. Is there a newer blog post?
    g
    • 2
    • 2
  • m

    mkobit

    10/02/2017, 1:57 AM
    @raulraja I wrote up https://gist.github.com/mkobit/e06ddf93fcb9a67ded3426bd5a266bed before after a discussion in this channel - it kinda seems to work
    👍 2
    r
    • 2
    • 1
Powered by Linen
Title
m

mkobit

10/02/2017, 1:57 AM
@raulraja I wrote up https://gist.github.com/mkobit/e06ddf93fcb9a67ded3426bd5a266bed before after a discussion in this channel - it kinda seems to work
👍 2
r

raulraja

10/02/2017, 3:20 PM
Awesome! thanks so much!
View count: 2