Skip to content

Conversation

wakingrufus
Copy link
Collaborator

@wakingrufus wakingrufus commented Sep 22, 2025

update build to work with gradle 9.1 and Java 25
create separate test tasks for each java version
attempt to recreate project isolation failure

Kotlin 1.7 support dropped

@wakingrufus wakingrufus force-pushed the project-isolation branch 8 times, most recently from 016b252 to c5719d4 Compare September 22, 2025 19:13
Comment on lines 21 to 23
Runtime::class.java
.let { it.getPackage().specificationVersion ?: it.getMethod("version").invoke(null).toString() }
.split(".")[0].toInt() <= 11
Copy link
Owner

Choose a reason for hiding this comment

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

Good lord that's messy 😂

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, declaring a separate function doesn't work because the plugin block is evaluated before the rest of the script.

Copy link
Owner

Choose a reason for hiding this comment

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

Yea... I know... Funnily enough, I've actually mucked around in that part of the Gradle code many-a-year-ago. It's an absolutely wild bit of code. 😆

@wakingrufus wakingrufus force-pushed the project-isolation branch 16 times, most recently from a022e36 to 015f92c Compare September 26, 2025 22:26
@wakingrufus wakingrufus changed the title recreate project isolation failure update build to work with gradle 9.1 and Java 25 Sep 26, 2025
@wakingrufus wakingrufus marked this pull request as ready for review September 26, 2025 23:17
@wakingrufus
Copy link
Collaborator Author

@JLLeitschuh would you mind updating the "required checks" to reflect the new action task names?

@wakingrufus wakingrufus force-pushed the project-isolation branch 2 times, most recently from 5524597 to 6d59364 Compare September 30, 2025 19:56
Copy link
Owner

@JLLeitschuh JLLeitschuh left a comment

Choose a reason for hiding this comment

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

Some questions

Comment on lines +107 to +118
- name: Restore TestKit cache
# Inspired by https://github.com/actions/cache/issues/432#issuecomment-740376179
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: |
plugin/.gradle-test-kit/caches/modules-2
plugin/.gradle-test-kit/caches/files-2.1
plugin/.gradle-test-kit/caches/metadata-2.96
key: gradle-wrapper-${{ hashFiles('**/gradlew') }}-${{ github.sha }}
restore-keys: |
gradle-wrapper-${{ hashFiles('**/gradlew') }}-
gradle-wrapper-
Copy link
Owner

Choose a reason for hiding this comment

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

Did this get dropped during some of my refactors accidentally? Whoops 😬

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no this is copy-pasted from another spot, b/c i had to make a separate task

named<JvmTestSuite>("test") {
useJUnitJupiter()
}
listOf(8, 11, 17, 21, 25) // TODO get from data feed
Copy link
Owner

Choose a reason for hiding this comment

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

Get from the data feed, with a default set that automatically exist for easy checkout-and-run

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the default test task runs with whatever JDK the build is running on, so that takes care of the easy checkout and run.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

im not so sure we actually should get this from a data feed, given:

  1. it doesnt change very often
  2. I don't think there is a way to do this that wouldnt break the configuration cache

Copy link
Owner

Choose a reason for hiding this comment

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

I mean, we either want to do it, or remove the TODO 😂

Is it fine to break configuration cache on CI? That doesn't seem like it's too bad IMHO

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

on CI, no, but it would break if for local builds as well.

yeah ill remove the TODO if we agree, I left it here for now until we make the decision

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed the TODO

@wakingrufus wakingrufus force-pushed the project-isolation branch 4 times, most recently from 0b52dec to 08695a9 Compare September 30, 2025 22:18
@JLLeitschuh
Copy link
Owner

JLLeitschuh commented Oct 17, 2025

would you mind updating the "required checks" to reflect the new action task names?

That's probably going to need to happen post-merge, I can always bypass the rules to let a merge happen

enabled = false
}

val ensureDependenciesAreInlined by tasks.registering {
Copy link
Owner

Choose a reason for hiding this comment

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

Is this task even doing what we were thinking it was doing? Is it doing it adequately?

You said that our pom and gradle metadata dependencies were being exposed as direct dependencies, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I played around with it a bit, I there was nothing I could do to actually make this thing fail. I think the shadow plugin has improved to where it is harder to mess this stuff up now. So I have removed this task

Copy link
Owner

@JLLeitschuh JLLeitschuh left a comment

Choose a reason for hiding this comment

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

Left some review comments

create separate test tasks for each java version
attempt to recreate project isolation failure
create separate Gradle test task for each JVM version. these are still individually invoked by github actions matrix
fix GMM and POM to properly reflect that the published Jar is a shadow jar
Copy link
Owner

@JLLeitschuh JLLeitschuh left a comment

Choose a reason for hiding this comment

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

LGTM! Just one question

java-version: ${{ matrix.java_version }}
java-version: |
${{ matrix.java_version }}
21
Copy link
Owner

Choose a reason for hiding this comment

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

Isn't this already in the matrix? Do we need to add it again manually? Just trying to understand

Copy link
Collaborator Author

@wakingrufus wakingrufus Oct 22, 2025

Choose a reason for hiding this comment

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

the daemon toolchain is locked to 21 now, so we always need 21 for gradle itself. the test process is forked off of that using a project toolchain launcher, determined by the parameter we pass in (which is sourced from the matrix)

@JLLeitschuh
Copy link
Owner

Is this good to merge? Once I do so, I'll update the GitHub actions required cheks

@wakingrufus
Copy link
Collaborator Author

Is this good to merge? Once I do so, I'll update the GitHub actions required cheks

yep! Thanks

@JLLeitschuh JLLeitschuh merged commit 3f138ce into main Oct 23, 2025
23 of 24 checks passed
@JLLeitschuh JLLeitschuh deleted the project-isolation branch October 23, 2025 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants