Streamline our infrastructure with Gradle Convention plugins
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 83
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 30
Description
Related to https://github.com/Kotlin/dataframe/issues/1614
The DataFrame project infrastructure has become large, complex, and fractured, making it difficult to maintain, and we often forget to bump versions in places because they are not synced.
I've been experimenting with gradle convention plugins and composite builds: https://github.com/Jolanrensen/GradleConventionsExperiment
I believe this sample project can be used as a good base for the DataFrame project itself:
- (type safe) convention plugins allow us to remove duplicate build code and avoid using allProjects {}
(It's also the [recommended way](https://docs.gradle.org/current/userguide/best_practices_structuring_builds.html#favor_composite_builds) to structure builds according to Gradle and [Kotlin](https://kotlinlang.org/docs/gradle-best-practices.html#use-convention-plugins))
- It fixes the issue where we have to manually sync versions to subprojects like `/plugins/keywords-generator`. We can simply use a build-settings convention plugin that finds and sets up the correct version catalog :)
- See https://github.com/Jolanrensen/GradleConventionsExperiment for more information and links
We could introduce it gradually:
- [x] Enable build-settings-logic and build-logic with just version catalogs, start using it for nested projects (fixed by: https://github.com/Kotlin/dataframe/pull/1662)
- [x] Move `allProjects {}` logic into dedicated conventions (like `dfbuild.kotlinJava8` and `dfbuild.kotlinJava11`, for instance) https://github.com/Kotlin/dataframe/pull/1670
- [x] Fix our examples situation: https://github.com/Kotlin/dataframe/issues/1614 and #1610, WIP: https://github.com/Kotlin/dataframe/pull/1677
- [x] Move KoDEx logic into dedicated convention (duplicated in :core and :dataframe-csv) #1765
- [x] Move `:core:dependencyUpdates` task to convention plugin. It depends on dataframe via our old KSP plugin which will not be published anymore for beta5+ See #1821
- [ ] Create a convention plugin for running our tests against all LTS java versions https://github.com/Kotlin/dataframe/pull/1682#discussion_r2804554120
- [x] Make sure dfbuild.dependencyUpdates is also used in the examples (at least the dev versions), so we can catch updates there too
- [ ] Create "common dataframe IO plugin" convention which provides and sets up plugins we use everywhere, like KtLint, binary compatibility validator, publisher, build config
- [ ] Move `:plugins:expressions-converter`, `:plugins:keywords-generator`, and `:plugins:public-api-modifier` (if we actually use that one) into `build-logic`. They are only used from local build files, so essentially, they're already convention plugins.
- [ ] Move Korro logic into dedicated convention (we now have duplicate logic in :core and :samples)
- [ ] Make the setup for running the compiler plugin inside local modules a convention plugin (currently worked out in :samples, but we might need it in other places later as well). Alternatively, we could turn `:samples` into a separate project, like the examples.
Contributor guide
Assessment
This issue has not been assessed yet.