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

    Chris

    04/16/2025, 11:10 PM
    It's been a while since I last looked at this, but I'm now faced with a forced migration from Sonatype Nexus to JFrog Artifactory. The last time I looked at this the official artifactory gradle plugin was a Lovecraftian horror show of cross-project configuration and afterEvaluate logic. Does anyone know if things have got any better in the intervening years, or if there are any reasonable alternatives to the official JFrog plugin that allows us to still use the JFrog server side features (mostly the build metadata stuff).
    v
    • 2
    • 2
  • m

    melix

    04/18/2025, 9:12 AM
    So I'm facing something quite strange. The content of by file collection seems to vanish between configuration time and execution time oO. I have an interface which like this:
    Copy code
    public interface CreateLayerOptions extends LayerOptions {
        @Input
        @Optional
        ListProperty<String> getPackages();
    
        @Classpath
        @Optional
        ConfigurableFileCollection getJars();
    
        @Input
        ListProperty<String> getModules();
    }
    there is, in my code, a single call to `getJars()`:
    Copy code
    var classpath = create.getJars();
    boolean hasJars = !classpath.getFiles().isEmpty();
    The interface is implemented and added to a domain object set using:
    Copy code
    @Override
        public void createLayer(Action<? super CreateLayerOptions> spec) {
            var layer = objects.newInstance(CreateLayerOptions.class);
            var binaryName = getName();
            if (!binaryName.startsWith("lib")) {
                throw new IllegalArgumentException("Binary name for a layer must start with 'lib'");
            }
            layer.getLayerName().convention(binaryName);
            spec.execute(layer);
            layers(options -> options.add(layer));
        }
    and the user code to configure it currently has (this is all a spike, so hopefully I can make this nicer):
    Copy code
    createLayer {
                        val externalJars = configurations.nativeImageClasspath.get()
                            .incoming
                            .artifactView {
                                lenient(false)
                                componentFilter { this is ModuleComponentIdentifier }
                            }
                            .artifacts
                        modules = listOf("java.base", "jdk.unsupported", "java.sql")
                        jars.from(externalJars.resolvedArtifacts
                            .map { artifacts -> artifacts.map { it.file } }
                        )
              ...
    When I debug, I can see that after
    spec.execute(layer)
    is called,
    layer.getFrom()
    contains one element as expected. However, when my code to get this list of jars is called, the list is empty oO. I have verified and it's the same instance. Only "something" make the contents go away. The suspect is input evaluation, but I'm 🤨
    • 1
    • 1
  • i

    Ivan CLOVIS Canet

    04/20/2025, 3:36 PM
    How can I rewrite this snippet using the Kotlin DSL?
    Copy code
    test {
       onOutput { descriptor, event ->
           if (event.destination == TestOutputEvent.Destination.StdErr) {
               logger.error("Test: " + descriptor + ", error: " + event.message)
           }
       }
    }
    I'm struggling on
    onOuput
    . I guess it's something like
    Copy code
    onOutput(closureOf<???> {})
    but I don't know what the type is.
    c
    a
    • 3
    • 5
  • j

    Jonathing

    04/21/2025, 12:20 PM
    Hello again! I've been writing Gradle plugins for a few months now, but I've been relying on manually looking up JavaDocs online for anything in Gradle as IntelliJ is not downloading (or using?) the sources for the Gradle API. Is there any way I can fix that? Or do I just have to cope with using the online JavaDocs for now?
    e
    m
    +2
    • 5
    • 34
  • g

    Gábor Török

    04/21/2025, 9:11 PM
    hi, i'd like to be able to reduce boilerplate for our
    JavaExec
    tasks by presetting some properties like system properties, env properties, classpath, etc, and i am wondering what's the best way for for it would be. these values need to be different based on which environment we want to run in. i have come up with something like this:
    Copy code
    abstract class ExecInStaging : JavaExec() {
        init {
            systemProperty("appconfig", "config/staging.properties")
            systemProperty("log4j.configurationFile", "log4j2-local.xml")
    
            environment("CONSUL_HOST", STAGING_CONSUL)
    
            classpath = project.extensions
                .getByType<JavaPluginExtension>()
                .sourceSets
                .getByName("main")
                .runtimeClasspath
        }
    }
    this works - but i am wondering if there are some best practices around this that i am missing? doing all this configuration in the constructor feels a bit weird - especially since now i am getting a bunch of IDE warnings due to
    Calling non-final function {} in constructor
    ... is there a better way to do this?
    p
    v
    t
    • 4
    • 4
  • p

    Philip W

    04/22/2025, 8:50 AM
    How can you get the parent directory of a RegularFile as a Directory? Compared to Directory, RegularFile can do "nothing" except calling getAsFile.
    v
    j
    • 3
    • 4
  • c

    Chris

    04/22/2025, 12:45 PM
    Can anyone think of a clever mechanism by which I can retrieve the maven snapshot version (timestamp & build number) of an artifact that was published by the build?
    v
    • 2
    • 5
  • a

    Adam

    04/22/2025, 5:53 PM
    I have a Kotlin/JVM application. I want to pass a lazily system property in using CommandLineArgumentProvider. But for some reason the property doesn't get set correctly and it's not accessible in the application. Properties set using
    systemProperty("...", "...")
    work, but these are eager and I want to avoid them. Weirdly when I print all properties in the application they appear under a different property -
    sun.java.command=org.example.AppKt -DsecretFile=/Users/dev/my-project/secret-file
    . I think it's weird there's an inconsistency. I would expect both approaches to work the same. Also, I think it's weird that logging
    commandLine
    returns a
    null
    as the first element:
    [:run] running task [null, -DsecretFile=/Users/dev/my-project/secret-file]
    Copy code
    plugins {
      kotlin("jvm") version "2.1.20"
      application
    }
    
    tasks.run.configure {
      val secretFile = layout.projectDirectory.file("secret-file")
      inputs.file(secretFile)
    
      argumentProviders += CommandLineArgumentProvider {
        listOf("-DsecretFile=${secretFile.asFile.absoluteFile.invariantSeparatorsPath}")
      }
      systemProperty("secretFileWorks", secretFile.asFile.absoluteFile.invariantSeparatorsPath)
      doFirst {
        println("[$path] running task $commandLine")
      }
    }
    Gradle version is 8.13
    v
    • 2
    • 2
  • p

    Philip W

    04/22/2025, 8:01 PM
    I have an init script to apply a project plugin with
    lifecycle.afterProject
    . But the project does not find the plugin this way, but it finds the plugin if I apply it directly in my build.gradle.kts script.
    v
    • 2
    • 8
  • a

    Ayanda Mtungwa

    04/23/2025, 11:34 AM
    Hi I have a react native app that I'm trying to create an apk for but i get this error
    v
    • 2
    • 1
  • k

    Kur'an Ögrenme

    04/23/2025, 12:52 PM
    when i try to compile my plugin with build.gradle.kts this error comes how do i fix it?
    n
    • 2
    • 23
  • m

    Martin

    04/24/2025, 5:24 PM
    Why is it version
    8.13
    and not
    8.13.0
    ? Gets me every time 😅
    same 5
    e
    a
    v
    • 4
    • 5
  • s

    Sergej Koščejev

    04/25/2025, 2:31 PM
    Is there a way to add a child CopySpec to AbstractArchiveTask conditionally and lazily? I.e.
    if (someCondition) { into(...) { ... } }
    but where someCondition is a boolean Property?
  • g

    Giuseppe Barbieri

    04/25/2025, 3:58 PM
    so, I'm playing with variants (for native libraries) and I'm looking into re-publishing some libraries under new coordinates it works fine for a single artifact with multiple variants, but I'm wondering if I could combine multiple artifacts: ie:
    org.jogamp.gluegen:gluegen-rt
    ,
    org.jogamp.joal:joal
    , etc code here, I can work around for the configurations and the publications, but the
    javaComponent
    is a problem, or does anyone see a way?
    v
    • 2
    • 5
  • f

    fantastic Dev

    04/25/2025, 4:41 PM
    Hello guys. How are you? I am using gradle on macOS. I am getting this error. How can I fix it? The libzip.dylib file exists in the folder correctly.
    Copy code
    % ./gradle
    Error occurred during initialization of VM
    Could not resolve "ZIP_Open": /Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/lib/libzip.dylib
  • e

    Eli Graber

    04/25/2025, 4:45 PM
    Is it expected to still see
    java.lang.System::load
    warnings with Gradle 8.14 and Java 24? I would think not because of #31625, but not sure.
    Never mind, Renovate didn't run the wrapper task correctly (message below is still relevant though).
  • e

    Eli Graber

    04/25/2025, 5:24 PM
    I'm seeing lots of these errors coming from multiple libraries after updating to Java 24. Is the correct solution to add
    --enable-native-access=ALL-UNNAMED
    to my jvm args until all of these libraries/tools migrate off of JNI (so probably never)?
    Copy code
    WARNING: A restricted method in java.lang.System has been called
    WARNING: java.lang.System::load has been called by com.android.layoutlib.bridge.Bridge in an unnamed module (file:/home/eli/.gradle/caches/8.14/transforms/7ddbbeceffb506f2342ae2f7da76cf06/transformed/layoutlib-15.1.4.jar)
    WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
    WARNING: Restricted methods will be blocked in a future release unless native access is enabled
    👍 1
    e
    v
    • 3
    • 15
  • s

    Sebastian Schuberth

    04/27/2025, 8:11 AM
    Does anyone know about a Gradle plugin that allows to embed metadata about Java / Kotlin resources into the compiled JAR? For example, I'd like to get the source code path (relative to the repository root) of a resource at runtime of the application.
    v
    • 2
    • 4
  • b

    Bob Shalom

    04/27/2025, 8:17 AM
    I've tried installing Gradle a few times already following different tutorials and I follow every step but then when it gets to the cmd part I type "gradle --version" and it gives me the same error every time "Error: -classpath requires class path specification", I really don't know what to do, I've tried at least 5 different tutorials went so far to even ask AI and I still don't know what to do. Can someone please help me?
    v
    • 2
    • 2
  • v

    Vladimir Sitnikov

    04/28/2025, 7:22 AM
    I wonder, what is the current way to go for
    ConfigurableFileCollection
    vs
    ListProperty<RegularFile>
    Is there anything like “prefer
    ConfigurableFileCollection
    in newer code” or “prefer
    ListProperty<RegularFile>
    in newer code” ? I assume the answer should be the same for both task properties and extension properties, however, it would be great to learn if there’s a difference.
    v
    m
    e
    • 4
    • 18
  • g

    Giuseppe Barbieri

    04/28/2025, 12:20 PM
    I've locally re-published jogl glugen library under new coordinates keeping the main artifact as
    org.jogamp.gluegen:gluegen-rt
    and the natives as variants now I'm on the consumer side, with a test project, expanding the runtime configuration for each variant, adding the corresponding file underneath, but Gradle complains:
    Copy code
    Could not resolve org.jogamp.gluegen:gluegen-rt:0.0.8 for variant-tester:main
    Could not resolve org.jogamp.gluegen:gluegen-rt:0.0.8 for variant-tester:test
  • h

    hissam ud din

    04/29/2025, 12:58 AM
    I want to run my first flutter app on emulator in android studio , but it gives me this error , which i cannot solve no matter what i do. The error is posted below , help would be much appreciated cuz i am complete beginner. FAILURE: Build failed with an exception. * Where: Settings file 'D:\projects_flutter\android\settings.gradle.kts' line: 19 * What went wrong: Error resolving plugin [id: 'dev.flutter.flutter-plugin-loader', version: '1.0.0']
    A problem occurred configuring project ':gradle'.
    > Multiple build operations failed. Could not isolate parameters org.gradle.api.internal.initialization.transform.MergeInstrumentationAnalysisTransform$Parameters_Decorated@50814c83 of artifact transform MergeInstrumentationAnalysisTransform Could not isolate parameters org.gradle.api.internal.initialization.transform.MergeInstrumentationAnalysisTransform$Parameters_Decorated@50814c83 of artifact transform MergeInstrumentationAnalysisTransform Could not isolate parameters org.gradle.api.internal.initialization.transform.MergeInstrumentationAnalysisTransform$Parameters_Decorated@50814c83 of artifact transform MergeInstrumentationAnalysisTransform Could not isolate parameters org.gradle.api.internal.initialization.transform.MergeInstrumentationAnalysisTransform$Parameters_Decorated@50814c83 of artifact transform MergeInstrumentationAnalysisTransform Could not isolate parameters org.gradle.api.internal.initialization.transform.MergeInstrumentationAnalysisTransform$Parameters_Decorated@50814c83 of artifact transform MergeInstrumentationAnalysisTransform Could not isolate parameters org.gradle.api.internal.initialization.transform.MergeInstrumentationAnalysisTransform$Parameters_Decorated@50814c83 of artifact transform MergeInstrumentationAnalysisTransform Could not isolate parameters org.gradle.api.internal.initialization.transform.MergeInstrumentationAnalysisTransform$Parameters_Decorated@50814c83 of artifact transform MergeInstrumentationAnalysisTransform Could not isolate parameters org.gradle.api.internal.initialization.transform.MergeInstrumentationAnalysisTransform$Parameters_Decorated@50814c83 of artifact transform MergeInstrumentationAnalysisTransform Could not isolate parameters org.gradle.api.internal.initialization.transform.MergeInstrumentationAnalysisTransform$Parameters_Decorated@50814c83 of artifact transform MergeInstrumentationAnalysisTransform Could not isolate parameters org.gradle.api.internal.initialization.transform.MergeInstrumentationAnalysisTransform$Parameters_Decorated@50814c83 of artifact transform MergeInstrumentationAnalysisTransform ...and 20 more failures. > Could not isolate parameters org.gradle.api.internal.initialization.transform.MergeInstrumentationAnalysisTransform$Parameters_Decorated@50814c83 of artifact transform MergeInstrumentationAnalysisTransform > Could not isolate value org.gradle.api.internal.initialization.transform.MergeInstrumentationAnalysisTransform$Parameters_Decorated@50814c83 of type MergeInstrumentationAnalysisTransform.Parameters > Multiple build operations failed. Could not move temporary workspace (C:\Users\dell\.gradle\caches\8.10.2\transforms\904c97b439784601ff0eee25e3c43bac-84c63b27-7c61-4f8e-b3c9-ac04c14f9c94) to immutable location (C:\Users\dell\.gradle\caches\8.10.2\transforms\904c97b439784601ff0eee25e3c43bac) Could not move temporary workspace (C:\Users\dell\.gradle\caches\8.10.2\transforms\4c75e264bb05f340dad2540f720bcb1b-9fc2d5c5-fbc6-4b93-8074-75ef4d405d09) to immutable location (C:\Users\dell\.gradle\caches\8.10.2\transforms\4c75e264bb05f340dad2540f720bcb1b) > Could not move temporary workspace (C:\Users\dell\.gradle\caches\8.10.2\transforms\904c97b439784601ff0eee25e3c43bac-84c63b27-7c61-4f8e-b3c9-ac04c14f9c94) to immutable location (C:\Users\dell\.gradle\caches\8.10.2\transforms\904c97b439784601ff0eee25e3c43bac) > Could not move temporary workspace (C:\Users\dell\.gradle\caches\8.10.2\transforms\4c75e264bb05f340dad2540f720bcb1b-9fc2d5c5-fbc6-4b93-8074-75ef4d405d09) to immutable location (C:\Users\dell\.gradle\caches\8.10.2\transforms\4c75e264bb05f340dad2540f720bcb1b) * 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 38s Error: Gradle task assembleDebug failed with exit code 1
    v
    • 2
    • 1
  • k

    Kaan Avdan

    04/29/2025, 8:27 AM
    FAILURE: Build completed with 3 failures. 1: Task failed with an exception. ----------- * What went wrong: Execution failed for task 'launchercheckDebugAarMetadata'. > Could not resolve all files for configuration 'launcherdebugRuntimeClasspath'. > Failed to transform firebase-app-unity-12.8.0.aar (com.google.firebasefirebase app unity12.8.0) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Could not find firebase-app-unity-12.8.0.jar (com.google.firebasefirebase app unity12.8.0). Searched in the following locations: file/C/Users/User/wkspaces/Cloud Repositories-H**/Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-app-unity/12.8.0/firebase-app-unity-12.8.0.aar file/C/Users/User/wkspaces/Cloud Repositories-H**/Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-app-unity/12.8.0/firebase-app-unity-12.8.0.jar > Failed to transform firebase-auth-unity-12.8.0.aar (com.google.firebasefirebase auth unity12.8.0) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Could not find firebase-auth-unity-12.8.0.jar (com.google.firebasefirebase auth unity12.8.0). Searched in the following locations: file/C/Users/User/wkspaces/Cloud Repositories-H**/Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-auth-unity/12.8.0/firebase-auth-unity-12.8.0.aar file/C/Users/User/wkspaces/Cloud Repositories-H**/Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-auth-unity/12.8.0/firebase-auth-unity-12.8.0.jar > Failed to transform firebase-database-unity-12.8.0.aar (com.google.firebasefirebase database unity12.8.0) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Could not find firebase-database-unity-12.8.0.jar (com.google.firebasefirebase database unity12.8.0). Searched in the following locations: file/C/Users/User/wkspaces/Cloud Repositories-H**/Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-database-unity/12.8.0/firebase-database-unity-12.8.0.aar file/C/Users/User/wkspaces/Cloud Repositories-H**/Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-database-unity/12.8.0/firebase-database-unity-12.8.0.jar * 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. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: java.lang.StackOverflowError (no error message) * 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. ============================================================================== 3: Task failed with an exception. ----------- * What went wrong: Execution failed for task 'unityLibrarygenerateDebugRFile'. > Could not resolve all files for configuration 'unityLibrarydebugCompileClasspath'. > Failed to transform firebase-app-unity-12.8.0.aar (com.google.firebasefirebase app unity12.8.0) to match attributes {artifactType=android-symbol-with-package-name, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}. > Could not find firebase-app-unity-12.8.0.jar (com.google.firebasefirebase app unity12.8.0). Searched in the following locations: file/C/Users/User/wkspaces/Cloud Repositories-H**/Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-app-unity/12.8.0/firebase-app-unity-12.8.0.aar file/C/Users/User/wkspaces/Cloud Repositories-H**/Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-app-unity/12.8.0/firebase-app-unity-12.8.0.jar > Failed to transform firebase-auth-unity-12.8.0.aar (com.google.firebasefirebase auth unity12.8.0) to match attributes {artifactType=android-symbol-with-package-name, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}. > Could not find firebase-auth-unity-12.8.0.jar (com.google.firebasefirebase auth unity12.8.0). Searched in the following locations: file/C/Users/User/wkspaces/Cloud Repositories-H**/Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-auth-unity/12.8.0/firebase-auth-unity-12.8.0.aar file/C/Users/User/wkspaces/Cloud Repositories-H**/Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-auth-unity/12.8.0/firebase-auth-unity-12.8.0.jar > Failed to transform firebase-database-unity-12.8.0.aar (com.google.firebasefirebase database unity12.8.0) to match attributes {artifactType=android-symbol-with-package-name, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}. > Could not find firebase-database-unity-12.8.0.jar (com.google.firebasefirebase database unity12.8.0). Searched in the following locations: file/C/Users/User/wkspaces/Cloud Repositories-H**/Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-database-unity/12.8.0/firebase-database-unity-12.8.0.aar file/C/Users/User/wkspaces/Cloud Repositories-H**/Assets/GeneratedLocalRepo/Firebase/m2repository/com/google/firebase/firebase-database-unity/12.8.0/firebase-database-unity-12.8.0.jar * 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 5s Hello I've been working on Unity and Firebase. I have some issues about gradle on my project. Can anyone help me to solve it
    v
    • 2
    • 1
  • k

    Ken Yee

    04/29/2025, 7:18 PM
    is there any way to make this Gradle task cacheable?
    Copy code
    tasks.register("updateModuleCapabilitiesIndex") {
        val watchFiles = fileTree(project.rootDir) {
            include("**/build.gradle", "**/build.gradle.kts")
        }.files
        val moduleIndexFile = "${layout.buildDirectory.get()}/moduleCapabilities.json"
        val moduleIndexCmdLine = listOf(
            "./gradlew",
            "...",
        )
        inputs.files(watchFiles)
        doLast {
            providers.exec {
                commandLine = moduleIndexCmdLine
            }
        }
        dependsOn("build")
    }
    Command removed for simplification, but I'm trying to write something that parses the gradle files and then saves the info into another file in a cacheable way. The doLast{...} bit unfortunately contains a gradle script which is not serializable... Tried to search in this slack but configuration cache gets a lot of unrelated hits 😂
    m
    v
    +2
    • 5
    • 11
  • s

    SettingDust

    04/30/2025, 3:13 AM
    Why is my Gradle plugin causing
    Circular dependency between the following tasks:
    work action Dependencies for XXXXXX
    ? Looks like the transform action depends on each other? The image is the cycle shows in debugger. Looks like the states of different transform is looping. How can I avoid that? https://github.com/SettingDust/cloche/blob/feature/extract-includes/src/main/kotlin/earth/terrarium/cloche/target/TargetCompilation.kt#L122-L148
    Circular dependency between the following tasks:
    work action Dependencies for dev.su5ed.sinytra.fabric-api:fabric-api-deprecated:0.92.2+1.11.11+1.20.1 {earth.terrarium.cloche.modState=none}
    v
    • 2
    • 21
  • r

    Rochana Prabasara

    04/30/2025, 6:46 AM
    hey guys how to solve this problem ? This is a Kotlin multiplatform Project when i download it from KMP wizard and open it from Android studio gradle sync is faild why is it ??????
    v
    • 2
    • 3
  • e

    Emil Kantis

    04/30/2025, 8:30 AM
    I used to have a task to create an aggregated test report from all test suite types, described here It seems that since 8.13, the concept of test suite types has been removed. Is it correct that test suites can only be aggregated per test suite name now?
    p
    v
    • 3
    • 14
  • h

    Hadi

    05/01/2025, 10:57 PM
    👋 Hello, team! i have a problem with running android app version flutter and i keep getting this error can anyone help me please i have been trying for 2 days now FAILURE: Build failed with an exception. * What went wrong: Execution failed for task 'Gjar'.
    Entry META-INF/gradle.kotlin_module is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/8.10.2/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.
    * 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 491ms Running Gradle task 'assembleRelease'... 583ms Gradle task assembleRelease failed with exit code 1
  • s

    Stephen Muendo

    05/02/2025, 9:21 AM
    Hello, this error is almost killing me Launching lib\main.dart on 24116RACCG in debug mode... Running Gradle task 'assembleDebug'... FAILURE: Build failed with an exception. * Where: Settings file 'D:\Flutter_Work\hic\android\settings.gradle.kts' line: 19 * What went wrong: Error resolving plugin [id: 'dev.flutter.flutter-plugin-loader', version: '1.0.0']
    A problem occurred configuring project ':gradle'.
    > Could not resolve all artifacts for configuration 'Gclasspath'. > Failed to transform kotlin-compiler-embeddable-1.9.24.jar (org.jetbrains.kotlinkotlin compiler embeddable1.9.24) to match attributes {artifactType=jar, org.gradle.category=library, org.gradle.internal.instrumented=instrumented-and-upgraded, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Execution failed for ExternalDependencyInstrumentingArtifactTransform: C:\Users\STEVE\.gradle\caches\8.10.2\transforms\9478a9a76c123b2f65189f158657fc62\transformed\merge\instrumentation-dependencies.bin. > java.lang.IllegalStateException: Could not serialize types map to a file: C:\Users\STEVE\.gradle\caches\8.10.2\transforms\9478a9a76c123b2f65189f158657fc62\transformed\merge\instrumentation-dependencies.bin * 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 2s Error: Gradle task assembleDebug failed with exit code 1
    v
    • 2
    • 1
  • m

    Muhammad Moeen

    05/02/2025, 4:20 PM
    Hi! Can anyone please help me? I'm trying to build my react-native with expo application but for some reason, I seem to be getting this error : ✖️ Build failed 🤖 Android build failed: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information. The phase logs :
    Copy code
    > Task :gradle-plugin:react-native-gradle-plugin:compileJava NO-SOURCE
    > Task :gradle-plugin:react-native-gradle-plugin:classes
    > Task :gradle-plugin:react-native-gradle-plugin:jar
    > Task :expo-dev-launcher-gradle-plugin:compileKotlin
    > Task :expo-dev-launcher-gradle-plugin:compileJava NO-SOURCE
    > Task :expo-dev-launcher-gradle-plugin:classes
    > Task :expo-dev-launcher-gradle-plugin:jar
    > Configure project :app
    ℹ️  Applying gradle plugin 'expo-dev-launcher-gradle-plugin' (expo-dev-launcher@5.1.10)
    FAILURE: Build completed with 2 failures.
    1: Task failed with an exception.
    -----------
    * Where:
    Build file '/home/expo/workingdir/build/node_modules/expo-clipboard/android/build.gradle' line: 3
    * What went wrong:
    Plugin [id: 'expo-module-gradle-plugin'] was not found in any of the following sources:
    - Gradle Core Plugins (not a core plugin. For more available plugins, please refer to <https://docs.gradle.org/8.10.2/userguide/plugin_reference.html> in the Gradle documentation.)
    - Included Builds (None of the included builds contain this plugin)
    - Plugin Repositories (plugin dependency must include a version number for this source)
    * 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>.
    ==============================================================================
    2: Task failed with an exception.
    -----------
    * Where:
    Script '/home/expo/workingdir/build/node_modules/expo-modules-core/android/ExpoModulesCorePlugin.gradle' line: 95
    * What went wrong:
    A problem occurred configuring project ':expo'.
    > Could not get unknown property 'release' for SoftwareComponent container of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.
    * 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 35s
    18 actionable tasks: 18 executed
    Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
    v
    • 2
    • 1
1...9899100101102Latest