Skip to content

Conversation

aSemy
Copy link
Contributor

@aSemy aSemy commented Jul 13, 2024

Instead the test-project using includedBuild() to depend on Kotest, instead, publish Kotest to a project-local directory.

This will improve test performance, because it will allow running the Gradle Plugin tests in parallel.

It also improves the Kotest build's stability:

  • Avoids discouraged Gradle practices (cross-project dependencies and configuration).
  • Improve Build Cache and Config Cache compatibility.

Additional changes:

  • Tidy up test-project build config, use Kotlin DSL utils.
  • Tidy up GradleInvocation.

- Avoid discouraged Gradle practices (cross-project configuration).
- Improve Build Cache and Config Cache compatibility.
@sksamuel
Copy link
Member

What does this do?

@aSemy
Copy link
Contributor Author

aSemy commented Jul 14, 2024

What does this do?

The Dev Publish plugin publishes subprojects to a project-local directory, sort of like Maven Local. This avoids the downsides of the current approach (cross-project configuration is a discouraged Gradle practice, because it negatively impacts parallelisation and caching), and also the negatives of Maven Local itself (which can be 'polluted' with other artifacts, and it's not practical to fingerprint and cache it).

My expectation is that using Dev Publish will improve the speed of running tests in general, but specifically on CI.

I'm looking generally improving the Kotest plugin test because it takes significantly longer than other modules, despite only having a handful of tests. That will probably always be the case, but I think some of the time can be cut-down.

@aSemy aSemy marked this pull request as ready for review July 21, 2024 11:10
@aSemy aSemy marked this pull request as draft July 21, 2024 11:11
@aSemy aSemy marked this pull request as ready for review July 21, 2024 11:18
@aSemy aSemy added the builds 🐘 PRs / Issues related to the CI/CD pipelines or Gradle builds label Jul 21, 2024
Copy link
Contributor

@OliverO2 OliverO2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all very plausible and well written! Full disclosure: I only had a cursory look at dev-publish-plugin and I do not consider myself an expert on publishing.

@sksamuel sksamuel added this pull request to the merge queue Jul 21, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 21, 2024
@aSemy aSemy enabled auto-merge July 21, 2024 18:38
@aSemy aSemy added this pull request to the merge queue Jul 21, 2024
Merged via the queue into master with commit f9981a9 Jul 21, 2024
7 checks passed
@aSemy aSemy deleted the adam/feat/kotest-gradle-plugin-dev-publish branch July 21, 2024 19:54
github-merge-queue bot pushed a commit that referenced this pull request Jul 28, 2024
One step of many to improve test performance.

Using a separate test directory will permit running the tests in
parallel (to be done in a future PR, once the tests are more cache
friendly.)

Depends on #4174.

---------

Co-authored-by: Sam <sam@sksamuel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds 🐘 PRs / Issues related to the CI/CD pipelines or Gradle builds
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants