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

    Mohamed Abderraouf ZOUAID

    08/09/2025, 5:49 PM
    Hello, I was working with flutter perfectly, than I cloned a gitlab project on my laptop, then it required me to upgrade flutter version to 3.32.8, after the upgrad, every flutter project cant run and build and shows this error
    Copy code
    Picked up JAVA_TOOL_OPTIONS: -Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
    > Cannot query the value of this provider because it has no value available.
    
    * 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 get full insights.
    > Get more help at <https://help.gradle.org>.
    
    BUILD FAILED in 1m 25s
    Running Gradle task 'assembleDebug'...                             88.4s
    Error: Gradle task assembleDebug failed with exit code 1
    anyone can help me please?
    v
    e
    • 3
    • 4
  • e

    edward ambroce

    08/09/2025, 6:42 PM
    I'm encountering the same problem
    v
    • 2
    • 1
  • m

    Martin

    08/09/2025, 9:28 PM
    Can I silence this?
    Consider enabling configuration cache to speed up this build
    ✅ 1
    a
    m
    • 3
    • 6
  • l

    Lucas Holden

    08/10/2025, 7:16 PM
    How do you set a plugin version as "changing" in the Plugins DSL, so that Gradle re-evaluates it even if the version number hasn't increased?
    v
    • 2
    • 1
  • j

    JP Sugarbroad

    08/11/2025, 5:59 PM
    Ok, I have a stumper. I have a convention plugin. When another (specific) plugin is applied, I want to configure that plugin. But I don't want to constrain the version of that plugin, so I don't want to put it on the classpath of my convention plugin. Is that possible?
    p
    y
    +2
    • 5
    • 64
  • l

    Lucas Holden

    08/11/2025, 7:59 PM
    How do you get access to the Project instance from within an artifact transform? I need it to use information from another plugin.
    m
    v
    • 3
    • 13
  • l

    Lucas Holden

    08/12/2025, 12:27 AM
    How do you publish multiple plugins from a single project? I can declare both of them using
    gradlePlugins.create
    , but they both publish under the same group: the name of the project.
    v
    • 2
    • 2
  • r

    René

    08/12/2025, 6:43 PM
    @Jendrik Johannes Whats your current approach to work around that ignored ticket about java toolchains? https://github.com/gradle/gradle/issues/16628#issuecomment-2654688452
  • l

    Lucas Holden

    08/12/2025, 8:43 PM
    I'm trying to set up an artifact transform where one of the "to" attributes depends on an extension. The problem is, lazy-loading the attribute with
    attributeProvider
    still tries to retrieve the extension property immediately and causes the plugin to fail to apply. (Line 23 of https://paste.ofcode.org/k36CjhiWRKJQkdv2FeyMZz) Running it in
    project.afterEvaluate
    does allow the plugin to be applied, but the artifact transform is unusable due to being applied so late. Does anyone know how to make this work?
    v
    • 2
    • 6
  • j

    James Smith

    08/12/2025, 9:50 PM
    hello all
    👋 1
  • j

    James Smith

    08/12/2025, 9:51 PM
    Copy code
    FAILURE: Build failed with an exception.	
    * What went wrong:	
    org.gradle.api.InvalidUserDataException: On plugin declaration 'kotlin' expected to find any of 'id' or 'version' but found unexpected keys 'android' and 'compose'.	
    > On plugin declaration 'kotlin' expected to find any of 'id' or 'version' but found unexpected keys 'android' and 'compose'.	
    * Try:	
    > Run with --stacktrace option to get the stack trace.	
    > Run with --info or --debug option to get more log output.	
    > Get more help at <https://help.gradle.org>.	
    BUILD FAILED in 4
    From what I have in my libs.version.toml
    Copy code
    [plugins]
    android.application = { id = "com.android.application", version.ref = "agp" }
    kotlin.android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
    kotlin.compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
    Can someone explain my issue a little, please?
    m
    v
    • 3
    • 21
  • l

    Lucas Holden

    08/12/2025, 11:16 PM
    I have two configurations extending one another. How do you make sure the sub-configuration actually takes the exact same files as the super-configuration's, instead of going off and resolving completely different variants on its own?
    v
    • 2
    • 8
  • j

    James Smith

    08/12/2025, 11:37 PM
    having trouble for the first time while building my bundle with the key hash discrepancy my gradle.properties file stores the key pass and keystore pass, and when I build, it wants to escape the characters in my password... any solutions, what other info would be needed to help if so?
    v
    • 2
    • 5
  • l

    Lucas Holden

    08/13/2025, 7:42 PM
    I have a
    MapProperty<String, List<Object>>
    in my plugin extension. I need another plugin to merge items into the map instead of overwriting it like
    put
    does. I thought this would work:
    Copy code
    extMap.putAll(extMap.map { m ->
       m.keys.forEach { k ->
          m.merge(k, myValues(), { l1, l2 -> l1 + l2 })
       }
       return@map m
    })
    but instead it causes a stack overflow error due to the value depending on itself. I also can't add elements in
    Project.afterEvaluate
    because
    MapProperty#get
    returns an ImmutableMap. How do I add items to the lists in the map?
    a
    v
    • 3
    • 3
  • t

    tony

    08/15/2025, 5:53 PM
    This is a question about the java-platform plugin (or really, just about dependency constraints), and how that interacts or doesn't with variants. for Gradle projects with test fixtures (more generally: additional variants), do we need to declare the constraint multiple times?
  • b

    Behnam Banaei

    08/16/2025, 7:27 AM
    Hey everyone. We've just migrated our Android team's git repos to a monorepo with the Gradle build system at its root. It consists of 3 large apps and multiple small libraries (150k lines of code in total). The issue is that devs are getting lots of performance issues when opening the monorepo in the Android studio regarding build time and indexing (find usages, navigating in the project, ...). What have we potentially done wrong in the process of migration and what are the solutions for this type of isses?
    v
    • 2
    • 1
  • c

    Caleb Cushing

    08/16/2025, 12:58 PM
    ... what happened to the great propertization ... v9 appears to have fixed zero of my "I need this to be lazy" issues, publishing still appears to be eager, version is eager... checkstyle still compiles java (even though checkstyle itself doesn't need that)
    v
    • 2
    • 2
  • j

    Javi

    08/16/2025, 2:51 PM
    Has someone seen this crash after upgrading to Gradle v9? The full stacktrace does not point to any code I own in my convention plugins 🤔
    Copy code
    * What went wrong:
    A problem occurred configuring project ':semver-gradle-plugin'.
    > Failed to notify project evaluation listener.
       > Cannot mutate the hierarchy of configuration ':semver-gradle-plugin:apiElements' after the configuration was published as a variant. After a configuration has been observed, it should not be modified.
       > Gradle Module Metadata can't be modified after an eagerly populated publication.
    v
    • 2
    • 16
  • j

    Javi

    08/17/2025, 10:29 AM
    Hello!
    dependencyProject
    is deprecated but on the deprecation it is not shown any alternative 🤔
    v
    • 2
    • 7
  • u

    محمد اسامه البدوي

    08/17/2025, 11:52 AM
    Hello!
    Copy code
    What is the solution to this error?
    ``````
    v
    • 2
    • 1
  • m

    Mez

    08/17/2025, 10:04 PM
    Hi everyone 🤗 Our Gradle project has slowly become a mess. An actual ball of spaghetti. Projects depending on projects everywhere with deep paths from our app project to our lowest level project. I tried using a plugin such as this one Graph Assert (https://github.com/jraska/modules-graph-assert) to understand the scale of the problem (it's big) but am struggling to figure out some proper next steps. The goal would be to improve build speeds and enforce a better Gradle graph health going forward. Has anyone faced similar challenges? And would they be able to offer some concrete suggestions for how to plan our way out of this? The project is about 130 modules (Android and Kotlin with some legacy Java) at the moment and takes about 25 minutes to compile on the CI. That's before we start running tests. For example what are some useful things to measure and how? Or what is a repeatable process for refactoring that we can farm it to the entire team including junior engineers that is easy to understand and fool proof? Cheers
    e
    a
    +2
    • 5
    • 13
  • m

    Martmists

    08/18/2025, 12:18 PM
    How do I check if a task exists? I tried
    tasks.named(...).isPresent
    , but it seems tasks.named is throwing an UnknownTaskException instead?
    m
    v
    • 3
    • 24
  • m

    Martmists

    08/18/2025, 12:18 PM
    Also, with project.exec deprecated, is the recommended approach to do
    project.providers.exec { ... }.result.get()
    ?
    m
    v
    r
    • 4
    • 25
  • u

    uday nani

    08/18/2025, 2:44 PM
    Getting this error classpath inside javaexec: classpath Exception in thread "main" io.cucumber.core.gherkin.FeatureParserException:
    v
    • 2
    • 1
  • g

    Gijs Leussink

    08/19/2025, 7:58 AM
    Upgrading from 8.14.3 to 9.0.0, now my Github Actions fail, encountering:
    Copy code
    Class org.gradle.jvm.toolchain.JvmVendorSpec does not have member field 'org.gradle.jvm.toolchain.JvmVendorSpec IBM_SEMERU'
    What am I running into? In
    build.gradle
    I have declared:
    Copy code
    java {
        toolchain {
            languageVersion = JavaLanguageVersion.of(24)
            vendor = JvmVendorSpec.GRAAL_VM
        }
    }
    v
    t
    • 3
    • 4
  • m

    Martmists

    08/19/2025, 7:49 PM
    Is there a flag I can pass to gradle to tell me why a given task is not UP-TO-DATE when it should be?
    i
    • 2
    • 1
  • r

    René

    08/19/2025, 8:09 PM
    you can either use build scans or run with info logging (using -i) which usually logs why its not considered up to date. but be aware gradle logs a lot already with -i
    🧵 2
    m
    v
    • 3
    • 14
  • r

    Rajeesha R

    08/20/2025, 6:20 AM
    I am using gradle8.8 with java21.Passing an option value to custom doclet .like this options.addStringOption('outputdir','output') but when I run the task doclet is giving an error.error: invalid flag: -d 1 error Usage: javadoc [options] [packagenames] [sourcefiles] [@files] Is this a known error? the same works when I execute the doclet from terminal.
    v
    • 2
    • 3
  • p

    Philipp Nowak

    08/21/2025, 9:29 AM
    Hey guys, I recently activated Configuration Cache in my project. Everything works fine, except when executing
    ./gradlew :app:dependencies
    I receive the following exception:
    Copy code
    Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-1-thread-1"
    
    Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"
    I am using
    org.gradle.jvmargs=-Xmx10240m
    and also increasing it to 12 GB didn't help. All the other tasks just run fine, e.g. building, testing etc. - the activated configuration cache is on develop for a few days now already. Does anyone have an idea what could cause the OOM on the dependencies task and how to fix it? Deactivating the configuration cache fixes it but should not be an option here 😄
    t
    j
    v
    • 4
    • 57
  • b

    Ben Bader

    08/21/2025, 6:43 PM
    I'm seeing failing CI builds recently, and it seems that Gradle Plugin Portal is hanging up on us. Is there an active incident there right now?
    Copy code
    > Could not resolve com.google.cloud.tools:jib-gradle-plugin:3.4.5.
      Required by:
          settings file 'settings.gradle' > com.google.cloud.tools.jib:com.google.cloud.tools.jib.gradle.plugin:3.4.5
       > Could not resolve com.google.cloud.tools:jib-gradle-plugin:3.4.5.
          > Could not get resource '<https://plugins.gradle.org/m2/com/google/cloud/tools/jib-gradle-plugin/3.4.5/jib-gradle-plugin-3.4.5.pom>'.
             > Could not GET '<https://plugins-artifacts.gradle.org/com.google.cloud.tools/jib-gradle-plugin/3.4.5/760ae3b530620eea5483f15fe876fd30ac44e5dcb7eafca4d63e613ea0d80750/jib-gradle-plugin-3.4.5.pom>'.
                > Remote host terminated the handshake
    c
    • 2
    • 1