-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Publish Gradle Module Metadata with Variants #3683
Commits on Jun 28, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cf4d7a1 - Browse repository at this point
Copy the full SHA cf4d7a1View commit details -
Add integration test for resolving Guava with Gradle
- only using POM metadata (Gradle 5) - using Gradle Module Metadata (Gradle 6)
Configuration menu - View commit details
-
Copy full SHA for 31c2026 - Browse repository at this point
Copy the full SHA 31c2026View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3db90c4 - Browse repository at this point
Copy the full SHA 3db90c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6437197 - Browse repository at this point
Copy the full SHA 6437197View commit details -
Configuration menu - View commit details
-
Copy full SHA for e643f3f - Browse repository at this point
Copy the full SHA e643f3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f9fb5c5 - Browse repository at this point
Copy the full SHA f9fb5c5View commit details -
Use correct version for parents
The 'android' and 'jre' variant each have their own parent and they should use that one in Gradle Module Metadata.
Configuration menu - View commit details
-
Copy full SHA for 905909c - Browse repository at this point
Copy the full SHA 905909cView commit details -
This causes integration tests to fail. The first failure: Execution failed for task ':androidJava6RuntimeClasspathJava:testClasspath'. > Expected: [failureaccess-1.0.1.jar, guava-HEAD-android-SNAPSHOT.jar] Actual: [checker-compat-qual-2.5.5.jar, error_prone_annotations-2.3.4.jar, failureaccess-1.0.1.jar, guava-HEAD-android-SNAPSHOT.jar, j2objc-annotations-1.3.jar, jsr305-3.0.2.jar]
Configuration menu - View commit details
-
Copy full SHA for 7a2f0a0 - Browse repository at this point
Copy the full SHA 7a2f0a0View commit details -
Also fix typo when looking up configuration.
This makes the test pass again, this time because it's testing what we want :)
Configuration menu - View commit details
-
Copy full SHA for 8191fc3 - Browse repository at this point
Copy the full SHA 8191fc3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 179136b - Browse repository at this point
Copy the full SHA 179136bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 41dbc97 - Browse repository at this point
Copy the full SHA 41dbc97View commit details -
Conservatively keep most deps on the runtime classpath.
As of this commit, we'll remove only j2objc-annotations. The other artifacts contain at least some annotations with RUNTIME visibility (IIRC). (Even this change could theoretically affect users who assume that they can read CLASS-retention annotations (of which j2objc-annotations has some) from bytecode and find them in the runtime classpath. But that seems unlikely, especially for j2objc annotations.) We may consider being more aggressive in the future.
Configuration menu - View commit details
-
Copy full SHA for c5e364f - Browse repository at this point
Copy the full SHA c5e364fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0346bc3 - Browse repository at this point
Copy the full SHA 0346bc3View commit details -
Make Android projects always select a 'android' variant by default
This is done by setting 'com.android.build.api.attributes.BuildTypeAttr' to 'jre' in the 'jre' variants. Which indicates that these variants are unsuited for the usual Android build types (release, debug, ...).
Configuration menu - View commit details
-
Copy full SHA for ad2ca91 - Browse repository at this point
Copy the full SHA ad2ca91View commit details -
Configuration menu - View commit details
-
Copy full SHA for 536a5a3 - Browse repository at this point
Copy the full SHA 536a5a3View commit details -
Add test cases for selecting a different variant via constraint
This shows that version constraints can be used to: - Select the 'jre' variant in an Android project - Select the 'android' variant in a Java project, even if the jvm target version is 8+
Configuration menu - View commit details
-
Copy full SHA for 941ff66 - Browse repository at this point
Copy the full SHA 941ff66View commit details -
Use 'org.gradle.jvm.environment' attribute
This attribute is supported by Gradle 7 and AGP 7 See: - gradle/gradle#15430 - https://issuetracker.google.com/issues/179488433
Configuration menu - View commit details
-
Copy full SHA for 9eb9996 - Browse repository at this point
Copy the full SHA 9eb9996View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf7d4c1 - Browse repository at this point
Copy the full SHA cf7d4c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c5e9d3 - Browse repository at this point
Copy the full SHA 8c5e9d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e01521 - Browse repository at this point
Copy the full SHA 8e01521View commit details -
Configuration menu - View commit details
-
Copy full SHA for e07bcf1 - Browse repository at this point
Copy the full SHA e07bcf1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ea61e9 - Browse repository at this point
Copy the full SHA 4ea61e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7300d68 - Browse repository at this point
Copy the full SHA 7300d68View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2180a04 - Browse repository at this point
Copy the full SHA 2180a04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4758c9c - Browse repository at this point
Copy the full SHA 4758c9cView commit details -
Do not run Gradle integration test on Java 8
The Android Gradle Plugin 7.0.0 requires Java 11
Configuration menu - View commit details
-
Copy full SHA for eae386c - Browse repository at this point
Copy the full SHA eae386cView commit details -
All variants are now targeting Java 8 or higher
The support for Java versions < 8 in the Android variants has been removed. Jre and Android can now be distinguished by the 'org.gradle.jvm.environment' attribute only. The dependencies are also more similar now which allows some simplification. In particular the removal of the 'checker-compat-qual' dependency in the Android variants.
Configuration menu - View commit details
-
Copy full SHA for 4d05df4 - Browse repository at this point
Copy the full SHA 4d05df4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d00efa - Browse repository at this point
Copy the full SHA 0d00efaView commit details -
Configuration menu - View commit details
-
Copy full SHA for c14d55a - Browse repository at this point
Copy the full SHA c14d55aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f54f4d - Browse repository at this point
Copy the full SHA 5f54f4dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 985d143 - Browse repository at this point
Copy the full SHA 985d143View commit details