https://gradle.com/ logo
Join Slack
Powered by
# community-support
  • b

    Bernhard Posselt

    07/08/2026, 9:38 AM
    How do I include a convention plugin from build-logic/src/main/kotlin/my-conventions.kts ? Using
    Copy code
    id("build-logic.my-conventions")
    throws * Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'build-logic.my-conventions'] was not found in any of the following sources:
    ✅ 1
    v
    • 2
    • 11
  • b

    Bernhard Posselt

    07/08/2026, 10:45 AM
    when pulling out a library that can be released on its own to a maven repo (e.g. a REST API client) would that be a composite build or a module?
    ✅ 1
    v
    • 2
    • 1
  • b

    Brice Dutheil

    07/08/2026, 2:15 PM
    I just discovered that archive
    AbstractCopyTask
    , disable output caching if you call some methods,
    fileMatching
    for example. I would think it has to do with the action serializibility. github.com/gradle/gradle/commit/510d032ec36b…#…
    v
    e
    • 3
    • 11
  • b

    Bernhard Posselt

    07/09/2026, 7:27 AM
    project layout wise: I want multiple composite builds in a directory that build separate projects, but I'd like a single gradle wrapper and libs.versions.toml do I just move the wrapper up from the composite builds into the parent directory and do I want some kind of settings.gradle.kts in the parent directory?
    ✅ 1
    v
    t
    • 3
    • 16
  • b

    Bernhard Posselt

    07/09/2026, 11:30 AM
    let's say you have a couple common test utils in a separate composite build: where do these go? into the main/ or test/ folder? because it looks like everything in test is not exported If they go into main/ then I'd also need to depend on junit via implementation Edit: found the solution: java-test-fixtures plugin
    ✅ 1
    v
    • 2
    • 1
  • e

    Eug

    07/09/2026, 11:44 AM
    I wonder how many of you put
    -q
    for your CI jobs already? I see huge but it looks like I'm not interested in. I have other tools to monitor times and cacheability. If something fails - it is still printed in log.
    v
    b
    • 3
    • 15
  • b

    Bernhard Posselt

    07/09/2026, 12:30 PM
    I'm trying out the new JvmTestSuite plugin but can't get junit tags to work
    Copy code
    testing {
        suites {
            val test = named<JvmTestSuite>("test") {
                useJUnitJupiter()
            }
            register<JvmTestSuite>("integration") {
                dependencies {
                    implementation(project())
                }
                targets {
                    all {
                        testTask.configure {
                            useJUnitPlatform {
                                includeTags("integration")
                            }
                            shouldRunAfter(test)
                        }
                    }
                }
            }
        }
    }
    Copy code
    import org.junit.jupiter.api.Assertions.*
    import org.junit.jupiter.api.Tag
    import org.junit.jupiter.api.Test
    @Tag("integration")
    class ProductControllerTest {
        @Test
        fun name() {
            assertEquals(1, 21)
        }
    }
    there are also no examples on how to configure junit. ./gradlew test executes the failing test, ./gradlew integration doesn't
    ✅ 1
    v
    • 2
    • 29
  • v

    Vlastimil Brecka

    07/10/2026, 5:21 PM
    About build cache on CI. When used with gitlab i need to set a cache key. Anybody have recommendations on how to manage this? From what I understand, is that whole thing is zipped up and uploaded into storage under the key. Which leads me to believe there is going to be cache clobbering if there are parallel feature branches triggering CI (obvious) Anybody got opinions on how to manage this? Maybe only let main branch upload the cache and features only consume?
    t
    • 2
    • 197
  • v

    Vlastimil Brecka

    07/11/2026, 11:15 AM
    I have my
    checkDebug
    lifecycle task In root build.gradle I define
    Copy code
    def checkDebug = tasks.register("checkDebug") {
        group = "verification"
    }
    
    subprojects { subproject ->
        subproject.pluginManager.withPlugin("com.android.library") {
            tasks.named("checkDebug") {
                dependsOn("${subproject.path}:lintDebug")
                dependsOn("${subproject.path}:testDebugUnitTest")
            }
        }
    }
    How would I push this into convention plugin? Convention plugin is applied to each project, but there is no central place, so where do I register
    checkDebug
    once? Or is that not the way? If I register it in every project, it will be availabel to the CLI, but I wont be able to depend on it, so I cannot have my
    buildAll
    etc, which kills further composing, which is dumb What the idiomatic way of doing this with convention plugins?
    v
    e
    • 3
    • 32
  • v

    Vlastimil Brecka

    07/11/2026, 2:49 PM
    Is there really 0 ways of expressing "task which checks everything everywhere and assembles app A" as a explicit task? i.e the equivalent of
    ./gradlew check :appA:assemble
    but as a explicit
    buildAppA
    task? I really hate pushing complexity/impl details into cli / ci configs. It does not scale. Its what tasks are for
    v
    l
    • 3
    • 44
  • m

    me1136

    07/12/2026, 2:58 AM
    What's the intended way of depending on sourceSets across projects? I've got an
    api
    sourceSet in project-a, and then another
    api
    sourceSet in project-b, and i need to have project-b's
    api
    sourceSet depend on/pull in project-a's
    api
    sourceSet
    v
    • 2
    • 2
  • v

    Vlastimil Brecka

    07/12/2026, 10:11 PM
    Copy code
    /gradlew :appA:decryptSecretsData -Pkey=$APPA_SECRETS_KEY
    ./gradlew :appB:decryptSecretsData -Pkey=$APPB_SECRETS_KEY
    currently on CI I need to decrypt secrets per app (its a convention plugin applied to each app), and I'm doing it this way, and it works however I'd like to have it be a single invocation
    ./gradlew :appA:decryptSecretsData -Pkey=$APPA_SECRETS_KEY :appB:decryptSecretsData -Pkey=$APPB_SECRETS_KEY
    and this obviously doesnt work as the second
    -Pkey
    overwrites the first bla bla can I somehow scope the
    -Pkey
    to a task?
    nod no 1
    e
    p
    v
    • 4
    • 9
  • m

    Miguel Oliveira

    07/13/2026, 4:23 PM
    Is there a recommended approach to share repositories declarations between a multi module project and the included build-logic project? Both for plugins and dependencies. Currently I'm duplicating them in both
    settings.gradle.kts
    v
    t
    +2
    • 5
    • 7
  • l

    Laura Kassovic

    07/13/2026, 6:46 PM
    added an integration to this channel: linen.dev
  • b

    Bernhard Posselt

    07/15/2026, 10:14 AM
    I've got a composite build with a convention plugin; how do I reference files from that build? when using the project layout, it points to the project including the convention plugin
    v
    • 2
    • 11
  • b

    Bernhard Posselt

    07/16/2026, 8:00 AM
    how do I use version catalogs in convention plugins? looks like the libs object is not available
    ✅ 1
    t
    n
    p
    • 4
    • 4
  • i

    IT Admin

    07/16/2026, 4:57 PM
    added an integration to this channel: linen.dev
  • t

    tony

    07/16/2026, 5:14 PM
    let's say I have a
    Test
    task named
    "testFoo"
    . For Reasons, I want to register a lifecycle task (not a
    Test
    task), named simply
    "test"
    , which will have a
    dependsOn
    relationship with the original
    "testFoo"
    . Is there any way to propagate command-line options to the underlying "real" task? E.g., a test filter
    --tests="*.foo.*"
    ?
    🦆 1
    • 1
    • 1
  • v

    Vlastimil Brecka

    07/18/2026, 10:29 AM
    Can I somehow enforce that convention plugin with defaults is applied everywhere? (Other than
    subprojects
    block)
    p
    • 2
    • 4
  • h

    hackm1160

    07/18/2026, 11:49 AM
    FAILURE: Build failed with an exception. * What went wrong: Execution failed for task 'firebase authcheckDebugAarMetadata'.
    A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
    > 16 issues were found when checking AAR metadata: 1. Dependency ':firebase_core' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 2. Dependency 'androidx.activityactivity1.8.1' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 3. Dependency 'androidx.lifecyclelifecycle livedata core ktx2.7.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 4. Dependency 'androidx.lifecyclelifecycle livedata2.7.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 5. Dependency 'androidx.lifecyclelifecycle viewmodel2.7.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 6. Dependency 'androidx.lifecyclelifecycle livedata core2.7.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 7. Dependency 'androidx.lifecyclelifecycle viewmodel savedstate2.7.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 8. Dependency 'androidx.windowwindow java1.2.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 9. Dependency 'androidx.window🪟1.2.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 10. Dependency 'androidx.fragmentfragment1.7.1' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 11. Dependency 'androidx.corecore ktx1.13.1' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 12. Dependency 'androidx.corecore1.13.1' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 13. Dependency 'androidx.lifecyclelifecycle runtime2.7.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 14. Dependency 'androidx.lifecyclelifecycle process2.7.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 15. Dependency 'androidx.exifinterfaceexifinterface1.4.1' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). 16. Dependency 'androidx.annotationannotation experimental1.4.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :firebase_auth is currently compiled against android-33. Recommended action: Update this project to use a newer compileSdk of at least 34, for example 36. Note that updating a library or application's compileSdk (which allows newer APIs to be used) can be done separately from updating targetSdk (which opts the app in to new runtime behavior) and minSdk (which determines which devices the app can be installed on). * Try:
    Run with --stacktrace option to get the stack trace.
    Run with --info or --debug option to get more log output.
    Run with --scan to generate a Build Scan (Powered by Develocity).
    Get more help at help.gradle.org.
    i need help
    🧵 1
    p
    v
    • 3
    • 2
  • h

    hackm1160

    07/18/2026, 11:52 AM
    Gradle server exited unexpectedly with code 1. Last output: Unrecognized option: --add-opens=java.base/java.util=ALL-UNNAMED | Error: Could not create the Java Virtual Machine. | Error: A fatal exception has occurred. Program will exit. Run 'Developer: Reload Window' if Gradle stops working.
    v
    • 2
    • 2
  • c

    Colton Idle

    07/20/2026, 1:56 PM
    I'm continuing my forray into making my companies gradle build faster. Right now the configuration phase seems to be the most problematic. We have a fairly simple app in my opinion but the complexity comes into play (i think) from the fact that we have a buildSrc to make convention plugins so that each module added to our app gets all of the typical dependencies and configuration (its an android app). it kills me when i make a change and then see gradle configuring for like 12 seconds on such a simple app. Recently ive been trying to resolve this by giving claude a goal to keep iterating until it finds a meaningful improvement. I initially thought going from buildSrc to build-logic would do the trick but it ended up with worse perf. Seemingly the only change that meaningfully improved things was converiting to a binary kotlin plugin away from *.gradle.kts. After all of this experimentation, im sitll left sorta banging my head against a wall with the question of "if i have two android library modules in my app, what's the BEST way to share a standard configuration (api level, etc) and set of dependencies between them?" I know a lot of answers in software are "it depends" but surely theres like a 99th percentile answer that would be the go-to way for each app, right?
    j
    v
    • 3
    • 41
  • e

    Eug

    07/20/2026, 2:08 PM
    Am I right that version catalogue bundle doesn't provide the configuration. The use case - I have one open source library and there is lint rules for it but from a different person/organisation. So far I need to define two dependencies - testImplementation and lintCheck. And if I want to avoid it the only way would be a convention plugin.
    p
    v
    • 3
    • 11
  • v

    Vlastimil Brecka

    07/22/2026, 9:38 PM
    Copy code
    ./gradlew :app:decryptSecrets --key=...
    ./gradlew :app:assembleRelease
    Currently I have a task which decrypts secrets, and then assemble task has a provider which reads the properties (once decrypted) and uses them to sign release build (android)
    Copy code
    def signingProperties = providers.fileContents(layout.projectDirectory.file("signing.properties")).asText
                .map {
                    def properties = new Properties()
                    properties.load(new StringReader(it))
                    properties
                }
    
    android {
        signingConfigs {
            release {
                def props = signingProperties.getOrNull()
                if (props != null) {
                    keyAlias props["keyAlias"]
                    keyPassword props["keyPassword"]
                    ...
                }
            }
        }
    }
    It works. Now, for more performance I was hoping to turn this into a single
    gradlew
    invocation =
    ./gradlew  :app:decryptSecrets --key=... :app:assembleRelease
    but im running into this kinda obvious issue of
    def props = signingProperties.getOrNull()
    getting evaluated at config time, and obviously the signing properties are not decrypted yet, so they dont exist, they become available only after
    decryptSecrets
    finishes So is this even possible? To have the properties wired somehow in only at execution time so I can run the two in one invocation? Or, is this a bad idea
    t
    • 2
    • 2
  • s

    Scott Palmer

    07/28/2026, 9:24 PM
    Not sure if this is a known issue, but I hit a problem with the build cache after changing the name of a sub-project. I had a project nested under my parent project and referenced it in the
    settings.gradle
    file like this:
    Copy code
    rootProject.name = 'my-service'
    include ':public-api'
    project(':public-api').name = 'my-service-public-api'
    but then I decided to do things differently and changed that to simply:
    Copy code
    rootProject.name = 'my-service'
    include ':public-api'
    but the build cache was confused. The
    public-api
    sub-project is generating Java code from Smithy specifications. It seems that the
    spotless
    code formatting plugin was now stuck looking at the old path for the generated code because of the build cache. Clean builds didn't help, I had to manually delete
    ~/.gradle/caches/build-cache-1
    . Is this a Gradle problem or a spotless plugin problem? (or a me problem? 🙁 )
    v
    • 2
    • 18
  • t

    tehgeek

    07/30/2026, 11:14 AM
    Hello, I created an account so I can publish plugins, but it has the wrong name and image: plugins.gradle.org/u/tehgeek I'd like to change it but I can't find where to. Could someone help me change the name and image?
    t
    • 2
    • 3
  • t

    tony

    07/30/2026, 5:44 PM
    is there any way to use the ad hoc tasks API to add a command line
    @Option
    to a task? My use-case is in an Android project. It has tasks like
    testDebugUnitTest
    and
    testReleaseUnitTest
    , as well as a lifecycle task
    test
    that depends on each of those two variant-specific Test tasks. I would love to add a
    --tests
    option to this preexisting (from another plugin, I do not control it)
    test
    lifecycle task. I've tried this, but it doesn't work:
    Copy code
    project.tasks.named { it == "test" }.configureEach {
      inputs
        .property("tests", "") // passing no value as a test
        .optional(true)
    }
    I still get
    > Unknown command-line option '--tests'.
    e
    b
    • 3
    • 9
  • s

    Simon Marquis

    08/04/2026, 3:57 PM
    👋 Hi, is there a way to find the build that uploaded the Build Cache entry containing this metadata values ?
    Copy code
    buildCacheKey=b4c52b0ffac21f5823d8cb885f76413b
    buildInvocationId=bueeaav7o5fazlizc4e6fajtwa
    We are currently observing build entries being overwritten with empty content (only the METADATA file and 3 empty directories):
    Copy code
    cache-entry-b4c52b0ffac21f5823d8cb885f76413b
    ├── METADATA
    ├── tree-classpathSnapshotProperties.classpathSnapshotDir
    ├── tree-destinationDirectory
    └── tree-taskBuildCacheableOutputDirectory%24kotlin_gradle_plugin_common
    
    4 directories, 1 file
    (the
    %24
    url-encoded name of the last directly looks suspicious as well)
    v
    • 2
    • 13
  • i

    Irfan Abdi

    08/05/2026, 12:50 PM
    org.gradle.execution.TaskSelectionException: Task 'prepareKotlinBuildScriptModel' not found in project ':app'., this error is appearing again and again.
    e
    • 2
    • 2
  • j

    Jason Pearson

    08/09/2026, 3:20 AM
    How should we report spam in this community? I'm getting some unwanted solicitation here
    same 8
    a
    p
    +4
    • 7
    • 8