Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof of concept: Gradle 8.3 #258

Closed
wants to merge 4 commits into from
Closed

Proof of concept: Gradle 8.3 #258

wants to merge 4 commits into from

Conversation

TWiStErRob
Copy link
Collaborator

@TWiStErRob TWiStErRob commented Jul 25, 2023

This will allow us to use Gradle 8.3+, but we'll have to live with the warning:

Configure project :
This version of Gradle expects version '4.1.0' of the kotlin-dsl plugin but version '4.0.14' has been applied to root project 'publish-plugin'. Let Gradle control the version of kotlin-dsl by removing any explicit kotlin-dsl version constraints from your build logic.
WARNING: Unsupported Kotlin plugin version.
The embedded-kotlin and kotlin-dsl plugins rely on features of Kotlin 1.9.0 that might work differently than in the requested version 1.8.22.

@@ -59,7 +59,7 @@ class StagingRepositoryTransitioner(val nexusClient: NexusClient, val retrier: A
private fun assertRepositoryInDesiredState(repository: StagingRepository, vararg desiredStates: StagingRepository.State) {
if (repository.state !in desiredStates) {
throw RepositoryTransitionException(
"Staging repository is not in desired state ${desiredStates.contentToString()}: $repository. It is unexpected. Please check " +
"Staging repository is not in desired state ${desiredStates.contentDeepToString()}: $repository. It is unexpected. Please check " +
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a backward compatible change? When was it introduced (before 6.2?)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

contentToString seems actually Kotlin 1.4, and we're targeting Kotlin 1.3. Not sure how it was compiling before. contentDeepToString is Kotlin 1.1

It's very likely some kind of inference / overload resolution change.

Copy link
Contributor

@szpak szpak left a comment

Choose a reason for hiding this comment

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

Btw, as I see in our regression tests the plugin can already be built with 8.3-rc-1 and the change it to "just" make the project itself "buildable" with it?

If you think, the changes are safe (and backward compatible at runtime), it's ok for me to apply them to be able to keep up with the changes in Gradle even more :).

Btw. what will be the minimal Gradle version able to build the project? 8.0?

@TWiStErRob TWiStErRob marked this pull request as draft July 25, 2023 21:09
@TWiStErRob
Copy link
Collaborator Author

If you think, the changes are safe (and backward compatible at runtime), it's ok for me to apply them to be able to keep up with the changes in Gradle even more :).

Sorry this was meant to be a draft only, for future reference. For now this is RC, let's at least wait for stable. Things can change significantly in RCs (if they are broken in RC1, they might be fixed in RC2).

This PR might not even be necessary if we bump the minimum Gradle to 7.x, but that's a different convo. Let's get this 2.0 out first :)

Btw, as I see in our regression tests the plugin can already be built with 8.3-rc-1 and the change it to "just" make the project itself "buildable" with it?

The regression tests are running on Gradle 8.3-rc-1, still using the wrapper to build.
https://github.com/gradle-nexus/publish-plugin/actions/runs/5641947708/job/15280868434#step:7:91
image
So this change updates the wrapper for all gradlew commands.

Btw. what will be the minimal Gradle version able to build the project? 8.0?

Not sure I get this question. Wrapper locks in a specific version. Using the plugin (applying it) in a (user) build depends on what we set explicitly as the minimum in the plugin code.

@szpak
Copy link
Contributor

szpak commented Jul 26, 2023

The regression tests are running on Gradle 8.3-rc-1, still using the wrapper to build.

Yes, I meant, that the currently built plugin (with 8.2) is at runtime compatible with (in) the 3rd-party projects built with 8.3-rc-1.

Not sure I get this question. Wrapper locks in a specific version. Using the plugin (applying it) in a (user) build depends on what we set explicitly as the minimum in the plugin code.

Yes, the wrapper keeps the things consistent. I was just wondering, if - due to that changes - the "builability" with the lower Gradle version is impossible (however, it was just a theoretical question, as 8.2+ should be enough for us).

@szpak
Copy link
Contributor

szpak commented Jul 26, 2023

And yes, waiting for 8.3-final seems to be a good idea :-).

@szpak
Copy link
Contributor

szpak commented Jan 9, 2024

@TWiStErRob Would it be easier with Gradle 8.5?

@TWiStErRob
Copy link
Collaborator Author

I think 8.5 will be even harder, hopefully I can have a look this weekend. I'll try to carve a few hours for reviving these PRs. But please review closely after, because it's really hard to remember the context and rebase these with confidence.

This was referenced Jan 14, 2024
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