https://gradle.com/ logo
Join Slack
Powered by
# declarative-gradle
  • p

    Paul Merlin

    11/05/2024, 5:02 PM
    As discussed in the 🧵 above, the versions of Android Studio linked from declarative.gradle.org were getting old and don't support the latest AGP. We just updated the download links with more recent versions of Studio that do. https://declarative.gradle.org/docs/getting-started/setup/#android-studio
    🙌 4
    m
    • 2
    • 5
  • s

    Super Dev

    11/11/2024, 4:04 PM
    👋 Hello, team! I just create new react-native and try to build android app but an error occupied. How can I fix this issue?
    v
    • 2
    • 1
  • o

    Oleg Nenashev

    11/20/2024, 10:07 AM
    https://gradle-community.slack.com/archives/CRA9GTYBH/p1732097211431179
  • j

    Jason Pearson

    11/21/2024, 11:53 AM
    Just pulled the Android Studio for DCL off the Google Drive link, it fails to open unless exceptions are granted in system settings > security. It seems like its not being notarized?
    o
    p
    • 3
    • 2
  • j

    Jason Pearson

    11/21/2024, 3:12 PM
    Getting the samples working and trying to experiment with them. Couple things I'm noticing: • Docs say the examples should work with JDK >= 17, but toolchain is set to 17 everywhere so only JDK 17 actually works with it. Removing toolchain allows for newer JDKs to be used while targeting older source. • Adding
    -XX:ReservedCodeCacheSize=256m
    to Gradle JVM args causes a build failure:
    Copy code
    A problem occurred configuring project ':android-util'.
    > Collection contains no element matching the predicate.
    p
    • 2
    • 3
  • j

    Jason Pearson

    11/22/2024, 9:28 AM
    It looks like for now there is no version catalog support?
    p
    s
    • 3
    • 5
  • s

    Sebastian Schuberth

    11/22/2024, 10:02 AM
    Is there some technical information about how the declarative syntax was implemented? Specifically, is it actually just a(nother) Kotlin DSL, i.e. is Kotlin used for parsing?
    p
    e
    +2
    • 5
    • 15
  • j

    Jason Pearson

    11/22/2024, 10:47 AM
    Are y'all taking contributions for DCL? There's a few things that are very small and straightforward like SARIF reports for Android Lint, and bigger things like Kotlin Inject, signing configuration for debug/release variants
    j
    p
    • 3
    • 7
  • i

    Ismail Mohamed

    11/23/2024, 9:20 AM
    hello
    👋 1
  • j

    Javi

    11/23/2024, 12:01 PM
    Is it possible to use IDEA instead of AS? I cannot find the flags on IDEA
    • the
    gradle.declarative.studio.support
    and
    gradle.declarative.ide.support
    flags
    j
    j
    +2
    • 5
    • 19
  • j

    Javi

    11/24/2024, 12:23 AM
    I would like to add a custom configuration for the
    KotlinSourceSet
    , but as I cannot inject
    Project
    or
    ExtensionContainer
    in my class, the only way to configure it is by duplicating a lot of things from the
    KotlinSourceSet
    I want to be able to do something like you can see in the image. Is there any way to get any plugin Extension inside a
    @Configuring
    method?
  • p

    Paul Merlin

    11/26/2024, 5:09 PM
    FYI We just uploaded a new version of Android Studio with Declarative support provided by Google that fixes several issues that were showing in
    settings.gradle.dcl
    files. You can find it in the Google Drive linked here https://declarative.gradle.org/docs/getting-started/setup/#ide
    🙌 1
    j
    • 2
    • 2
  • p

    Paul Merlin

    11/27/2024, 4:39 PM
    Builds of IntelliJ IDEA with support for DCL are out 🎉 https://declarative.gradle.org/docs/getting-started/setup/#intellij-idea
    🎉 10
  • j

    Javi

    11/30/2024, 4:51 PM
    Is it possible to access the software model from one plugin to another? It is in normal Kotlin files, not in
    .dcl
    files. The use case is configuring the X plugin from the Y plugin without having to create a middleware project extension or something similar which complicates the setup a lot.
    s
    • 2
    • 9
  • p

    Philip W

    12/01/2024, 8:09 PM
    When enabling
    org.gradle.kotlin.dsl.dcl=true
    using 8.12-20241129001902+0000, I always get some parser (or even lexer) errors in my kts files, also when using a very simple gradle init sample project. Should I create an issue or is the DCL implementation too experimental?
    j
    • 2
    • 3
  • j

    Javi

    12/06/2024, 11:21 PM
    I am able to test dcl plugins using Gradle test kit without any issue. But I need to configure a project with additional data not supported by dcl, so I need to use
    org.gradle.kotlin.dsl.dcl=true
    but then tests are failing with:
    Copy code
    ScriptCompilationException(scriptCompilationErrors=[...])
    Is there any workaround?
    j
    • 2
    • 2
  • z

    zoe wu

    12/12/2024, 6:57 AM
    👋 大家好!
    👋 4
  • s

    Slackbot

    12/30/2024, 1:50 AM
    This message was deleted.
    d
    • 2
    • 1
  • p

    Philip W

    01/06/2025, 10:34 AM
    How do you plan to support extensions of objects in DCL? Without DCL, I have a top-level extension myExt provided by my base Gradle plugin, and some Gradle "sub" plugins adding an extension to the myExt like
    myExt.feature1 {}
    or
    myExt.feature2 {}
    . With KTS, there are generated accessors but AFAIK the DCL uses the static software type and not the dynamic extensions registered during runtime. Or should I create a new top level extension for each "sub" plugin?
    a
    j
    • 3
    • 4
  • u

    佳鹏王

    01/07/2025, 1:15 PM
    A problem occurred evaluating settings 'TikTok'.
    > No signature of method: org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.DefaultDependencySubstitutions$1.with() is applicable for argument types: (org.gradle.internal.component.external.model.DefaultModuleComponentSelector) values: [com.google.guava:guava:30.1-jre]
    Possible solutions: with(groovy.lang.Closure), with(boolean, groovy.lang.Closure), wait(), wait(long), find(), wait(long, int)
    Does anyone know how to solve this?
  • u

    佳鹏王

    01/07/2025, 1:16 PM
    image.png
    🧵 1
    v
    • 2
    • 1
  • s

    Slackbot

    01/10/2025, 9:48 AM
    This message was deleted.
    v
    • 2
    • 1
  • p

    Paul Merlin

    01/24/2025, 11:33 AM
    Since yesterday, support for
    .gradle.dcl
    files is now included in regular Android Studio nightlies. It is not needed to download a special nightly from an obscure Google Drive. https://developer.android.com/studio/nightly Note that you still have to enable the Declarative features as explained here https://declarative.gradle.org/docs/getting-started/setup/#enable-declarative-features-in-studio
    j
    • 2
    • 2
  • p

    Paul Merlin

    01/27/2025, 1:46 PM
    New builds of IntelliJ IDEA have been made available by JetBrains Today https://declarative.gradle.org/docs/getting-started/setup/#ide
    party gradlephant 8
    🚀 1
  • y

    ysb33r

    01/27/2025, 2:36 PM
    @Paul Merlin When using DG, you need both
    settings.gradle.dcl
    and
    build.gradle.dcl
    ? For instance, is it still possible to have
    settings.gradle(.kts)
    , but then have
    build.gradle.dcl
    ?
    p
    • 2
    • 1
  • a

    Andrey Mishchenko

    02/17/2025, 1:51 AM
    Declarative Gradle Roadmap was released last week, I think it was never posted in this channel https://declarative.gradle.org/docs/ROADMAP/
    j
    o
    • 3
    • 5
  • p

    Philip W

    03/13/2025, 11:10 AM
    With
    org.gradle.kotlin.dsl.dcl=true
    it is possible to use the custom parser for software types in kts build files. Will it also be possible to enable the custom parser for software types in precompiled kts plugins in buildSrc? Use case: I don’t want to pollute my settings.dcl with many default values but write precompiled settings plugins and not using KotlinCompile would make this use-case faster.
    p
    • 2
    • 1
  • s

    Slackbot

    03/29/2025, 10:07 PM
    This message was deleted.
    🗑️ 1
    v
    • 2
    • 1
  • o

    Oleg Nenashev

    04/24/2025, 3:05 PM
    Extra Q&A chat is live for the Declarative Gradle webinar we are streaming now: https://gradle.com/events/Declarative-Gradle-developer-first-approach-to-Gradle-builds-04-25/
  • j

    Javi

    05/05/2025, 1:15 PM
    Is there any new information about "lazy properties" to allow creating DSL in Gradle Declarative to apply plugins or create tasks conditionally without ordering issues? It would be nice if this issue was solved in Declarative Gradle, as currently even you can get it more or less working, sometimes you are forced to use
    afterEvaluate
    as the workaround which is bad.
    a
    p
    • 3
    • 7