Skip to content

Commit

Permalink
Put the versions of dependencies directly in Gradle Metadata
Browse files Browse the repository at this point in the history
This makes the version handling in POM and Gradle Metadata more similar.
See google#6654 (comment)
  • Loading branch information
jjohannes committed Aug 2, 2023
1 parent 36942e3 commit dff29bd
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 62 deletions.
12 changes: 8 additions & 4 deletions android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
<!-- Override this with -Dtest.include="**/SomeTest.java" on the CLI -->
<test.include>%regex[.*.class]</test.include>
<truth.version>1.1.3</truth.version>
<jsr305.version>3.0.2</jsr305.version>
<checker.version>3.33.0</checker.version>
<errorprone.version>2.18.0</errorprone.version>
<j2objc.version>2.8</j2objc.version>
<maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
<javac.version>9+181-r4173-1</javac.version>
<!-- Empty for all JDKs but 9-12 -->
Expand Down Expand Up @@ -302,22 +306,22 @@
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<version>${jsr305.version}</version>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
<version>3.33.0</version>
<version>${checker.version}</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.18.0</version>
<version>${errorprone.version}</version>
</dependency>
<dependency>
<groupId>com.google.j2objc</groupId>
<artifactId>j2objc-annotations</artifactId>
<version>2.8</version>
<version>${j2objc.version}</version>
</dependency>
<!-- We avoid using dependencyManagement for test-only deps because of https://github.com/google/guava/issues/6654 -->
</dependencies>
Expand Down
110 changes: 56 additions & 54 deletions guava/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@
"org.gradle.usage": "java-api"
},
"dependencies": [
{
"group": "com.google.guava",
"module": "guava-parent",
"version": {
"requires": "${pom.version}"
},
"attributes": {
"org.gradle.category": "platform"
}
},
{
"group": "com.google.guava",
"module": "failureaccess",
Expand All @@ -52,19 +42,31 @@
},
{
"group": "com.google.code.findbugs",
"module": "jsr305"
"module": "jsr305",
"version": {
"requires": "${jsr305.version}"
}
},
{
"group": "org.checkerframework",
"module": "checker-qual"
"module": "checker-qual",
"version": {
"requires": "${checker.version}"
}
},
{
"group": "com.google.errorprone",
"module": "error_prone_annotations"
"module": "error_prone_annotations",
"version": {
"requires": "${errorprone.version}"
}
},
{
"group": "com.google.j2objc",
"module": "j2objc-annotations"
"module": "j2objc-annotations",
"version": {
"requires": "${j2objc.version}"
}
}
],
"files": [
Expand Down Expand Up @@ -97,16 +99,6 @@
"org.gradle.usage": "java-runtime"
},
"dependencies": [
{
"group": "com.google.guava",
"module": "guava-parent",
"version": {
"requires": "${pom.version}"
},
"attributes": {
"org.gradle.category": "platform"
}
},
{
"group": "com.google.guava",
"module": "failureaccess",
Expand All @@ -123,15 +115,24 @@
},
{
"group": "com.google.code.findbugs",
"module": "jsr305"
"module": "jsr305",
"version": {
"requires": "${jsr305.version}"
}
},
{
"group": "org.checkerframework",
"module": "checker-qual"
"module": "checker-qual",
"version": {
"requires": "${checker.version}"
}
},
{
"group": "com.google.errorprone",
"module": "error_prone_annotations"
"module": "error_prone_annotations",
"version": {
"requires": "${errorprone.version}"
}
}
],
"files": [
Expand Down Expand Up @@ -164,16 +165,6 @@
"org.gradle.usage": "java-api"
},
"dependencies": [
{
"group": "com.google.guava",
"module": "guava-parent",
"version": {
"requires": "${otherVariant.version}"
},
"attributes": {
"org.gradle.category": "platform"
}
},
{
"group": "com.google.guava",
"module": "failureaccess",
Expand All @@ -190,19 +181,31 @@
},
{
"group": "com.google.code.findbugs",
"module": "jsr305"
"module": "jsr305",
"version": {
"requires": "${jsr305.version}"
}
},
{
"group": "org.checkerframework",
"module": "checker-qual"
"module": "checker-qual",
"version": {
"requires": "${checker.version}"
}
},
{
"group": "com.google.errorprone",
"module": "error_prone_annotations"
"module": "error_prone_annotations",
"version": {
"requires": "${errorprone.version}"
}
},
{
"group": "com.google.j2objc",
"module": "j2objc-annotations"
"module": "j2objc-annotations",
"version": {
"requires": "${j2objc.version}"
}
}
],
"files": [
Expand Down Expand Up @@ -235,16 +238,6 @@
"org.gradle.usage": "java-runtime"
},
"dependencies": [
{
"group": "com.google.guava",
"module": "guava-parent",
"version": {
"requires": "${otherVariant.version}"
},
"attributes": {
"org.gradle.category": "platform"
}
},
{
"group": "com.google.guava",
"module": "failureaccess",
Expand All @@ -261,15 +254,24 @@
},
{
"group": "com.google.code.findbugs",
"module": "jsr305"
"module": "jsr305",
"version": {
"requires": "${jsr305.version}"
}
},
{
"group": "org.checkerframework",
"module": "checker-qual"
"module": "checker-qual",
"version": {
"requires": "${checker.version}"
}
},
{
"group": "com.google.errorprone",
"module": "error_prone_annotations"
"module": "error_prone_annotations",
"version": {
"requires": "${errorprone.version}"
}
}
],
"files": [
Expand Down
12 changes: 8 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
<!-- Override this with -Dtest.include="**/SomeTest.java" on the CLI -->
<test.include>%regex[.*.class]</test.include>
<truth.version>1.1.3</truth.version>
<jsr305.version>3.0.2</jsr305.version>
<checker.version>3.33.0</checker.version>
<errorprone.version>2.18.0</errorprone.version>
<j2objc.version>2.8</j2objc.version>
<maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
<javac.version>9+181-r4173-1</javac.version>
<!-- Empty for all JDKs but 9-12 -->
Expand Down Expand Up @@ -296,22 +300,22 @@
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<version>${jsr305.version}</version>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
<version>3.33.0</version>
<version>${checker.version}</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.18.0</version>
<version>${errorprone.version}</version>
</dependency>
<dependency>
<groupId>com.google.j2objc</groupId>
<artifactId>j2objc-annotations</artifactId>
<version>2.8</version>
<version>${j2objc.version}</version>
</dependency>
<!-- We avoid using dependencyManagement for test-only deps because of https://github.com/google/guava/issues/6654 -->
</dependencies>
Expand Down

0 comments on commit dff29bd

Please sign in to comment.