Jochen Theodorou
08/29/2024, 6:03 AMAndrey Mishchenko
08/29/2024, 7:54 AMAndrey Mishchenko
08/29/2024, 7:56 AMJochen Theodorou
08/29/2024, 10:08 AMAndrey Mishchenko
08/29/2024, 10:36 AMAndrey Mishchenko
08/29/2024, 10:38 AMAndrey Mishchenko
08/29/2024, 10:42 AMJochen Theodorou
08/29/2024, 10:44 AMAndrey Mishchenko
08/29/2024, 10:45 AMAndrey Mishchenko
08/29/2024, 10:46 AMJochen Theodorou
08/29/2024, 10:47 AMAndrey Mishchenko
08/29/2024, 10:47 AMAndrey Mishchenko
08/29/2024, 10:48 AMAndrey Mishchenko
08/29/2024, 10:50 AMJochen Theodorou
08/29/2024, 10:55 AMAndrey Mishchenko
08/29/2024, 10:56 AMJochen Theodorou
08/29/2024, 10:57 AMAndrey Mishchenko
08/29/2024, 10:57 AMAndrey Mishchenko
08/30/2024, 7:01 AMbe the syntax easy or difficult to parse.A large part is not only syntax, but what this syntax represent, thanks to separation between declarative and imperative, IDE can get a lot of information from DSL alone and use it to represent project structure.
As for limiting access, not impossible with interal DSLs, but surely more easy with an external oneThe only possible solution now (at least reliable one, which doesn't try to statically interpret programming language logic) is to run build scripts and do full project syncronization
Or do you mean that if it is concentrated in the plugins it is more easy to deal with? That might be.Not sure that I understand. But the goal is that declaration allows plugins to describe behaviour, so IDE supports DSL editing, autocomplete and even partially understand project structure and features
TrevJonez
08/30/2024, 8:22 PMTrevJonez
08/30/2024, 8:22 PMAndrey Mishchenko
09/03/2024, 9:50 AMmy only hope is if we are to adopt it in the bigger mature projects that they at least make sure we have a clean way to continue running with our existing suite of convention plugins.I think it would depends on how your convention plugins are implemented Declarative Gradle requires a single project type per project, so reactive convention plugins (when you apply them and they configure other plugins depending on what is applied) wouldn't work out of the box as I see, it would require to rewrite them, to have single plugin per project type and expose additional features as DSL. We are on the same boat here, but we plan to migrate I think if you have a single convention plugin or convention plugin per project type, should be easier to migrate Also build.gradle/build.gradle.kts is continue to be available, so you can just continue use it
of how version catalogs wentI think version catalog is way more less impactful comparing to decalrative gradle in terms of amout of potential changes.
TrevJonez
09/03/2024, 3:07 PM// kotlin android project with: compose, dagger via ksp, moshi-codegen via ksp
plugins {
id("com.aetna.android-library")
id("org.jetbrains.kotlin.plugin.compose")
id("com.aetna.dagger")
id("com.aetna.moshi")
}
or this:
// kotlin jvm with: // dagger via ksp, moshi-codegen via ksp
plugins {
id("com.aetna.jvm-library")
id("com.aetna.dagger")
id("com.aetna.moshi")
}
Moshi plugin behaves identical on both project types so presumable I can lift that to a boolean in a DSL to have it also applied.
Then the dagger plugin does the typical flow with pluginManager
target.pluginManager.withPlugin("...") { ... }
So I would likely need to break that out to two different plugins one for each type plus the DSL toggle?Andrey Mishchenko
09/05/2024, 2:10 AMenableMoshi=true
.
You still may have convention plugin to share logic, but it would be applied to your declarative gradle plugins with project type, not to module directly. And probably it would be declared like id("com.aetna.moshi") apply false
in your project type convention
> So I would likely need to break that out to two different plugins one for each type plus the DSL toggle
I believe it's not necessary to break it as soon as dagger convention works for android and jvm projects, so you need DSL toggle to enable it, but the single plugin can be applied both to Android and JVM
Just a disclaimer, I'm as new as everyone else to this, and also try understand how project setup will work with declarative gradle, so this is my limited understanding of current prototypeTrevJonez
09/05/2024, 2:16 AMAndrey Mishchenko
09/05/2024, 2:21 AM