diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 35379ec..d3a0450 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -11,7 +11,7 @@ Below, you can see the key milestones we anticipate. | ----------------------------------- |:-:| ------------: | | First Early Access Preview (EAP) | ✅ | July 2024 | | Second Early Access Preview (EAP 2) | ✅ | November 2024 | -| Third Early Access Preview (EAP 3) | 🏗️ | February 2025 | +| Third Early Access Preview (EAP 3) | 🏗️ | March 2025 | | Incubating Software Types and DCL | ⏳ | 2025 | | Stable Software Types and DCL | ⏳ | 2026 | @@ -66,6 +66,7 @@ To discuss the roadmap and the related initiatives, use the * More DCL features * `Map` properties * Container defaults +* Reference Version Catalogs for dependency declarations in DCL ## Incubating Software Types and DCL diff --git a/docs/reference/README.md b/docs/reference/README.md index dba6183..d4a9e75 100644 --- a/docs/reference/README.md +++ b/docs/reference/README.md @@ -2,4 +2,5 @@ * [`gradle init`](./build-init.md) - generate new builds using software types and DCL files * [Software Features](./software-features.md) - configuration model used by software developers +* [Example Project Migration](./migrating-example.md) - notes on the migration of an actual Gradle KMP build to DCL * [Roadmap](../ROADMAP.md) - Declarative Gradle roadmap diff --git a/docs/reference/build-init.md b/docs/reference/build-init.md index 4a0ba8e..9089004 100644 --- a/docs/reference/build-init.md +++ b/docs/reference/build-init.md @@ -21,7 +21,7 @@ Example: `gradle init -Dorg.gradle.buildinit.specs=,` that are meant to be used in this build, and we will need to write one of those. + +... shows setup + + +6. Create the new Plugins + +We can't use `extend` on the existing plugin class, because of a technicial limitation - each Software Type plugin can expose only a single software type. +So we'll have to create some + +... continues like this through basics of setting up the plugins + +7. Write new extensions per each "major domain type" - Detekt, SQLDelight, etc. + +Art more than science, etc. +Test build with them empty +Discuss dependency modifiers for `platform` + +8. Migrate buildscript to use new types +Build should run, probably compile errors + +9. Wire plugins +Discuss need for afterEvaluate... + +10. Delete everything non-declarative +Convert files to DCL +Build should still run + +## Remaining TODOs + +Discuss stuff we couldn't migrate. +Discuss limitations (biggest is reliance on afterEvaluate if wiring plugins without lazy props) +Discuss imports, unqualified enums, etc. + +## Conclusion + +There's no easy button, but it's not THAT hard... +It’s really nice to add something to the extension interface, hit refresh, and then get type-safe assistance on it immediately in the project build... + + +# Hints and Tips + +- Add `@file:Suppress("UnstableApiUsage")` to the top of your KTS files during the intermediate stages to silence warnings about many of the DCL types. +- DCL does not yet support Version Catalogs, so if you're using one, you'll need to convert your `libs.my.lib` dependency declarations to GAV coordinates like `org:mylib:1.4` when you're ready to switch from using Kotlin DSL files with Software Types to fully declarative DCL files. This is annoying, but temporary. +- DCL files don't allow infix notation. If you were applying plugins like: + +``` + plugins { + id("my.plugin") version "0.4" + } +``` + +switch to using chained calls like: +``` + plugins { + id("my.plugin").version("0.4") + } +``` + + +## Footguns +- It’s easy to forget to set org.gradle.kotlin.dsl.dcl flag in properties, but this is necessary to use Software Type plugins in non-DCL (KTS) files. +- NDOC discussion... +- Using the wrong annotation types +- Other stuff from my notes +- Unnecessary brackets are actually necessary... + +