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

    Hylke Bron

    09/22/2022, 6:18 AM
    Is it possible to configure a multi module project, containing several library modules (in my case one is KMP, 2 are android only) and one sample app android application, in such a way that: • The library modules use the latest kotlin version (1.7.20-RC) • The android application uses an older kotlin version (1.7.0) • The android application can still depend on the library modules using
    implementation(project(":module-name"))
    ? This is because I am running into issues with several libraries that do not yet support Kotlin 1.7.20-RC (compose, hilt), but I need to use a feature specifically of Kotlin 1.7.20-RC (
    kotlin.native.binary.objcExportSuspendFunctionLaunchThreadRestriction=none
    ) to properly support the ios side in KMP project.
    e
    v
    • 3
    • 10
  • d

    Davide Giuseppe Farella

    09/22/2022, 10:37 AM
    Hello good people. Is it possible to have 2 versions catalog ( or some trick to merge two of them )? The scenario is: We have the
    main
    project and a
    sub
    project as a submodule. Having different dependency versions caused some troubles, so we wanna align them.
    sub
    will have some dependencies in its toml file, but
    main
    would need some dependencies that are not available in
    sub
    j
    v
    • 3
    • 17
  • n

    natario1

    09/22/2022, 5:35 PM
    I stumbled across this article about kotlin.incremental.useClasspathSnapshot, which says:
    it is compatible with the Gradle Build cache.
    Now for the stupid question - what does this mean? Is Kotlin incompatible with the build cache if one doesn’t use this flag? And what does being incompatible mean?
    t
    • 2
    • 4
  • a

    Adam Cooper

    09/22/2022, 11:00 PM
    I have a kotlin native project with only a main module and a test module. How do I make it so that the test module inherits the dependencies of the main module, and how do I make it so that both executables have the same compiler args? I've overridden the compiler args as such
    val nativeTarget = when (System.getProperty("os.name")) {
            "Linux" -> linuxX64("native")
            else -> throw GradleException("Host OS is not supported.")
        }
    
        nativeTarget.apply {
            compilations.getByName("main") {
                cinterops {
                    val openssl by creating {
                        defFile(project.file("src/cinterop/openssl.def"))
                    }
                }
            }
    
            binaries {
                executable {
                    // Use system C libraries
                    val sysRoot = "/"
                    val libgccRoot = File("/lib/gcc/x86_64-linux-gnu/").takeIf { it.exists() }
                        ?: File("/lib/gcc/x86_64-pc-linux-gnu/")
                    // Use the most recent GCC available on the host
                    val libgccPath = file("${libgccRoot.absolutePath}/${libgccRoot.list()!!.last()}")
                    val overriddenProperties =
                        "targetSysRoot.linux_x64=$sysRoot;libGcc.linux_x64=$libgccPath"
                    val compilerArgs = "-Xoverride-konan-properties=$overriddenProperties"
                    this.freeCompilerArgs += listOf(compilerArgs)
                    this.entryPoint = "opstopus.deploptopus.main"
            }
        }
  • r

    rrva

    09/23/2022, 6:48 AM
    I am getting these kind of intermittent errors a lot in gradle builds: java.lang.Exception: Cannot create empty file: /builds/myproject/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab what could be wrong?
    t
    • 2
    • 1
  • r

    rrva

    09/23/2022, 6:49 AM
    kotlin.code.style=official
    org.gradle.parallel=true
    systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false
    org.gradle.caching=true
    
    org.gradle.jvmargs=-Xshare:off -Xmx1g -XX:MaxMetaspaceSize=512m
    kotlin.incremental.useClasspathSnapshot=true
  • n

    nuhkoca

    09/25/2022, 1:49 AM
    Hello, is
    JaCoCo
    report location changed in
    Gradle 7.5.1
    ? It used to be created in
    jacoco
    in
    build
    folder but after
    Gradle
    upgrade, I can’t locate it.
    v
    • 2
    • 8
  • c

    Constantin Cezar Begu

    09/25/2022, 11:57 PM
    Hey, I was wondering if gradle kts + versionCatalogs works when building convention scripts in buildSrc. I have tried to get it to work with several work arounds. Nothing worked. I am trying to use the libs in the plugin block. Is that something which is just not supported?
    v
    • 2
    • 2
  • a

    Abhishek Dewan

    09/26/2022, 6:24 AM
    wondering if anyone has a good example showing setup of protobufs using gradle kotlin dsl in a android project. i’ve been trying to set it up but failing
  • m

    mattinger

    09/27/2022, 12:24 AM
    Does anyone know if there's a published toml file anywhere for jetpack dependencies?
  • t

    tapchicoma

    09/27/2022, 8:35 AM
    Try to collect Kotlin daemon logs here:
    <system_tmp>/kotlin-daemon.*.log
    and probably also Gradle daemon logs here:
    <gradle_user_home>/daemon/<build_gradle_version>/*.log
    j
    • 2
    • 20
  • h

    hfhbd

    09/27/2022, 12:14 PM
    I switched from buildSrc to an includeBuild, but even if I create the plugins with the dsl, Gradle does not generate the
    PluginIdExtension
    anymore. With buildSrc, I could write this:
    plugins { latex }
    , now I have to use
    plugins {  id("latex") }
    . Is this expected?
    gradlePlugin {
        plugins {
            create("latex") {
                id = "latex"
                implementationClass = "latex.LatexPlugin"
            }
            create("plantuml") {
                id = "plantuml"
                implementationClass = "plantuml.PlantumlPlugin"
            }
        }
    }
    v
    e
    j
    • 4
    • 32
  • d

    dawidhyzy

    09/28/2022, 2:29 PM
    what is kts equivalent of
    implementation(name: 'some-library-release', ext: 'aar')
    ? I tried
    implementation(name = "some-library-releasee", ext = "aar")
    but got
    None of the following functions can be called with the arguments supplied: 
    public fun <T : Dependency> DependencyHandler.implementation(dependency: TypeVariable(T), action: Action<TypeVariable(T)>): TypeVariable(T) defined in org.gradle.kotlin.dsl
    public fun DependencyHandler.implementation(dependencyNotation: Any): Dependency? defined in org.gradle.kotlin.dsl
    public fun DependencyHandler.implementation(group: String, name: String, version: String? = ..., configuration: String? = ..., classifier: String? = ..., ext: String? = ..., dependencyConfiguration: Action<ExternalModuleDependency>? = ...): ExternalModuleDependency defined in org.gradle.kotlin.dsl
    public fun DependencyHandler.implementation(dependencyNotation: String, dependencyConfiguration: Action<ExternalModuleDependency>): ExternalModuleDependency defined in org.gradle.kotlin.dsl
    public fun DependencyHandler.implementation(dependencyNotation: Provider<*>, dependencyConfiguration: Action<ExternalModuleDependency>): Unit defined in org.gradle.kotlin.dsl
    public fun DependencyHandler.implementation(dependencyNotation: ProviderConvertible<*>, dependencyConfiguration: Action<ExternalModuleDependency>): Unit defined in org.gradle.kotlin.dsl
    v
    • 2
    • 4
  • g

    Guilherme Delgado

    09/29/2022, 9:59 AM
    Hey! I’m receiving this warnings (not always, didn’t found a pattern):
    > Task :module123:compileDebugKotlin
    warning: opt-in requirement marker kotlinx.coroutines.FlowPreview is unresolved. Please make sure it’s present in the module dependencies
    warning: opt-in requirement marker kotlinx.coroutines.ExperimentalCoroutinesApi is unresolved. Please make sure it’s present in the module dependencies
    warning: opt-in requirement marker kotlinx.serialization.ExperimentalSerializationApi is unresolved. Please make sure it’s present in the module dependencies
    But I’ve a gradle script with it:
    private fun KotlinJvmOptions.addOptions(options: List<String> = emptyList()) {
        jvmTarget = JavaVersion.VERSION_11.toString()
        freeCompilerArgs = freeCompilerArgs + listOf(
            "-opt-in=kotlin.RequiresOptIn",
            "-opt-in=kotlin.Experimental",
            "-opt-in=kotlinx.coroutines.FlowPreview",
            "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
            "-opt-in=kotlinx.serialization.ExperimentalSerializationApi"
        ) + options
    }
    Why is it throwing that warning? 🤔
    v
    m
    • 3
    • 11
  • w

    wakingrufus

    09/29/2022, 10:06 PM
    it looks like with kotlin 1.8.0-dev-3517 and gradle 8.0-20220928221247+0000 i get the following when setting my toolchain to java 19:
    Execution failed for task ':compileTestKotlin'.
    > Error while evaluating property 'compilerOptions.jvmTarget' of task ':compileTestKotlin'.
       > Failed to calculate the value of property 'jvmTarget'.
          > Unknown Kotlin JVM target: 19
    e
    t
    • 3
    • 6
  • h

    hfhbd

    09/30/2022, 7:06 AM
    Anybody else getting a lot of build failures, if you/dependabot only bumps one Kotlin plugin to 1.7.20 but keeps another plugins, eg serialization at 1.7.10? That's basically the whole config, beside normal dependencies:
    plugins {
        kotlin("jvm") version "1.7.20"
        kotlin("plugin.serialization") version "1.7.10"
        id("app.cash.licensee") version "1.5.0"
    }
    
    repositories {
        mavenCentral()
    }
    
    dependencies {
    ...
    }
    c
    • 2
    • 4
  • m

    Mohamed Ibrahim

    10/02/2022, 11:03 AM
    Any ideas of how to handle product flavors cleanly and neatly?
  • d

    dvdandroid

    10/02/2022, 1:15 PM
    is there a way to get the path notation of a gradle submodule? for example
    :mainModule:submodule1:submodule2
    ? now i'm using this code snippet
    val libParents = mutableListOf(name)
    var tempParent = parent
    while (tempParent != null) {
      libParents.add(tempParent!!.name)
      tempParent = tempParent!!.parent
    }
    then i use it with
    joinToString()
    . if not, is it possible to optimize that code, removing the
    temp
    ,
    var
    or even the
    while
    loop? maybe using a kotlin fold function or something like that
    e
    • 2
    • 2
  • r

    rrva

    10/03/2022, 9:58 AM
    are there any known issues with using java 19 combined with kotlin for kotlin-jvm development, for example using java 19 jvm in the CI as build jvm, or in the gradle plugin etc
  • r

    rrva

    10/03/2022, 9:58 AM
    I know gradle does not yet support java 19
  • v

    Victor Kabata

    10/03/2022, 10:31 AM
    👋 Any ideas on how I can convert this code block to kts syntax?
    build.gradle(project)- top level
    subprojects {
        afterEvaluate {
            if (project.hasProperty('android')) {
                android.buildTypes { project -> // This part
                    debug {...}
                    release{...}
                    ... // Other build types
                }
            }
        }
    }
    v
    • 2
    • 3
  • r

    rrva

    10/03/2022, 10:39 AM
    a lazy answer (untested) https://github.com/bernaferrari/GradleKotlinConverter
  • z

    Zach

    10/05/2022, 5:17 PM
    Hello, I am having an issue with specifying a custom build type for my multi-module android project. Basically I want to add a third buildType called review like so
    register("review") {
        isDebuggable = false
        isMinifyEnabled = false
    }
    But when I go to actually build the app, I get a significant amount of errors and warnings having to do with my other modules not containing the
    review
    buildType (errors in thread). I have attempted to add the same build type to all modules with no luck, as well as trying
    missingDimensionStrategy
    in my app module and still no change. What am I missing to add a custom build type to a multi module app?
    k
    • 2
    • 2
  • w

    wakingrufus

    10/05/2022, 9:23 PM
    What is the
    compile[sourceSetName]KotlinOutputClasses
    property that gets added to the
    compile[sourceSetName]Java
    task?
    r
    • 2
    • 6
  • j

    Ji Sungbin

    10/06/2022, 10:56 AM
    Hi, I’m making a Gradle plugin. I need to specify a custom maven repository, but this doesn’t work. Is there any other way?
    class TestPlugin : Plugin<Project> {
        override fun apply(project: Project) {
            with(project) {
                repositories {
                    maven(url = uri("<https://maven.pkg.jetbrains.space/public/p/compose/dev>"))
                }
                dependencies {
                    add(PLUGIN_CLASSPATH_CONFIGURATION_NAME, "land.sungbin:composable.reference.suppressor.plugin:1.0.0")
                }
            }
        }
    }
    v
    w
    • 3
    • 10
  • p

    PHondogo

    10/06/2022, 3:10 PM
    Is there a way to specify opt-ins in gradle.properties?
    v
    t
    • 3
    • 2
  • k

    K Merle

    10/12/2022, 10:39 AM
    Is it possible to exclude package with a specific name from the build?
    c
    • 2
    • 5
  • g

    groostav

    10/12/2022, 3:28 PM
    hey guys: • using java 20, trying to play with project panama • using kotlin • built some code with rust • want: use gradle to compile some kotlin running against java 20 with
    java.lang.foreign
    (an --enable-preview in java 20) I have this very strange behaviour where intelliJ (with a gradle imported project) is able to find
    java.lang.foreign
    , but gradle is not. I do have gradle itself running on java 17, (I Believe), and I've used `
    languageVersion.set(JavaLanguageVersion.of(20))
    in addition to
    org.gradle.java.installations.paths=C:/Program Files/Zulu/zulu-20-ea
    but gradle still seems to be compiling with javac from java-17. Any help?
    t
    • 2
    • 5
  • n

    Norbi

    10/13/2022, 9:50 AM
    I've run into mystical incremental compilation problems in case of a multi-platform multi-module project. Environment: latest Idea, Kotlin 1.7.10, Compose Multiplatform 1.2.0 Maybe the problem is that I'm using Gradle 7.5.1? Should I use the latest officially supported version version? 7.1 maybe? Thanks.
    t
    • 2
    • 8
  • s

    Sergey Chelombitko

    10/13/2022, 11:01 AM
    Has anyone noticed a performance regression between 1.7.20 and 1.7.10 when running an incremental build on a multi-module Android project? Gradle profiler shows 2-10% slowdown on our project depending on which module incremental changes are applied to.
    t
    a
    a
    • 4
    • 15
Powered by Linen
Title
s

Sergey Chelombitko

10/13/2022, 11:01 AM
Has anyone noticed a performance regression between 1.7.20 and 1.7.10 when running an incremental build on a multi-module Android project? Gradle profiler shows 2-10% slowdown on our project depending on which module incremental changes are applied to.
t

tapchicoma

10/13/2022, 11:03 AM
execution or configuration time regression? With new IC or old one?
and are you using Kotlin android extensions?
s

Sergey Chelombitko

10/13/2022, 11:06 AM
Execution time measured as duration of bundleDebug. IC - default. We are using Parcelize plugin and kapt. Not using Android extensions plugin
t

tapchicoma

10/13/2022, 11:07 AM
could you try new IC? should be pretty stable in 1.7.20
btw what change causing the biggest slowdown - api or non-api one?
another thing you could do - is enable Kotlin build reports and then compare where IC execution time has raised
s

Sergey Chelombitko

10/13/2022, 11:31 AM
thanks, I'll try the new IC
a

Alexander.Likhachev

10/13/2022, 12:26 PM
You can also get information about build reports mentioned by Yahor from this blogpost: https://blog.jetbrains.com/kotlin/2022/06/introducing-kotlin-build-reports/
s

Sergey Chelombitko

10/13/2022, 3:34 PM
@tapchicoma here are some metrics after ABI change in a deep module Kotlin 1.7.10 + old IC:
Time metrics:
  Total Gradle task time: 94.63 s
  Task action: 18.65 s
    Backup output: 9.96 s
    Connect to Kotlin daemon: 3.78 s
    Clear jar cache: 0.11 s
    Calculate output size: 0.52 s
    Run compilation: 6.91 s
      Incremental compilation in daemon: 1.79 s
        Store build info: 0.07 s
        Calculate initial dirty sources set: 0.83 s
          Analyze dependency changes: 0.61 s
            Find history files: 0.06 s
            Analyze history files: 0.02 s
          Analyze Java file changes: 0.00 s
          Analyze Android layouts: 0.00 s
          Detect removed classes: 0.01 s
        Update caches: 0.00 s
        Sources compilation round: 0.14 s
        Write history file: 0.08 s
  Compiler initialization time: 0.02 s
  Compiler code analysis: 0.10 s
  Compiler code generation: 0.01 s

Size metrics:
  Total size of the cache directory: 254.8 MB
    ABI snapshot size: 33.3 KB
  Total compiler iteration: 1
1.7.20 + new IC:
Time metrics:
  Total Gradle task time: 126.89 s
  Task action: 20.82 s
    Backup output: 10.53 s
    Connect to Kotlin daemon: 4.00 s
    Clear jar cache: 0.15 s
    Calculate output size: 0.46 s
    Run compilation: 16.67 s
      Incremental compilation in daemon: 10.76 s
        Store build info: 0.12 s
        Calculate initial dirty sources set: 8.24 s
          Compute classpath changes: 8.21 s
            Load current classpath snapshot: 0.94 s
              Remove duplicate classes: 0.87 s
            Shrink current classpath snapshot: 6.29 s
              Get lookup symbols: 0.51 s
              Find referenced classes: 2.11 s
              Find transitively referenced classes: 3.66 s
            Load shrunk previous classpath snapshot: 0.69 s
            Compute changed and impacted set: 0.29 s
              Compute class changes: 0.25 s
                Compute Kotlin class changes: 0.24 s
                Compute Java class changes: 0.00 s
              Compute impacted set: 0.02 s
          Analyze Java file changes: 0.00 s
          Analyze Android layouts: 0.00 s
          Detect removed classes: 0.01 s
        Update caches: 0.02 s
        Sources compilation round: 0.62 s
        Write history file: 0.08 s
        Shrink and save current classpath snapshot after compilation: 0.90 s
          Save shrunk current classpath snapshot: 0.74 s
  Compiler initialization time: 0.21 s
  Compiler code analysis: 0.36 s
  Compiler code generation: 0.03 s
  Classpath entry snapshot transform: 0.02 s
    Load classes: 0.00 s
    Snapshot classes: 0.02 s
      Read basic information about classes: 0.00 s
      Find inaccessible classes: 0.00 s
      Snapshot Kotlin classes: 0.01 s
      Snapshot Java classes: 0.00 s
    Save classpath entry snapshot: 0.00 s

Size metrics:
  Total size of the cache directory: 331.0 MB
    ABI snapshot size: 33.3 KB
  Total compiler iteration: 3
  Number of times 'ClasspathEntrySnapshotTransform' ran: 1
    Size of jar classpath entry: 1.7 MB
    Size of jar classpath entry's snapshot: 539.7 KB
  Number of times classpath changes are computed: 335
  Number of times classpath snapshot is shrunk and saved after compilation: 336
    Number of classpath entries: 28089
    Size of classpath snapshot: 4.8 GB
    Size of shrunk classpath snapshot: 202.4 MB
  Number of times classpath snapshot is loaded: 335
    Number of cache hits when loading classpath entry snapshots: 28027
    Number of cache misses when loading classpath entry snapshots: 1
1.7.20 + old IC:
Time metrics:
  Total Gradle task time: 134.97 s
  Task action: 21.14 s
    Backup output: 10.77 s
    Connect to Kotlin daemon: 4.47 s
    Clear jar cache: 0.12 s
    Calculate output size: 0.44 s
    Run compilation: 6.73 s
      Incremental compilation in daemon: 1.62 s
        Store build info: 0.09 s
        Calculate initial dirty sources set: 0.76 s
          Analyze dependency changes: 0.57 s
            Find history files: 0.06 s
            Analyze history files: 0.02 s
          Analyze Java file changes: 0.00 s
          Analyze Android layouts: 0.00 s
          Detect removed classes: 0.01 s
        Update caches: 0.00 s
        Sources compilation round: 0.13 s
        Write history file: 0.08 s
  Compiler initialization time: 0.02 s
  Compiler code analysis: 0.08 s
  Compiler code generation: 0.02 s

Size metrics:
  Total size of the cache directory: 255.1 MB
    ABI snapshot size: 27.6 KB
  Total compiler iteration: 1
t

tapchicoma

10/13/2022, 3:44 PM
btw which Gradle version are you using?
s

Sergey Chelombitko

10/13/2022, 3:44 PM
Gradle 7.5.1
FWIW configuration time remains the same as configuration cache is enabled.
a

Andrey Uskov [JB]

10/13/2022, 6:58 PM
Could you please collect build report with disabled parallel mode and 1 worker?
Is it also possible to share with us build scan?
View count: 17