Skip to content

[Gradle 8] Update to Gradle 8.13#530

Merged
JakeWharton merged 17 commits into
JakeWharton:trunkfrom
MrMannWood:exploration
Jul 1, 2025
Merged

[Gradle 8] Update to Gradle 8.13#530
JakeWharton merged 17 commits into
JakeWharton:trunkfrom
MrMannWood:exploration

Conversation

@MrMannWood
Copy link
Copy Markdown
Contributor

All changes are required to bump to Gradle 8, and cannot be applied before bumping.

  • Kotlin: max available version
  • Android Plugin: max available version
  • Robolectric: required for @Config to work
  • japicmp: required to support Gradle changes
  • jvmToolchain: required syntax change
  • lint baseline file: required to not change tests. I will follow up with another PR that fixes the issues individually
  • TimberTest.kt: addressed the in-place comment

@MrMannWood
Copy link
Copy Markdown
Contributor Author

MrMannWood commented Jun 30, 2025

AGP requires Java 17, but CI is currently set to 11. I don't believe I can change anything about CI with a PR, so I am opening an issue to request a bump

edit: #531

Comment thread timber-lint/build.gradle
Comment on lines +6 to +8
kotlin {
jvmToolchain(17)
}
Copy link
Copy Markdown
Owner

@JakeWharton JakeWharton Jun 30, 2025

Choose a reason for hiding this comment

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

Toolchains are bad and I do not want them in use. See this. It's fine to land for now, but I will file an issue to track removal.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed with https://github.com/MrMannWood/timber/tree/toolchain

Will create a PR once the next few land

Comment thread build.gradle
// Update WrongTimberUsageDetectorTest#innerStringFormatWithStaticImport when >= 7.1.0-alpha07
'androidPlugin': '7.0.0',
'androidPlugin': '8.10.0',
'androidTools': '30.0.0',
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This version should always be the previous one plus 23

Suggested change
'androidTools': '30.0.0',
'androidTools': '31.10.0',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately, making this change is going to be non-trivial. It appears that the lint rules have changed and updating the android tools causes the lint test to fail. I'm investigating how to minimize the LOC of the change, but I think it's going to be reasonably large.

I would really prefer to not change tests and these dependency numbers at the same time. My preference (if I was working with HG stacks and Phabricator) would be to have this be one diff, and the next diff on the stack would be the test fixes and the tools number bump. We could then review and have CI test each revision individually, and land the stack as a single unit. If this is possible in Git I'm unaware of how to do it.

For the time being, I'll be making the tools update and the test changes in a follow up PR, and will be awaiting your feedback before fixing this one.

Comment thread build.gradle
'kotlin': '2.1.20',
'autoService': '1.1.1',

// Update WrongTimberUsageDetectorTest#innerStringFormatWithStaticImport when >= 7.1.0-alpha07
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Do we need to do this then?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

until AGP plugin is upgraded, yes

Comment thread gradle/wrapper/gradle-wrapper.properties
@JakeWharton
Copy link
Copy Markdown
Owner

You can change the JDK version in the PR. There's a .java-version file that has the JDK version in use.

@MrMannWood MrMannWood requested a review from JakeWharton June 30, 2025 23:25
@MrMannWood
Copy link
Copy Markdown
Contributor Author

re-requesting review based on discussion and not wanting an auto-merge until AGP is resolved.

Also, apologies about the messy commit history, I don't use git as my primary workflow.

@MrMannWood
Copy link
Copy Markdown
Contributor Author

This is what the AGP upgrade looks like. It's not horrible, but there's a lot of noise: MrMannWood@5daf3d2

@JakeWharton JakeWharton enabled auto-merge (squash) July 1, 2025 02:15
@JakeWharton JakeWharton merged commit 899bca4 into JakeWharton:trunk Jul 1, 2025
1 check passed
@MrMannWood MrMannWood deleted the exploration branch July 1, 2025 02:21
@JakeWharton JakeWharton mentioned this pull request Jul 1, 2025
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