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

    keturn

    05/26/2020, 10:54 PM
    I've made a gradle precompiled script plugin under
    buildSrc/
    , but IntelliJ isn't quite handling it smoothly. It says "The associated Gradle Project isn't imported," and that message won't go away. (the buildSrc is under the root gradle project that certainly is imported) and if I use the type-safe configuration names in my
    dependencies
    section, intellij's gradle sync fails unable to resolve them, while gradle itself seems just fine with it.
    m
    • 2
    • 4
  • e

    elect

    05/27/2020, 9:28 AM
    I cant find how can I apply
    org.gradle.jvmargs
    to gradle kotlin script
    s
    g
    • 3
    • 9
  • f

    frank

    05/30/2020, 2:30 AM
    [Solved] I want to copy JS libs into resource folder after build. but I am having a problem with the configuration 'implementation' when build. Message error:
    Resolving dependency configuration 'implementation' is not allowed as it is defined as 'canBeResolved=false'.
    Instead, a resolvable ('canBeResolved=true') dependency configuration that extends 'implementation' should be resolved.
    I tried with 'compileClasspath' and 'runtimeClasspath' but dont work. Do i need to create my own implementation or use another? My Code:
    tasks.build{
       doLast {
          configurations["implementation"].forEach {
               copy{
                    includeEmptyDirs = false
                    from(zipTree(it.absolutePath))
                    into("$resources/lib/kotlin")
                    include { fileTreeElement ->
                        val path = fileTreeElement.path
                        path.endsWith(".js") && (path.startsWith("META-INF/resources/") || !path.startsWith("META-INF/"))
                    }
                   }
          }   }
    }
    • 1
    • 1
  • d

    Dariusz Kuc

    05/30/2020, 3:52 AM
    [solved] hello! while publishing Gradle plugin to Maven Central (also publishing to Plugin Portall) I noticed that generated plugin descriptor was incorrectly published with sources and javadoc of the actual plugin (https://search.maven.org/search?q=g:com.expediagroup.graphql) Sources+Javadoc for both plugin and plugin descriptor are attached here -> https://github.com/ExpediaGroup/graphql-kotlin/blob/master/build.gradle.kts#L163. Any suggestions on the check there to ensure plugin descriptor doesn’t get sources? Tried doing a simple check for
    artifactId
    but both plugin and its descriptor share same id (they differ in values in generated pom files). Also tried checking for packaging -> i.e.
    if (pom.packaging != "pom")
    but that results in
    Cannot publish module metadata where component artifacts are modified.
    Any ideas?
    • 1
    • 1
  • d

    Dariusz Kuc

    05/30/2020, 7:34 PM
    hello! any idea why publish to sonatype would not include my custom gradle plugin.jar? I’m publishing to both Maven Central (through
    publish
    ) and Plugin Portal (
    publishPlugin
    ) and while last publish was successful I only got pom, module, javadoc and sources (from default maven publication) but no jar (in sonatype). My root project config: https://github.com/ExpediaGroup/graphql-kotlin/blob/master/build.gradle.kts#L172 <- I’m explicitly configuring 
    mavenJava
     publication for all projects except Gradle plugin as it explicitly creates its own 
    pluginMaven
     publication. Gradle plugin config: https://github.com/ExpediaGroup/graphql-kotlin/blob/master/plugins/graphql-kotlin-gradle-plugin/build.gradle.kts
    publishToMavenLocal
     correctly publishes the plugin jar so it would appear that 
    pluginMaven
     publication already contains the jar -> any ideas?
    g
    a
    • 3
    • 11
  • s

    SrSouza

    06/01/2020, 7:08 PM
    Hi folks, anyone was able to use GrGit with Kotlin DSL?
    c
    • 2
    • 2
  • e

    Elizabeth Mezias

    06/02/2020, 1:42 AM
    Build configuration question… Do you know any tools or maybe a good strategy for distributing app keys, license strings and similar build variables to engineers on the team in a secure manner? A password protected file on a shared volume is one way of doing it. Is there a better way? Please share what works for you.
    g
    • 2
    • 2
  • e

    elect

    06/02/2020, 8:42 AM
    porting some plugin tests to kotlin, I'm surprise
    Project::repositories(Closure configureClosure)
    doesnt accept a kt lambda.. is this normal or am I doing anything wrong?
    g
    • 2
    • 2
  • r

    Rodrigo Silva

    06/02/2020, 12:44 PM
    I am trying to migrate a groovy code to kotlin.dsl. But I can not. Could anyone help?
    t
    • 2
    • 8
  • s

    Sam Garfinkel

    06/04/2020, 5:35 PM
    Does the
    kotlin("jvm")
    plugin not correctly resolve MPP libraries from the meta-lib? For instance the following fails to resolve
    implementation("net.devrieze:xmlutil-serialization:0.20.0.1")
    .
    l
    • 2
    • 6
  • p

    Peter

    06/04/2020, 9:15 PM
    does anyone have a good example of a multi module gradle project, with a separate module for
    integration test
    that depends on another module eg
    service
    ? iow, in
    integration test
    build.gradle.kts i have
    implementation(project(":service"))
    when building the
    integration test
    module it fails to find the service.jar - looks like there’s a race condition as every time i check the jar did get created right around the same time
    d
    • 2
    • 8
  • g

    groostav

    06/04/2020, 11:55 PM
    does anybody know why after adding a dependency on org.antlr:antlr4:4.8-1 (https://mvnrepository.com/artifact/org.antlr/antlr4/4.8-1) one of the artifacts listed there, antl4-4.8.1-complete.jar is not anywhere in the gradle cache?
    o
    • 2
    • 5
  • d

    Davide Giuseppe Farella

    06/06/2020, 3:30 PM
    publish
     and 
    publishAndroid
     are helpers that I wrote and internally do:
    apply(plugin = "com.jfrog.bintray")
    apply(plugin = "maven-publish")
    
    group = ...
    version = ...
    
    afterEvaluate {
      publishing { ... }
      configure<BintrayExtension> { ... }
    }
    j
    • 2
    • 29
  • d

    David Glasser

    06/08/2020, 4:42 PM
    Is there documentation somewhere of precisely what tasks the Kotlin JVM plugin adds to a project? (Or an easy way to see it for myself, with dependencies?)
    c
    • 2
    • 1
  • k

    Kepha

    06/09/2020, 2:25 AM
    Is there any gradle commnd to reimport new modules added into build.gradle ?
    o
    • 2
    • 10
  • e

    elect

    06/09/2020, 6:06 AM
    trying to upgrade the jmh plugin, with gradle 5.6 the kotlin gradle plugin warns about the deprecation of the
    DefaultSourceDirectorySet
    constructor:
    The DefaultSourceDirectorySet constructor has been deprecated. This is scheduled to be removed in Gradle 6.0. Please use the ObjectFactory service to create instances of SourceDirectorySet instead.
    with gradle 6.0 the plugin crashes because the method does not exist anymore (it calls it via reflection):
    Caused by: java.lang.NoSuchMethodException: org.gradle.api.internal.file.DefaultSourceDirectorySet.<init>(java.lang.String, org.gradle.api.internal.file.FileResolver, org.gradle.api.internal.file.collections.DirectoryFileTreeFactory)
    	at java.base/java.lang.Class.getConstructor0(Class.java:3349)
    	at java.base/java.lang.Class.getConstructor(Class.java:2151)
    	at org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt.<clinit>(DefaultKotlinSourceSet.kt:148)
    	... 191 more
    Old code is here: https://github.com/JetBrains/kotlin/blob/a44d70e79d06a5133b86470c749cc2d0bf870053/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/sources/DefaultKotlinSourceSet.kt#L149 however in the actual code, that snippet has been reworked: https://github.com/JetBrains/kotlin/blob/bd66e87440b9d2463437a4682128d4ce24de91ca/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/sources/DefaultKotlinSourceSet.kt#L226-L227 I do use
    1.3.72
    , a
    dependencies
    task prints out:
    kotlinCompilerPluginClasspath
    +...
    \--- org.jetbrains.kotlin:kotlin-sam-with-receiver:1.3.72
         +--- org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.3.72
         |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.72 (*)
         |    \--- org.jetbrains.kotlin:kotlin-native-utils:1.3.72
         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.72 (*)
         |         \--- org.jetbrains.kotlin:kotlin-util-io:1.3.72
         |              \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.72 (*)
         +--- org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.3.72
         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.72 (*)
         \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.72 (*)
    but I don't know when that snippet has been actually implemented.. I cant seem to find 1.3.72 on the repo, although 1.3.70 does have still the deprecated constructor: https://github.com/JetBrains/kotlin/blob/1.3.70/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/sources/DefaultKotlinSourceSet.kt#L249
    g
    • 2
    • 17
  • n

    Nicolas Bourdin

    06/09/2020, 9:27 AM
    Hello, Is it possible to fetch gradle dependencies from private repo with ssh ? example : //settings.gradle
    sourceControl {
        gitRepository("<ssh://git@my.privaterepo.com/Nicolas/common.git>") {
            producesModule("my.private.lib:common")
        }
    }
    //build.gradle
    implementation 'my.private.lib:com'
    When i try to build i got the following error with gradle :
    Could not run ls-remote for <ssh://git>@my.privaterepo.com/Nicolas/common.git
    <ssh://git>@my.privaterepo.com/Nicolas/common.git: Auth fail
    <ssh://git>@my.privaterepo.com/Nicolas/common.git: Auth fail
    Auth fail
    Maybe i need to fix something with my ssh key ?
    g
    • 2
    • 4
  • g

    gammax

    06/09/2020, 9:34 AM
    Seems like the invite link in the topic is expired 😕
    g
    • 2
    • 2
  • e

    egorand

    06/09/2020, 2:50 PM
    Has anyone tried Gradle's new file system watching feature yet (https://blog.gradle.org/introducing-file-system-watching)? I suspect that it interferes with Kotlin's incremental compilation, I've started seeing the following messages in the build output and the builds got considerably slower:
    Could not perform incremental compilation: Could not connect to Kotlin compile daemon
    Could not connect to kotlin daemon. Using fallback strategy.
    Still working on a repro sample and planning to submit a bug report, but wondering if anyone's had a similar experience.
    l
    • 2
    • 9
  • j

    jaguililla

    06/09/2020, 5:14 PM
    Hello, do you know if it is possible to apply Kotlin DSL scripts? applying
    .gradle.kts
    scripts with
    apply(from = "<file>.gradle.kts")
    doesn't work for me (Gradle 6.5). However, errors happens only when the script relies on a plugin (it seems to work fine if no extra plugin is required). If someone has had the same issue I would appreciate your comments. Thanks!
    o
    c
    e
    • 4
    • 7
  • c

    camdenorrb

    06/10/2020, 12:28 AM
    How do I properly make it so it makes 2 JVM sourcesets with different dependencies?
    o
    • 2
    • 28
  • g

    GarouDan

    06/10/2020, 11:23 PM
    How can we create a
    !
    operator in Kotlin? For example, if I have MyClass defined as:
    MyClass() {
      run() {
        println("finished")
      }
    }
    I’d like to create a situation where doing something like this:
    val myObject = MyClass()
    myObject!
    is equivalent to
    myObject().run()
    the methods will be more complex since this is for a special library that I’m doing, but the simple idea is like this. How can we define this operator? I think it is possible because we have the
    !!
    one.
    s
    o
    • 3
    • 9
  • j

    janvladimirmostert

    06/11/2020, 8:15 PM
    is there a way to declare global variables in a build.gradle.kts? Trying to do something like this
    val kotlinVersion: String = "1.4-M2"
    // fun Project.kotlinVersion(): String = "1.4-M2"
    
    plugins {
       kotlin("multiplatform").version(kotlinVersion)
    this doesn't show any red lines in the IDE, but neither does it compile, i doesn't know what Version is
    object Version {
        const val kotlin = "1.4-M2"
    }
    
    plugins {
        kotlin("multiplatform").version(Version.kotlin)
    d
    c
    • 3
    • 4
  • s

    Samyak Jain

    06/12/2020, 2:26 PM
    mport org.jetbrains.dokka.gradle.DokkaTask
    import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
    import org.jetbrains.kotlin.pill.PillExtension
    
    plugins {
        java
        kotlin("jvm")
        `java-gradle-plugin`
        id("org.jetbrains.dokka")
        id("jps-compatible")
    }
    
    publish()
    
    // todo: make lazy
    val jar: Jar by tasks
    val jarContents by configurations.creating
    
    sourcesJar()
    javadocJar()
    
    repositories {
        google()
    }
    
    pill {
        variant = PillExtension.Variant.FULL
    }
    
    dependencies {
        compile(project(":kotlin-gradle-plugin-api"))
        compile(project(":kotlin-gradle-plugin-model"))
        compileOnly(project(":compiler"))
        compileOnly(project(":compiler:incremental-compilation-impl"))
        compileOnly(project(":compiler:daemon-common"))
    
        compile(kotlinStdlib())
        compile(project(":kotlin-native:kotlin-native-utils"))
        compileOnly(project(":kotlin-reflect-api"))
        compileOnly(project(":kotlin-android-extensions"))
        compileOnly(project(":kotlin-build-common"))
        compileOnly(project(":kotlin-compiler-runner"))
        compileOnly(project(":kotlin-annotation-processing"))
        compileOnly(project(":kotlin-annotation-processing-gradle"))
        compileOnly(project(":kotlin-scripting-compiler"))
    
        compileOnly("com.android.tools.build:gradle:2.0.0")
        compileOnly("com.android.tools.build:gradle-core:2.0.0")
        compileOnly("com.android.tools.build:builder:2.0.0")
        compileOnly("com.android.tools.build:builder-model:2.0.0")
        compileOnly("org.codehaus.groovy:groovy-all:2.4.12")
        compileOnly(gradleApi())
    
        compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
    
        runtime(projectRuntimeJar(":kotlin-compiler-embeddable"))
        runtime(projectRuntimeJar(":kotlin-annotation-processing-gradle"))
        runtime(projectRuntimeJar(":kotlin-android-extensions"))
        runtime(projectRuntimeJar(":kotlin-compiler-runner"))
        runtime(projectRuntimeJar(":kotlin-scripting-compiler-embeddable"))
        runtime(project(":kotlin-reflect"))
    
        jarContents(compileOnly(intellijDep()) {
            includeJars("asm-all", rootProject = rootProject)
        })
    
        // com.android.tools.build:gradle has ~50 unneeded transitive dependencies
        compileOnly("com.android.tools.build:gradle:3.0.0") { isTransitive = false }
        compileOnly("com.android.tools.build:gradle-core:3.0.0") { isTransitive = false }
        compileOnly("com.android.tools.build:builder-model:3.0.0") { isTransitive = false }
    
        testCompileOnly (project(":compiler"))
        testCompile(projectTests(":kotlin-build-common"))
        testCompile(project(":kotlin-android-extensions"))
        testCompile(project(":kotlin-compiler-runner"))
        testCompile(project(":kotlin-test::kotlin-test-junit"))
        testCompile("junit:junit:4.12")
        testCompileOnly(project(":kotlin-reflect-api"))
        testCompileOnly(project(":kotlin-annotation-processing"))
        testCompileOnly(project(":kotlin-annotation-processing-gradle"))
    }
    
    runtimeJar(rewriteDepsToShadedCompiler(jar)) {
        dependsOn(jarContents)
    
        from {
            jarContents.asFileTree.map {
                if (it.endsWith(".jar")) zipTree(it) 
                else it
            }
        }
    }
    
    tasks {
        withType<KotlinCompile> {
            kotlinOptions.jdkHome = rootProject.extra["JDK_18"] as String
            kotlinOptions.languageVersion = "1.2"
            kotlinOptions.apiVersion = "1.2"
            kotlinOptions.freeCompilerArgs += listOf("-Xskip-metadata-version-check")
        }
    
        named<ProcessResources>("processResources") {
            val propertiesToExpand = mapOf("projectVersion" to project.version)
            for ((name, value) in propertiesToExpand) {
                inputs.property(name, value)
            }
            filesMatching("project.properties") {
                expand("projectVersion" to project.version)
            }
        }
    
        named<Jar>("jar") {
            callGroovy("manifestAttributes", manifest, project)
        }
    
        named<ValidateTaskProperties>("validateTaskProperties") {
            failOnWarning = true
        }
    
        named<DokkaTask>("dokka") {
            outputFormat = "markdown"
            includes = listOf("$projectDir/Module.md")
        }
    }
    
    projectTest {
        executable = "${rootProject.extra["JDK_18"]!!}/bin/java"
        dependsOn(tasks.named("validateTaskProperties"))
    }
    
    pluginBundle {
        fun create(name: String, id: String, display: String) {
            (plugins).create(name) {
                this.id = id
                this.displayName = display
                this.description = display
            }
        }
    
        create(
            name = "kotlinJvmPlugin",
            id = "org.jetbrains.kotlin.jvm",
            display = "Kotlin JVM plugin"
        )
    //    create(
    //        name = "kotlinJsPlugin",
    //        id = "org.jetbrains.kotlin.js",
    //        display = "Kotlin JS plugin"
    //    )
        create(
            name = "kotlinMultiplatformPlugin",
            id = "org.jetbrains.kotlin.multiplatform",
            display = "Kotlin Multiplatform plugin"
        )
        create(
            name = "kotlinAndroidPlugin",
            id = "org.jetbrains.kotlin.android",
            display = "Android"
        )
        create(
            name = "kotlinAndroidExtensionsPlugin",
            id = "org.jetbrains.kotlin.android.extensions",
            display = "Kotlin Android Extensions plugin"
        )
        create(
            name = "kotlinKaptPlugin",
            id = "org.jetbrains.kotlin.kapt",
            display = "Kotlin Kapt plugin"
        )
        create(
            name = "kotlinScriptingPlugin",
            id = "org.jetbrains.kotlin.plugin.scripting",
            display = "Gradle plugin for kotlin scripting"
        )
        create(
            name = "kotlinNativeCocoapodsPlugin",
            id = "org.jetbrains.kotlin.native.cocoapods",
            display = "Kotlin Native plugin for CocoaPods integration"
        )
    }
    g
    • 2
    • 28
  • s

    Samyak Jain

    06/12/2020, 2:26 PM
    Hey, I'm stuck at some groovy translation (from kts to groovy). I am trying to compile the source code of kotlin for vs 1.3.30 to work with Gradle 4.4.1 (hence needs groovy). I'm unable to do the conversion correctly for
    libraries/tools/kotlin-gradle-plugin/build.gradle.kts
    . Here's the kts file:
    g
    • 2
    • 5
  • s

    Samyak Jain

    06/13/2020, 3:57 PM
    Hii, I'm facing this error while running gradle 4.4.1 on kotlin:
    * Where:
    Build file '/home/samyak/gsoc/kotlin/kotlin-1.3.30/kotlin-1.3.30/prepare/compiler-embeddable/build.gradle' line: 30
    
    * What went wrong:
    A problem occurred evaluating project ':kotlin-compiler-embeddable'.
    > No signature of method: static EmbeddableKt.compilerDummyForDependenciesRewriting() is applicable for argument types: (java.lang.String, build_3iru8x0j1kdz5fc4ppmd4bywe$_run_closure2) values: [compilerDummy, build_3iru8x0j1kdz5fc4ppmd4bywe$_run_closure2@51ac48b3]
      Possible solutions: compilerDummyForDependenciesRewriting(org.gradle.api.Project, java.lang.String, kotlin.jvm.functions.Function1)
    
    * Try:
    Run with --debug option to get more log output. Run with --scan to get full insights.
    I'm not able to debug this bit, any help is appreciated.
    n
    • 2
    • 5
  • m

    Mohamed Ibrahim

    06/14/2020, 11:14 AM
    is there a Kotlin friendly Gradle plugin to generate versions from git?
    t
    • 2
    • 2
  • u

    ursus

    06/14/2020, 8:25 PM
    how can I do this, without renaming it to 
    transaction:transaction-contract
    ?
    r
    • 2
    • 4
  • u

    ursus

    06/14/2020, 8:25 PM
    or do people just slap all modules at the same level, and hierarchies are created via dashes?
    • 1
    • 1
  • y

    Yevhenii Nadtochii

    06/14/2020, 9:09 PM
    Hello! Does anybody know what the simplest way to register several run tasks that represent exact copy of original one with changed app arguments ?
    gradle run --args='--mode=middle'      ---> gradle run
    gradle run --args='--mode=greed'       ---> gradle runGreed OR gradle run greed
    gradle run --args='--mode=lavish'      ---> gradle runLavish OR gradle run lavish
    o
    • 2
    • 4
Powered by Linen
Title
y

Yevhenii Nadtochii

06/14/2020, 9:09 PM
Hello! Does anybody know what the simplest way to register several run tasks that represent exact copy of original one with changed app arguments ?
gradle run --args='--mode=middle'      ---> gradle run
gradle run --args='--mode=greed'       ---> gradle runGreed OR gradle run greed
gradle run --args='--mode=lavish'      ---> gradle runLavish OR gradle run lavish
o

octylFractal

06/14/2020, 9:12 PM
do you want to literally do it like that on the Gradle command line, or just do
gradle runGreed
?
y

Yevhenii Nadtochii

06/14/2020, 9:21 PM
to literally do it like that on the Gradle command line
I have no idea what it means 🙃 Basically, I was wondering about
gradle runGreed
or
gradle run greed
. what would be simpler
o

octylFractal

06/14/2020, 9:25 PM
https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/options/Option.html would be a possible way to make this so you could do
gradle run --mode=middle
, etc.
y

Yevhenii Nadtochii

06/14/2020, 9:40 PM
okay. but how can I obtain exact copy of
run
without declaring my own JavaExec ?
View count: 15