• SomeCat

    SomeCat

    1 year ago
    Hello folks! Question on gradle and docker, from the perspective: we will have to run gradle to build our product within a docker container. Are there any best practices for such a setup? (the online resources I found mostly talk about using docker by gradle, to establish test configurations and such, but not how to run gradle inside docker) Myself, I can think of: • make sure that the build cache is shared across docker runs to avoid constant “starting from 0” • make sure that gradle does NOT run as server (at least for us, our docker sessions are invoked for a built, and then discarded) • make sure the desired gradle version is installed in the docker image you are using What are your thoughts?
    SomeCat
    c
    +2
    5 replies
    Copy to Clipboard
  • ankushg

    ankushg

    1 year ago
    Anyone know if there's a way to map Kotlin's compiler warnings (the ones that get spit out to the command line) into some artifact that we could analyze? Maybe a checkstyle-y XML report? We're not yet at a point where we can turn on warnings-as-errors, but we want to measure and add accountability to teams owning areas with lots of warnings
    ankushg
    m
    +2
    7 replies
    Copy to Clipboard
  • ankushg

    ankushg

    1 year ago
    As we use Kotlin Multiplatform more broadly, we're (thankfully!) having more iOS and frontend web friends contributing to the KMP codebase.  I'm looking into ways to automate and enforce consistency for dev environment setup, and a common sticking point is just getting the JDK installed and working. Are Kotlin build tasks (especially multiplatform ones) compatible with Gradle's Java Toolchain declaration? https://docs.gradle.org/current/userguide/toolchains.html
    ankushg
    tapchicoma
    2 replies
    Copy to Clipboard
  • e

    Evan

    1 year ago
    I’m using the
    kotlin-dsl
    and the
    buildSrc
    folder in my project. It relies on
    jCenter
    which is at end of life. Does anyone know what repository I need to migrate to?
    e
    tapchicoma
    +2
    5 replies
    Copy to Clipboard
  • d

    diesieben07

    1 year ago
    I have a multi-module Gradle build using Gradle Kotlin DSL. I would like to share a common configuration for the Kotlin plugin across the modules, for example the "used experimental annotations". For example I have this snippet:
    kotlin {
        sourceSets.all {
            languageSettings.useExperimentalAnnotation("kotlin.RequiresOptIn")
        }
    }
    I would like to move this into buildSrc so in the modules I can just do:
    kotlin {
        configureExperimentalAnnotations()
    }
    To do this, I'd want to do this as an extension function on
    KotlinProjectExtension
    , but I have no idea which dependency I need in the
    buildSrc
    Gradle script for that.
    kotlin-gradle-plugin
    doesn't have it. Any advice?
    d
    tapchicoma
    +1
    33 replies
    Copy to Clipboard
  • s

    Slackbot

    1 year ago
    This message was deleted.
    s
    tapchicoma
    2 replies
    Copy to Clipboard
  • Rob Elliot

    Rob Elliot

    1 year ago
    Hi all - when using the
    kotlin-maven-plugin
    , is there a way to exclude a dependency from the test compile classpath? Context - I’m migrating a project from JUnit 4 to JUnit 5. But it uses testcontainers, which has a transitive dependency on JUnit 4. It’s really easy to accidentally use JUnit 4 annotations, and then find your tests aren’t running… I’d like to exclude JUnit 4 from the test compile classpath so that if you do so you find out fast. Maven doesn’t distinguish between compile & runtime for test scope (why not?!) so I can’t just drop it down to be a runtime scoped dependency. I could exclude it as a dependency of testcontainers, but: a) that would exclude it from the runtime classpath, and testcontainers probably needs it b) the odds are some other dependency will bring it in, now or later… playing whack-a-mole like that is zero fun (Yes it would be easy in Gradle. No I’m not up for having that fight now.)
    Rob Elliot
    h
    7 replies
    Copy to Clipboard
  • Eugen Martynov

    Eugen Martynov

    1 year ago
    I’m trying JDK 16 and I see next
    Caused by: java.lang.IllegalAccessError: class org.jetbrains.kotlin.kapt3.base.KaptContext (in unnamed module @0x52c27981) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x52c27981
    Any ideas? It is JDK 16 ARM and quite standard android project
    Eugen Martynov
    1 replies
    Copy to Clipboard
  • n

    Norbi

    1 year ago
    Is this dependency "multiplication" normal at the "External libraries" in Idea? It is a Gradle project.
    n
    h0tk3y
    2 replies
    Copy to Clipboard
  • b

    Brian Donovan

    9 months ago
    Anyone run into this problem where the GENERATE button doesn’t work?
    b
    gildor
    2 replies
    Copy to Clipboard