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

    N Murali

    09/17/2026, 8:58 AM
    Hi
    👋 3
  • n

    N Murali

    09/17/2026, 9:00 AM
    I am getting this below error always in Android Studio while Synching the Project with Gradle Files. Any help from anyone please? FAILURE: Build failed with an exception. * What went wrong: Process 'command 'node'' finished with non-zero exit value 1 * Try:
    Run with --info or --debug option to get more log output.
    Get more help at help.gradle.org.
    CONFIGURE FAILED in 38s
    v
    l
    • 3
    • 4
  • r

    roger.lee

    09/19/2026, 10:27 AM
    Ran 'gradle update/upgrade' and tried to upgrade to 9.7.1_1 on macOS Golden Gate 27.0 (26A428) to: ==> Would upgrade 3 outdated packages gradle 9.7.1 -> 9.7.1_1 (157.4MB) When I run: Gradle to build my EAR I get: Downloading services.gradle.org/distributions/gradle-9.7.1_1-bin.zip Exception in thread "main" java.io.FileNotFoundException: downloads.gradle.org/distributions/gradle-9.7.1_1-bin.zip at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1727) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1311) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:223) at org.gradle.wrapper.Install.forceFetch(SourceFile:2) at org.gradle.wrapper.Install$1.call(SourceFile:8) at org.gradle.wrapper.GradleWrapperMain.main(SourceFile:67) Downloading services.gradle.org/distributions/gradle-9.7.1_1-bin.zip Exception in thread "main" java.io.FileNotFoundException: downloads.gradle.org/distributions/gradle-9.7.1_1-bin.zip at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1727) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1311) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:223) at org.gradle.wrapper.Install.forceFetch(SourceFile:2) at org.gradle.wrapper.Install$1.call(SourceFile:8) at org.gradle.wrapper.GradleWrapperMain.main(SourceFile:67) Downloading services.gradle.org/distributions/gradle-9.7.1_1-bin.zip Exception in thread "main" java.io.FileNotFoundException: downloads.gradle.org/distributions/gradle-9.7.1_1-bin.zip at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1727) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1311) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:223) at org.gradle.wrapper.Install.forceFetch(SourceFile:2) at org.gradle.wrapper.Install$1.call(SourceFile:8) at org.gradle.wrapper.GradleWrapperMain.main(SourceFile:67)
    y
    t
    l
    • 4
    • 13
  • y

    ysb33r

    09/21/2026, 3:53 PM
    Does anyone have practical examples for using
    addLater
    or
    addAllLater
    on a domain collection especially on a named collection?
    p
    v
    • 3
    • 15
  • y

    ysb33r

    09/21/2026, 5:05 PM
    @Vampire W.r.t. https://gradle-community.slack.com/archives/CAHSN3LDN/p1790009935682299?thread_ts=1790005987.739679&cid=CAHSN3LDN I am pulling this into a separate conversation: I have noticed in the later Gradle 9 versions that if you have some task class that is statically compiled Groovy 3.x (plugin built under Gradle 8.x) and it uses a
    onlyIf {}
    within that class, it fails when configuration cache is active. I have not spent enough time investigating it, but the couple of times I saw it was enough to irritate me
    v
    • 2
    • 4
  • a

    Adam

    09/24/2026, 9:45 AM
    I'm working on improving the UX of https://github.com/adamko-dev/dev-publish-plugin, a helper plugin for testing modules via publishing (without Maven Local, and build-cache friendly). It publishes to a local directory using a regular maven-publish repo, but adds addition up-to-date checks. One rough edge: if a project enables signing unconditionally (i.e. without something like
    signing.setRequired { <project has tasks that publish to Maven Central> }
    ), then dev-publish also triggers signing, which fails on machines/CI without signing keys. Afaict it's not possible to disable signing per repository. The fix I'm looking at is skipping signing when only dev-publish tasks are in the task graph then disable the sign tasks (e.g. via
    Sign.onlyIf {}
    ). But I'm not sure whether this should be a default opt-out behaviour, or an opt-in behaviour. Should dev-publish... 1. Automatically disable signing when only dev-publish tasks are requested? 2. Or just detect that signing is enabled but not configured, and warn/fail with a hint like "conditionally disable signing for local testing"?
    y
    • 2
    • 2
  • a

    Adam

    09/24/2026, 9:51 AM
    Another thing: I want to use the Problems API to add a warning, but it doesn't log any message to console. This means when signing fails for dev-publish users basically only see the 'signatory not configured' failure, and it's hard to discover the softer warning which would help. Why aren't Problems API warnings printed to the console? Is there a way to make them move visible? Or should dev-publish use error-level warnings instead? Or dev-publish should log warnings to the console and via Problems API?
    v
    • 2
    • 6
  • m

    Martin

    09/24/2026, 1:19 PM
    Can I react to a configuration being registered ? (Not configured)
    v
    e
    t
    • 4
    • 14
  • r

    Robert Elliot

    09/29/2026, 6:08 PM
    I was a bit surprised to find myself writing this... is it because it's a dreadful idea?
    Copy code
    fun Test.envVarInput(envVar: String) {
      val value = providers.environmentVariable(envVar)
      inputs.property(envVar, value).optional(true)
      doFirst {
        val dbTypeResolved = value.orNull
        if (dbTypeResolved != null) {
          environment(envVar, dbTypeResolved)
        } else {
          environment.remove(envVar)
        }
      }
    }
    
    tasks.test {
      envVarInput("ENV_VAR_READ_BY_TESTS")
    }
    p
    • 2
    • 4
  • r

    Robert Elliot

    09/30/2026, 8:33 AM
    Just before I make an arse of myself by raising an IntellJ issue... IntelliJ is raising a warning "Dependency is declared multiple times" for this:
    Copy code
    dependencies {
      runtimeOnly(libs.jersey.media.sse)
      testImplementation(libs.jersey.media.sse)
    }
    I think that's a bug and this declaration is correct - the lib is a compile time dependency for test but only a runtime dependency for main.
    v
    • 2
    • 10
  • t

    tony

    09/30/2026, 9:09 PM
    I'm trying to implement an
    AttributeDisambiguationRule
    . I'm getting an illegal argument exception:
    Copy code
    Unable to determine constructor argument #1: missing parameter of type ObjectFactory, or no service of type ObjectFactory.
    (note in case anyone wonders: this is the
    org.gradle.api.model.ObjectFactory
    ) Here's a simplified version that includes just the relevant details:
    Copy code
    // plugin class
    attribute(BuildTypeAttr.ATTRIBUTE).run {
      disambiguationRules.add(AndroidBuildTypeDisambiguationRule::class.java)
    }
    
    // separate class
    abstract class AndroidBuildTypeDisambiguationRule @Inject constructor(
      private val objects: ObjectFactory,
    ) : AttributeDisambiguationRule<BuildTypeAttr> {
      override fun execute(details: MultipleCandidatesDetails<BuildTy
        val release = objects.named(BuildTypeAttr::class.java, "release")
      }
    }
    When I run this, it fails with:
    Copy code
    1: Task failed with an exception.
    -----------
    * What went wrong:
    Execution failed for task ':platform:generateMetadataFileForPlatformPublication' (registered by plugin 'org.gradle.maven-publish').
    > Could not resolve project ':producer-android'.
       > Could not select value from candidates [debug, release] using AndroidBuildTypeDisambiguationRule.
          > Could not create an instance of type com.autonomousapps.platformbuilder.internal.utils.attributes.AndroidBuildTypeDisambiguationRule.
             > Unable to determine constructor argument #1: missing parameter of type ObjectFactory, or no service of type ObjectFactory.
    My code looks like an exact replicate of the example in the Gradle docs here. What am I doing wrong?
    ❓ 1
  • t

    tony

    10/03/2026, 8:55 PM
    I'm trying to refactor my plugin to use
    configurations.named()
    instead of
    configurations.getByName()
    , and ran into an issue that ultimately looks like this:
    Copy code
    - Task `:lib:findNativeLibsDebug` of type `com.autonomousapps.tasks.FindNativeLibsTask`: cannot serialize object of type 'org.gradle.api.internal.artifacts.result.DefaultResolvedArtifactResult', a subtype of 'org.gradle.api.artifacts.result.ArtifactResult', as these are not supported with the configuration cache.
      See <https://docs.gradle.org/8.11.1/userguide/configuration_cache.html#config_cache:requirements:disallowed_types>
    I experimented and I no longer get that issue from Gradle 9.5.0. I'm looking at the release notes for that release, and there's nothing obviously related to this issue. The nearest thing I can see is https://github.com/gradle/gradle/issues/35318. What am I missing? Is my code only working in newer releases by accident? I think this is from this in my task:
    Copy code
    @get:Internal
    public abstract val androidJni: SetProperty<ResolvedArtifactResult>
    
    @Optional // Only available on Android
    @PathSensitive(PathSensitivity.RELATIVE)
    @InputFiles
    public fun getAndroidJniFiles(): Provider<List<File>>? {
      if (!androidJni.isPresent) return null
      return androidJni.map { artifactResults -> artifactResults.map { it.file } }
    }
    
    @Input
    public fun getAndroidJniIdentifiers(): Provider<List<String>> = androidJni.identifiers()
    ✅ 1
    p
    m
    • 3
    • 14
  • b

    Brice Dutheil

    10/12/2026, 2:31 PM
    I just stumbled on
    TaskDependency
    this looks like a useful mechanism to provide tasks that can only be generated very late (with generated names). In particular I found it instrumental to avoid
    afterEvaluate
    . However the javadoc is a tad misleading as it applies not only to
    dependsOn
    .
    p
    • 2
    • 6
  • c

    calebb2048

    10/12/2026, 3:53 PM
    My project structure: • :common ◦ compiles against ASM ◦ ensures both the runtime and compiler plugin are emitting/decoding the same insns the same way • :runtime ◦ dependsOn(:common) ◦ ASM location:
    org.objectweb.asm
    • :compiler-plugin ◦ dependsOn(:common) ◦ ASM location:
    <http://org.jetbrains.org|org.jetbrains.org>.objectweb.asm
    How do I make
    :compiler-plugin
    compile against a version of my
    :common
    project with every ASM reference relocated to the new location? I've tried an artifact transform, but I can't even tell if it's being executed. I know this is brittle, but it's ASM; the API is literally never going to change.
    t
    v
    • 3
    • 28
  • p

    Philip W

    10/14/2026, 6:25 AM
    Why do I get this error message when the task itself is UP-TO-DATE?
    Copy code
    Calculating task graph as configuration cache cannot be reused because an input to task ':build-logic:jar' has changed.
    > Task :build-logic:checkKotlinGradlePluginConfigurationErrors SKIPPED
    > Task :build-logic:compileKotlin UP-TO-DATE
    > Task :build-logic:compileJava NO-SOURCE
    > Task :build-logic:pluginDescriptors UP-TO-DATE
    > Task :build-logic:processResources UP-TO-DATE
    > Task :build-logic:classes UP-TO-DATE
    > Task :build-logic:jar UP-TO-DATE
    v
    • 2
    • 9
  • b

    Brice Dutheil

    10/14/2026, 12:25 PM
    Is there a reason why configuration cache it not enabled during IDE sync ? docs.gradle.org/current/…/performance.html#…
    v
    • 2
    • 3
  • g

    Gionata Legrottaglie

    10/16/2026, 3:59 PM
    Hi, my account on discuss.gradle.org legrottaglie.gionata was automatically put on hold after I posted about Gradle Task Debugger, an open-source Eclipse plugin that lets you debug Gradle tasks from Buildship. A user has since asked me a question there that I can’t answer. Could a moderator review it? Thanks!
    v
    l
    • 3
    • 2
  • b

    Brice Dutheil

    10/17/2026, 10:38 AM
    Hi there, How are you handling test "matrixes" ? Currently I have seen and practiced different approaches, which are not mutually exclusive. 1. Using properties to modify something, one need to pass the
    -Pxxx
    to the cli, this is quite flexible, this is ok for CI pipelines, workflows, but it's discoverability is not great locally. And clearly don't handle well the idea of running a matrix. 2. Using tasks, (eventually with an aggregating task) it requires to registering each task (this can always be done programmatically, e.g. via plugin) 3. Using test suites, which also leads to test tasks. The challenge is balancing discoverability, local execution speed (because some runs might be too long for feedback loop), local availability of the required dependencies (some can be only available in CI env), ability to run/exclude a single "matrix config" locally. Things I've had to deal with in regard of matrix, different dependency versions, different toolchain, different "properties" that could affect the exercised code (e.g. via a file on disk, a system property, jvm arg etc.)
    t
    v
    j
    • 4
    • 12
  • v

    Vlastimil Brecka

    10/18/2026, 12:30 AM
    Is there a way to lint build files? Say to ban "inline" 3rd party dependency declarations, to force to use the version catalogue?
    t
    v
    +3
    • 6
    • 80
  • v

    Vlastimil Brecka

    10/19/2026, 11:46 PM
    What is IP-safe way of “apply this plugin everywhere”? like root, settings, i.e. every .gradle file
    e
    v
    j
    • 4
    • 9
  • s

    Sergej Koščejev

    10/20/2026, 5:40 PM
    How do I make Gradle repository credentials inaccessible to agents? E.g. one agent ran
    gradlew properties
    and the credentials got into the tool output.
    👀 1
    v
    t
    v
    • 4
    • 12
  • v

    Vlastimil Brecka

    10/20/2026, 7:06 PM
    I wanna report So I managed to get
    isolated projects
    working in a 550 project build - and config time droped to 4-6 seconds (from around 10-14). So -+ 50%, which is in line with this one blog post I read which I cannot remember where 😄 Nice
    🎉 2
    👌 1
    party gradlephant 3
    v
    • 2
    • 1
  • v

    Vlastimil Brecka

    10/20/2026, 11:28 PM
    Does anyone know why, when I rerun (100% up-to-date cache hits) an assemble task via cli, I get "BUILD SUCCESSFUL in 1s" and when I run the same command via intellij run config "BUILD SUCCESSFUL in 4s"? i.e. way slower for same operation - what is the IDE doing extra? Is it maybe the console output writing? Thats the only difference I see (default vs --console=plain)
    v
    j
    +2
    • 5
    • 6
  • p

    Philip W

    10/22/2026, 8:36 AM
    How can I append a Provider<String> to a Property<String> (update the value)?
    Copy code
    val foo: Property<String> = objects.property()
    foo.set("foo")
    val toAdd: Provider<String> = provider { "toAdd" }
    foo.set(foo.zip(toAdd) { foo, toAdd -> foo + toAdd })
    println(foo.get()) // I want to get "fooToAdd"
    v
    a
    • 3
    • 11
  • j

    James

    10/29/2026, 9:16 PM
    Im trying to do this mod for minecraft fabric 1.21.1 and when i was following a video and did everything i was told to do i got to a step and when i ran a command that is like ./gradlew genSources it failed and its saying the reason for the fail is org/gradle/api/BuildableComponentSpec im asking for some help to see if there could be an easy fix for it
    v
    • 2
    • 1
  • a

    Adam

    11/04/2026, 6:55 PM
    https://www.linen.dev/s/gradle-community is still broken. When I search for something and click a message it takes me to
    <https://s/gradle-community/t/496000/hey-people-who-split-their-modules-into-api-and-implementati>
    .
    v
    • 2
    • 1
  • p

    Philip W

    11/06/2026, 8:13 AM
    Regarding a BuildService: Can I use a WorkerExecutor with runBlocking in the constructor of the BuildService: https://docs.gradle.org/current/userguide/build_services.html#sec:implementing_a_build_service does not show how exactly you start the server…
    a
    e
    v
    • 4
    • 9
  • i

    Ivan CLOVIS Canet

    11/08/2026, 10:48 AM
    I’m seeing this error in CI. Anyone knows what it could be caused by?
    Copy code
    Fetching distribution.
    Downloading <https://services.gradle.org/distributions/gradle-9.8.0-bin.zip>
    Attempt 1/1 failed. Reason: Server returned HTTP response code: 504 for URL: <https://services.gradle.org/distributions/gradle-9.8.0-bin.zip>
    Exception in thread "main" java.io.IOException: Server returned HTTP response code: 504 for URL: <https://services.gradle.org/distributions/gradle-9.8.0-bin.zip>
    	at org.gradle.wrapper.Download.download(SourceFile:1)
    	at org.gradle.wrapper.Install.forceFetch(SourceFile)
    	at org.gradle.wrapper.Install.lambda$createDist$0(SourceFile:9)
    	at org.gradle.wrapper.Install.createDist(SourceFile:24)
    	at org.gradle.wrapper.GradleWrapperMain.lambda$prepareWrapper$0(SourceFile:2)
    	at org.gradle.wrapper.GradleWrapperMain.main(SourceFile:2)
    e
    v
    l
    • 4
    • 5
  • v

    Vlastimil Brecka

    11/08/2026, 5:18 PM
    Btw there are checksums missing/entry for 9.9.0 on the releases page
    v
    • 2
    • 2
  • a

    Andres Almiray

    11/09/2026, 10:58 PM
    Is there a way to specify a different version of Groovy to be used during compilation of Groovy source code, similarly as it’s done with Java via Toolchains (auto provisioning), or is it just enough to define a Groovy version in
    compileOnly
    scope? My use is running a Gradle 8.14 build (I know it’s old) targeting Java 25 and a compatible version of Groovy (likely 5). The build itself runs on Java 21. Switching to Gradle 9 is not possible at the moment.
    v
    t
    • 3
    • 3