-
-
Notifications
You must be signed in to change notification settings - Fork 791
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
Update dependency com.android.tools.build:gradle to v7.4.0 #5693
Conversation
Now we could possibly jump to Java 11 minimum to execute the Gradle plugin, but AGP 8.0 bumps again to Java 17 which will be too aggressive, so we should probably solve for this now and maintain compatibility with Java 8. Hopefully that's feasible because this is a compile only dependency, so we can compile with Java 11 dependencies but produce Java 8 bytecode. |
This is used so detekt's Gradle plugin can still compile while targeting JVM 8, as AGP 7 only requires JVM 8 compatibility while compiling. detekt's Gradle plugin would have to target JVM 11 or above if compiling against AGP 7.4.
Codecov Report
@@ Coverage Diff @@
## main #5693 +/- ##
===========================================
+ Coverage 0 84.46% +84.46%
- Complexity 0 3734 +3734
===========================================
Files 0 543 +543
Lines 0 12704 +12704
Branches 0 2222 +2222
===========================================
+ Hits 0 10730 +10730
- Misses 0 865 +865
- Partials 0 1109 +1109
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
We probably need to validate if Android projects can still apply detekt-gradle-plugin if there is internal checks inside AGP. I am referring to https://developer.android.com/studio/releases/gradle-plugin#jvm-11-bytecode
|
I don't get how this work. You are not adding the agp to the jdk8 run. Shouldn't those tests fail with class not found or something similar? |
We shouldn't have any problems here, since we're still compiling against AGP 7.0 which doesn't have that limitation, and we're not writing custom lint checks. |
Android tests are already skipped if JVM is lower than 11. Lines 13 to 15 in 0245b0f
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this addition to compile against min versión but tests against last know version :)
# This represents the the oldest AGP version that is supported by detekt. | ||
# This should only be updated when updating the minimum version supported by detekt's Gradle plugin. | ||
android-gradle-minSupported = "com.android.tools.build:gradle:7.0.0" | ||
|
||
# This version of AGP is used for testing and should be updated when new AGP versions are released to ensure detekt's | ||
# Gradle plugin remains compatible. | ||
android-gradle-maxSupported = "com.android.tools.build:gradle:7.4.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
No description provided.