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

    bamboo

    02/13/2017, 4:03 PM
    @sdeleuze the latest Kotlin libraries required by gradle-script-kotlin are incompatible with the stable Kotlin release
    s
    • 2
    • 1
  • i

    ikej

    02/15/2017, 9:02 PM
    With 0.7.0, I tried using the publishing plugin like this:
    val publishing: NamedDomainObjectContainer<Publication> by extensions
    publishing {
         "Module"(MavenPublication::class) {
            // more code here
        }
    }
    but I get this error:
    Element 'publishing' of type 'org.gradle.api.publish.internal.DefaultPublishingExtension_Decorated' from container 'org.gradle.api.internal.plugins.DefaultConvention@260e45a' cannot be cast to 'org.gradle.api.NamedDomainObjectContainer'
    Am I doing something wrong, or is this not supported yet?
    b
    • 2
    • 7
  • o

    orangy

    02/17/2017, 11:33 AM
    As far as I understand, it’s only IDE showing errors, it builds and imports into IDE just fine, no?
    s
    • 2
    • 1
  • j

    jlleitschuh

    02/17/2017, 6:53 PM
    It may not be optimized. Intellij takes a while to re-resolve all of the dependencies
    i
    • 2
    • 3
  • s

    sdeleuze

    02/18/2017, 8:44 AM
    When I import the project in Idea I have this error:
    b
    • 2
    • 3
  • i

    ikej

    02/18/2017, 6:22 PM
    In multi-module projects, when you add
    buildscript { dependencies { classpath(...) }}
    in the root project, it is not used in sub-projects, neither in the IDE nor on the command line. This means that as it stands now, I have to repeat buildscript blocks with repository configurations, dependencies and version numbers in all projects where external plugins are applied. Is this a limitation that will go away before 1.0?
    b
    • 2
    • 1
  • b

    breandan

    02/19/2017, 7:09 PM
    Hey @bamboo, I just started using
    kotlin-gradle-script
    . Is there going to be a better way to configure plugin DSLs, other than
    configure<SomePluginExtension> { … }
    ?
    b
    • 2
    • 1
  • s

    sdeleuze

    02/20/2017, 5:16 PM
    Likely because no
    kotlin-runtime in the classpath
    b
    • 2
    • 2
  • j

    jlleitschuh

    02/21/2017, 4:24 PM
    @bamboo Do you need to use the EAP to make GSK work correctly?
    b
    • 2
    • 3
  • o

    oehme

    02/21/2017, 4:25 PM
    For now, just disable the
    Create Module for each SourceSet
    option when importing
    s
    • 2
    • 1
  • j

    jlleitschuh

    02/21/2017, 9:14 PM
    In the intellij Logs I'm getting a lot of log messages like this:
    2017-02-21 16:11:08,981 [ 177485]   WARN - finder.JvmIDEVirtualFileFinder - There are 3 classes with same fqName: kotlin/io/FilesKt__FilePathComponentsKt found.
    b
    • 2
    • 2
  • s

    sdeleuze

    02/23/2017, 2:14 PM
    Some times ago we discussed about a documentation page to show Gradle Groovy -> Kotlin equivalence, is there such doc or wiki page available somewhere ?
    b
    • 2
    • 4
  • j

    jlleitschuh

    02/24/2017, 8:21 PM
    @bamboo I've since had someone else import this project and they are having the same methods not getting resolved.
    b
    • 2
    • 10
  • b

    bamboo

    02/24/2017, 10:09 PM
    In any case, it’s better to avoid changing files in-place
    o
    • 2
    • 12
  • m

    mbstavola

    02/27/2017, 10:20 PM
    Will GSK 0.8.0 work with 1.1-rc-91?
    b
    • 2
    • 1
  • g

    gildor

    03/01/2017, 4:50 PM
    But it if I want to omit create it doesn’t work (extension function for string not found)
    b
    • 2
    • 2
  • j

    jlleitschuh

    03/03/2017, 5:33 PM
    @bamboo I'm not sure if this is a limitation of gradle or kotlin:
    @get:Input
        override val configuration: CodegenConfigurator by lazy { project.extensions.getByType(CodegenConfigurator::class.java) }
    This throws an exception because:
    Could not add entry ':PlexxiSwagger:Spec:swagger' to cache taskHistory.bin (/Users/jonathanleitschuh/work/git/plexxicontrol/.gradle/3.5-20170217174236+0000/taskHistory/taskHistory.bin).
    > Unable to store task input properties. Property 'configuration' with value 'io.swagger.codegen.config.CodegenConfigurator_Decorated@735e4fd' cannot be serialized.
    I know that the undecorated
    CodegenConfigurator
    is serializable because I made it so that it was: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/java/io/swagger/codegen/config/CodegenConfigurator.java#L38 Is this because of the extensions plugin?
    b
    o
    • 3
    • 11
  • s

    suresh

    03/06/2017, 11:32 PM
    Currently it’s failing with
    unable to compile script
    error
    b
    • 2
    • 1
  • j

    jlleitschuh

    03/07/2017, 12:07 AM
    Using the interface
    HasConvention
    seems ugly given that there's a javadoc on it that says that its not going to stick around: https://github.com/JLLeitschuh/ktlint-gradle/blob/master/src/main/kotlin/org/jlleitschuh/gradle/ktlint/KtLintPlugin.kt#L37-L40 However, the GSK build uses the same thing; https://github.com/gradle/gradle-script-kotlin/blob/master/build.gradle.kts#L115-L117 I'm assuming if there was a better way you'd be doing it. Is there a way that plugins are supposed to consume the kotlin plugin's source set?
    /**
     * Demarcates objects that expose a convention.
     *
     * Convention objects aren't going to be around forever, so this is a temporary interface.
     */
    public interface HasConvention {
    b
    • 2
    • 2
  • j

    jlleitschuh

    03/07/2017, 4:25 PM
    And why does the
    "ktlintPlugin"
    string not work with
    apply
    ?
    b
    • 2
    • 2
  • g

    gildor

    03/09/2017, 2:59 AM
    @bamboo Wow, DSL is much cleaner now, works fine for my project (but required IDE restart to enable syntax highlighting). The only thing that looks unnatural and confusing is workaround with
    pluginBundle
    and
    gradlePlugin
    extensions:
    gradlePlugin {
        (plugins) {
            “pluginName" { /* plugin config */ }
        }
    }
    Anyway, good job!
    b
    • 2
    • 3
  • s

    sdeleuze

    03/15/2017, 12:42 AM
    I tried the new
    plugins { }
    syntax but declaring
    org.jetbrains.kotlin.plugin.spring
    don’t work (plugin not taken in account).
    k
    h
    • 3
    • 8
  • m

    mariolopezjr

    03/18/2017, 5:13 AM
    I’ve noticed that any time I add a plugin, I have to restart IntelliJ to get it working.
    s
    • 2
    • 1
  • m

    mkobit

    03/18/2017, 5:28 AM
    huh this seems odd - how come the build scan plugin looks like:
    buildScan {
      setLicenseAgree("yes")
      setLicenseAgreementUrl(”<https://gradle.com/terms-of-service%22|https://gradle.com/terms-of-service">)
    rather than
    buildScan {
      licenseAgree = "yes"
      licenseAgreementUrl = “<https://gradle.com/terms-of-service>”
    even though the methods seem to fit the right signature for setters -
    public void setLicenseAgreementUrl(String var1)
    b
    • 2
    • 3
  • s

    sdeleuze

    03/18/2017, 4:08 PM
    @bamboo Do you have something on your roadmap to fix the “I have to restart IDEA after some changes to my
    build.gradle.kts
    to make it works” issue that various users (including me) reported?
    👍 11
    b
    • 2
    • 4
  • j

    jlleitschuh

    03/21/2017, 4:26 PM
    @Chris Miller You need to use the task
    gskGenerateAccessors
    to figure out what code you need for that plugin.
    c
    • 2
    • 1
  • d

    dstarcev

    03/24/2017, 5:56 PM
    How do I change the dependency direction between
    compileKotlin
    and
    compileJava
    tasks in gradle? I try this
    compileJava.dependsOn.remove(compileKotlin)
    compileKotlin.dependsOn(compileJava)
    but I am still getting the error
    Circular dependency between the following tasks:
    :backend:compileJava
    \--- :backend:compileKotlin
         \--- :backend:compileJava (*)
    👍 1
    s
    • 2
    • 1
  • s

    sdeleuze

    03/25/2017, 11:39 PM
    @spierce7 Gradle Script Kotlin perceived performance is quite bad because of https://github.com/gradle/gradle-script-kotlin/issues/249, should be fixed in 0.9
    s
    • 2
    • 1
  • s

    suresh

    03/27/2017, 12:25 AM
    @timriemer
    import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
    ....
    tasks.withType<KotlinCompile> {
        kotlinOptions {
            jvmTarget = JavaVersion.VERSION_1_8.toString()
        }
    }
    t
    s
    • 3
    • 8
  • s

    suresh

    03/27/2017, 3:28 AM
    @mkobit without explicitly setting the
    jvmTarget
    for kotlincompile, it takes the default value as
    1.6
    👍 2
    m
    • 2
    • 1
Powered by Linen
Title
s

suresh

03/27/2017, 3:28 AM
@mkobit without explicitly setting the
jvmTarget
for kotlincompile, it takes the default value as
1.6
👍 2
m

mkobit

03/27/2017, 3:46 AM
suresh: bummer - that seems like a nice improvement
View count: 5