https://kotlinlang.org logo
Docs
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

    Pitel

    09/13/2021, 1:25 PM
    Can I pass arguments to
    kotlinc
    directly from command line?
    v
    • 2
    • 10
  • t

    tim

    09/13/2021, 3:50 PM
    Hello, I have a dozen+ kotlin micro services across different git repos. Each service has its own
    gradle.build.kts
    file and the duplication is driving us crazy! To start I'd like to extract common dependencies + versions and so we are looking at gradle's version catalogues. But now that we've gone down this route, there are lots of other common blocks in our
    gradle.build.kts
    that we'd like to capture centrally as well for example the plugins block or settings like
    tasks.withType<KotlinCompile>.kotlinOptions { freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn" }
    . So what does best practice look like here? 🙏
    :yes: 1
    m
    t
    +3
    • 6
    • 14
  • e

    elect

    09/14/2021, 2:46 PM
    is it normal that a
    kotlin-bom:1.5.10
    relies on
    stdlib:1.4.21
    ?
    [INFO]    +- org.jetbrains.kotlin:kotlin-bom:pom:1.5.10:compile
    [INFO]    +- org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.5.10:compile
    [INFO]    |  +- org.jetbrains.kotlin:kotlin-stdlib:jar:1.4.21:compile
    [INFO]    |  |  \- org.jetbrains:annotations:jar:13.0:compile
    [INFO]    |  \- org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.5.10:compile
    t
    l
    • 3
    • 7
  • g

    Gabriel Duncan

    09/14/2021, 5:37 PM
    hello! this is kind of a kotlin MPP and gradle question wrapped into one burrito. So we recently moved all of our apps into a monorepo from separate github repos. we converted everything into a gradle mutli-module project so we could share dependencies more easily. the problem: before, the MPP app front-end (javascript) was easily debuggable because we could set breakpoints in the kotlinjs files directly in the inspector or in intellij ultimate. however, since moving things into a monorepo and sharing dependencies the path info seems to have broken and now the webpack server can’t find any of the kotlinjs files. it appears that the files are located but they all give webpack a 404 error. the path info in the old non monorepo setup looks very different from the new path info, which makes sense because as a result of sharing code and using a multimodule gradle project the build directory is now one level up. i’m curious if anyone has run into this issue and fixed it or if anyone has advice on what to try
    i
    • 2
    • 17
  • o

    oletjens

    09/16/2021, 9:53 AM
    If you are wondering why your dependency downloads are failing now: https://discuss.gradle.org/t/getting-plugins-from-jcenter-no-longer-works/40998
    👌 3
    a
    m
    c
    • 4
    • 3
  • h

    Henning B

    09/16/2021, 2:42 PM
    Any ideas how I can get rid of these build warnings? I got them since Kotlin 1.5.20. Somehow reflect is stuck at 1.4.10
    w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
        .gradle/caches/transforms-3/59efbb5d2fb40235871696f9259a7d8d/transformed/jetified-kotlin-stdlib-jdk8-1.5.30.jar (version 1.5)
        .gradle/caches/transforms-3/e66f57a2a74abdb19022465647f40d82/transformed/jetified-kotlin-stdlib-jdk7-1.5.30.jar (version 1.5)
        .gradle/caches/transforms-3/2d4b2907d0729a36c30c280633903ab8/transformed/jetified-kotlin-reflect-1.4.10.jar (version 1.4)
        .gradle/caches/transforms-3/ef7b524e21c54733be325fc195aa1b28/transformed/jetified-kotlin-stdlib-1.5.30.jar (version 1.5)
        .gradle/caches/transforms-3/fa4d08380a08dd9897606270ef087751/transformed/jetified-kotlin-stdlib-common-1.5.30.jar (version 1.5)
    s
    t
    +2
    • 5
    • 11
  • w

    William Reed

    09/16/2021, 8:28 PM
    i’ve just upgraded to gradle 7 (using
    ./gradlew wrapper --gradle-version 7.0.2
    ) and my kotlin gradle scripts show many errors saying something similar to
    Cannot access 'kotlin.collections.Collection' which is a supertype of 'org.gradle.api.artifacts.dsl.RepositoryHandler'. Check your module classpath for missing or conflicting dependencies
    i don’t see any reason this should happen based on the gradle 7 docs. any ideas?
    e
    k
    t
    • 4
    • 9
  • d

    Deepak Gahlot

    09/17/2021, 5:58 PM
    Hello, I'm encountering this issue " Task :app:connectedDebugAndroidTest FAILED", when running test cases via Gradle command. This is when i'm trying to generate the coverage report from Jacoco using command "createDebugCoverageReport"
    n
    • 2
    • 6
  • e

    Exerosis

    09/20/2021, 3:46 PM
    Hey so I was writing a multiplatform library, but it seems to be that case that all the code can just be in common. What's the best way to setup builds for various platforms without having source sets for each platform? Or should I just not worry about it and remove the directories. (bout to eat lunch apologies in advance for delayed responses)
    l
    • 2
    • 1
  • m

    Michal Klimczak

    09/22/2021, 7:19 AM
    when making an extension for a custom gradle plugin, which is more idiomatic for kotlin-dsl and is it just a design thing or does it matter for some other reason
    //using just String
    myPlugin {
        foo = "bar"
    }
    
    //using Property
    myPlugin {
        foo.set("bar")
    }
    m
    f
    +2
    • 5
    • 15
  • w

    William Reed

    09/22/2021, 3:15 PM
    Haven’t had any responses to this in #android, hoping someone can shed some light on why android gradle 7 is causing this issue
    m
    • 2
    • 3
  • a

    amadeu01

    09/22/2021, 7:57 PM
    Ppl, do you know if I can import a
    .gradle.kts
    file inside a
    .gradle
    file?
    k
    h
    +4
    • 7
    • 9
  • b

    Ben Madore

    09/23/2021, 5:02 PM
    i’ve got a
    kotlin-conventions
    plugin (precompiled script plugin), that users can put on their app, and it will configure kotlin (apply various plugins, imports kotlin bom, configure detekt etc.) the version of the kotlin bom applied is configurable via an extension class, but i’ve run into an issue with kapt. the version of the kotlin plugins (e.g. kapt) applied seems to be fixed, by whatever is added to the plugin build’s classpath. Is there any way to make this configurable? It looks like using kotlin 1.5.31 at runtime, with kapt plugin version 1.4.31 was causing some very strange and unexpected failures. and i’m not sure how to solve this for a generic plugin. i guess the generic question is: is there any way to apply a plugin to a project, where the version of the plugin comes from an extension object, and is not statically defined.
    t
    h
    • 3
    • 11
  • t

    tim

    09/28/2021, 12:45 PM
    I'm learning custom gradle plugins and I'm struggling with plugin extensions. I'm currently working through the gradle guide on making the plugin configurable but i'm getting the following error when running
    ./gradlew tasks
    locally:
    * What went wrong:
    Failed to apply plugin class 'Build_gradle$FooPlugin'.
    > Could not create plugin of type 'FooPlugin'.
       > The constructor for type Build_gradle.FooPlugin should be annotated with @Inject.
    v
    • 2
    • 17
  • ł

    Łukasz Kłosiński

    09/29/2021, 1:55 PM
    Hi! Newbie here. I have a ktor project and want to inject external .war files to my build and deploy them together with my app with exposed endpoints for each. I have no idea how to achieve this - any pointers would be much appreciated.
    c
    • 2
    • 11
  • m

    MBegemot

    09/30/2021, 3:32 PM
    serialization plugin is not applied in a composite build. Intellij 2021 and kotlin 1.5.30
    t
    • 2
    • 1
  • k

    kpgalligan

    09/30/2021, 3:53 PM
    I feel like this is a super simple question. I have a Kotlin JVM project making a jar. It's a gradle plugin. There are some local jar's that aren't published to anywhere, so I'm using the shadow plugin to pull them in (https://imperceptiblethoughts.com/shadow/). That's all working, but the build makes the regular jar, and also an '-all' jar from the shadow plugin. I've been trying to configure
    maven-publish
    and/or
    com.vanniktech.maven.publish
    to simply replace the regular jar with the '-all' one and publish that. So far, publishing still seems to consider the main jar the primary artifact. The docs don't really get at what I'm trying to go (https://imperceptiblethoughts.com/shadow/publishing/#publishing-with-maven-publish-plugin). So far at best I'm able to get both jars published with the shadow jar mentioned in the module (not the pom), but using it as a dependency pulls in the regular jar and fails because of ClassNotFound type exceptions (for obvious reasons). I'm hoping somebody has a simple answer or example. Seems like it should be easy, but I still haven't found an example that works (with gradle 7+, anyway). Switching focus till late tomorrow but will try to extract a simple example and post. Thanks in advance!
    t
    • 2
    • 2
  • t

    Tomas Kormanak

    10/01/2021, 9:45 AM
    Hi, is there a difference between those options? I see both in examples
    kotlin {
        sourceSets {
            val commonMain by getting { /* ... */ }
        }
    }
    and
    kotlin {
        sourceSets {
            commonMain { /* ... */ }
        }
    }
    j
    s
    b
    • 4
    • 16
  • g

    Gabriel Duncan

    10/01/2021, 7:14 PM
    Hello, i haven’t gotten any help on my problem and i’ve posted a few times. I don’t want to spam the channel, so i’m not sure what to do. anyone have any recommendations?
    h
    e
    • 3
    • 5
  • b

    Ben Madore

    10/04/2021, 3:27 PM
    my project has the following plugins applied:
    kotlin("jvm") version "1.5.31" 
        id("org.jetbrains.kotlin.plugin.spring") version "1.5.31" 
        id("org.jetbrains.kotlin.plugin.noarg") version "1.5.31"
        id("org.jetbrains.kotlin.plugin.lombok") version "1.5.31"
        id("io.freefair.lombok") version "5.3.0"
        id("org.jetbrains.dokka") version "1.5.30"
    but for some reason it looks like gradle is selecting
    1.5.10
    for the
    kotlin-stdlib-*
    dependencies:
    ❯ gr dependencyInsight --dependency "org.jetbrains.kotlin:kotlin-stdlib-jdk8" --configuration kotlinCompilerPluginClasspathMain
    executing gradlew instead of gradle
    Type-safe dependency accessors is an incubating feature.
    Type-safe project accessors is an incubating feature.
    
    > Task :dependencyInsight
    org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.10 (selected by rule)
       variant "runtime" [
          org.gradle.status          = release (not requested)
          org.gradle.usage           = java-runtime (not requested)
          org.gradle.libraryelements = jar (not requested)
          org.gradle.category        = library (not requested)
       ]
    
    org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.20 -> 1.5.10
    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.1
         \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1
              +--- org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.5.31 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0)
              |    \--- org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.5.31
              |         \--- kotlinCompilerPluginClasspathMain
              \--- org.jetbrains.kotlin:kotlin-scripting-common:1.5.10 (requested org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8)
                   +--- org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.5.31 (requested org.jetbrains.kotlin:kotlin-scripting-common:1.5.31) (*)
                   \--- org.jetbrains.kotlin:kotlin-scripting-jvm:1.5.10
                        \--- org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.5.31 (requested org.jetbrains.kotlin:kotlin-scripting-jvm:1.5.31) (*)
    
    (*) - dependencies omitted (listed previously)
    perhaps i just don’t understand how to read the dependencyInsights, but it’s unclear to me why it would choose that version
    t
    • 2
    • 4
  • m

    mcpiroman

    10/04/2021, 4:56 PM
    Anyone knows why
    plugins { kotlin("jvm") }
    does not apply configurations like
    api
    in subproject?
    t
    • 2
    • 1
  • e

    Endre Deak

    10/06/2021, 8:57 PM
    I have integration and system test source sets and I’ve marked the related folders in IntelliJ as test sources root. Whenever I do a Gradle sync, it changes back to sources root. How can I define in Gradle that the root folder is test sources root? Here’s how I define the sourceSet and test task for integration tests:
    // custom task type to be able to create custom environment variables here
    abstract class IntegrationTest : Test()
    
    val integrationTest: SourceSet by sourceSets.creating {
        compileClasspath += sourceSets.main.get().output
        runtimeClasspath += sourceSets.main.get().output
    }
    
    configurations[integrationTest.implementationConfigurationName].extendsFrom(configurations.testImplementation.get())
    configurations[integrationTest.runtimeOnlyConfigurationName].extendsFrom(configurations.runtimeOnly.get())
    
    val integrationTestTask = tasks.register<IntegrationTest>("integrationTest") {
        description = "Runs integration tests."
        group = "verification"
        testClassesDirs = sourceSets["integrationTest"].output.classesDirs
        classpath = sourceSets["integrationTest"].runtimeClasspath
    }
    
    tasks.withType<IntegrationTest> {
        val envName = "local"
    
        environment(
            mapOf(
                "KEY" to "myTestValue"
            )
        )
    }
    e
    v
    • 3
    • 10
  • a

    Alexander Suraphel

    10/07/2021, 3:04 PM
    Is
    plugins {
        id 'org.jetbrains.kotlin:android' version "$kotlin_version"
    }
    alternative syntax for:
    apply plugin: 'kotlin-android'
    ? Apologies for the noob question.
    m
    • 2
    • 18
  • a

    Alexander Suraphel

    10/07/2021, 3:32 PM
    When applying the above plugin I’m getting the error:
    A problem occurred configuring root project ''.
    > 'kotlin-android' plugin requires one of the Android Gradle plugins.
    Please apply one of the following plugins to ':' project:
    - com.android.application
    - com.android.library
    - com.android.dynamic-feature
    - com.android.asset-pack
    - com.android.asset-pack-bundle
    - com.android.lint
    - com.android.test
    - com.android.instantapp
    - com.android.feature
    What am I missing?
    m
    • 2
    • 20
  • e

    Endre Deak

    10/08/2021, 10:22 PM
    Not sure which channel is the appropriate one, but I’m experimenting with detekt + kotlinter and I’m trying to achieve the following: • when I hit
    cmd+option+L
    (I’m using a mac) to reformat kotlin code, I want this to match with the format kotlinter uses • when I run a gradle build, kotlinter should format not only the changed code, but everything • I want kotlinter result to be applied before detekt is executed (so for example if I have a long line, kotlinter fixes it, so detekt doesn’t fail on that) From all things (idea, detekt, kotlinter) I’m using the latest versions: • IDEA 2021.2.2 Ultimate (212.5284.40) • detekt: 1.18.1 • kotlinter: 3.6.0 I always run into some problems: • idea autoformat doesn’t match kotlinter format • kotlinter only formats changed lines not the entire file Relevant gradle parts:
    plugins {
        base
    
        kotlin("jvm")
        id("java")
        id("idea")
        id("com.google.cloud.tools.jib")
        id("org.jmailen.kotlinter")
        id("org.jetbrains.dokka")
        id("io.gitlab.arturbosch.detekt")
    
        `version-catalog`
    
        application
    }
    
    detekt {
        toolVersion = findProperty("detektVersion") as String
        config = files("config/detekt/detekt.yml")
        buildUponDefaultConfig = true
        autoCorrect = true
        debug = true
    }
    
    tasks.detekt {
        dependsOn("formatKotlinMain")
    }
    
    // right now it's a single project, but might be a multiproject later
    allprojects {
        apply(plugin = "idea")
        apply(plugin = "org.jmailen.kotlinter")
        apply(plugin = "io.gitlab.arturbosch.detekt")
    }
    
    kotlinter {
        ignoreFailures = false
        indentSize = 4
        reporters = arrayOf("checkstyle", "plain")
        experimentalRules = false
    }
    g
    • 2
    • 2
  • a

    Anthony Nixon

    10/13/2021, 2:03 PM
    Hey all - I'm hoping someone can help here - still working on my gradle... probably around bluebelt level here... So what's I'm needing to do, GROOVY - I have an enterprise application which must stay on Kotlin 1.2.71 for the build.... but I'm trying to add Dokka to the project which I haven't gotten to work on anything less that Kotlin 1.4.. Does anyone know if there is a way in gradle to build on kotlin plugin/std-lib 1.2 but have JUST Dokka tasks go on 1.4??? Thanks in advance! :)
    b
    t
    +2
    • 5
    • 9
  • s

    Simon Meskens

    10/13/2021, 5:15 PM
    Is there any way to stop detekt and IDEA from complaining about unused variables when I use delegates to declare top-level tasks?
    t
    • 2
    • 2
  • t

    Tomasz Krakowiak

    10/15/2021, 10:07 AM
    Anyone tried gradle composite builds with Kotlin projects? I am getting:
    Caused by: org.gradle.api.UnknownDomainObjectException: Included build 'my-library' not found in build 'my-project'.
    v
    m
    +3
    • 6
    • 14
  • j

    Justin Yue

    10/16/2021, 3:42 AM
    I recently tried adding the following dependencies:
    implementation "com.google.android.libraries.maps:maps:3.1.0-beta"
        implementation "com.google.maps.android:maps-v3-ktx:3.0.1"
    But I'm receiving the following error:
    2 files found with path 'build-data.properties'.
    Adding a packagingOptions block may help, please refer to
    <https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html>
    for more information
    The link provided sends me to a website that doesn't exist, so how should I go about modifying packagingOptions?
    g
    • 2
    • 1
  • e

    Emil Kantis

    10/16/2021, 5:46 PM
    Running
    ./gradlew :my-app:test --info
    twice in a row, the compileKotlin task shows as
    up-to-date
    but still takes around 1 second to execute, is this to be expected? Once you have a few projects it adds a few seconds here and there to test startup time which feels incredibly unnecessary
    > Task :my-app:compileKotlin UP-TO-DATE
    Excluding []
    Excluding []
    Build cache key for task ':my-app:compileKotlin' is 17a575849d631a792fda5556b1b04bd2
    Skipping task ':my-app:compileKotlin' as it is up-to-date.
    :my-app:compileKotlin (Thread[Daemon worker Thread 3,5,main]) completed. Took 1.179 secs.
    v
    • 2
    • 1
Powered by Linen
Title
e

Emil Kantis

10/16/2021, 5:46 PM
Running
./gradlew :my-app:test --info
twice in a row, the compileKotlin task shows as
up-to-date
but still takes around 1 second to execute, is this to be expected? Once you have a few projects it adds a few seconds here and there to test startup time which feels incredibly unnecessary
> Task :my-app:compileKotlin UP-TO-DATE
Excluding []
Excluding []
Build cache key for task ':my-app:compileKotlin' is 17a575849d631a792fda5556b1b04bd2
Skipping task ':my-app:compileKotlin' as it is up-to-date.
:my-app:compileKotlin (Thread[Daemon worker Thread 3,5,main]) completed. Took 1.179 secs.
v

Vampire

10/17/2021, 9:45 AM
Maybe you have maaaaany inputs that needed to be considered when calculating the cache key? You could create a build scan and look whether you found more information there and you could use the
gradle-profiler
to investigate deeper.
☝️ 1
View count: 15