Skip to content

Commit

Permalink
fix: new java format dependencies and linter fix (#768)
Browse files Browse the repository at this point in the history
This fixes three current build issues due to version updates: 
1. java-format got additional dependencies starting version 1.9: **auto-value-annotations** and **auto-service-annotations**
2. java-format requires JRE v11+ to run. Updating ci.yaml for that. google/google-java-format#529
3. Guava drops java7 support from v31, therefore disabling unit tests for java7
  • Loading branch information
TimurSadykov authored Nov 9, 2021
1 parent 2c90edd commit 9df1cd7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docker:
image: gcr.io/repo-automation-bots/owlbot-java:latest
digest: sha256:204b7af96e6d481f19b0ff377aa379d46bc56dd06e1cc7c523f361dd9cbfeeaa
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
digest: sha256:a3ac08d167454718ff057b97a1950d3cb5e16fc39fb3f355d90276285a6cac75
2 changes: 0 additions & 2 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ branchProtectionRules:
requiresStrictStatusChecks: false
requiredStatusCheckContexts:
- checkstyle
- units (7)
- units (8)
- units (11)
- dependencies (8)
Expand All @@ -24,7 +23,6 @@ branchProtectionRules:
requiresStrictStatusChecks: false
requiredStatusCheckContexts:
- checkstyle
- units (7)
- units (8)
- units (11)
- dependencies (8)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [7, 8, 11]
java: [8, 11, 17]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
Expand All @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11]
java: [8, 11, 17]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
Expand All @@ -50,7 +50,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
java-version: 11
- run: java -version
- run: .kokoro/build.sh
env:
Expand Down
10 changes: 7 additions & 3 deletions .kokoro/release/publish_javadoc11.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ mvn clean install -B -q -DskipTests=true
export NAME=google-oauth-client
export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)

# cloud RAD generation
mvn clean javadoc:aggregate -B -q -P docFX
# include CHANGELOG
# V3 generates docfx yml from javadoc
# generate yml
mvn clean site -B -q -P docFX

# copy README to docfx-yml dir and rename index.md
cp README.md target/docfx-yml/index.md
# copy CHANGELOG to docfx-yml dir and rename history.md
cp CHANGELOG.md target/docfx-yml/history.md

pushd target/docfx-yml
Expand Down
14 changes: 13 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,16 @@
<artifactId>datanucleus-rdbms</artifactId>
<version>${project.datanucleus-rdbms.version}</version>
</dependency>
<dependency>
<groupId>com.google.auto.service</groupId>
<artifactId>${project.auto-service-annotations.version}</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>${project.auto-value-annotations.version}</artifactId>
<version>1.8.2</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -463,7 +473,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.http.version>1.40.1</project.http.version>
<project.jsr305.version>3.0.2</project.jsr305.version>
<project.guava.version>30.1-android</project.guava.version>
<project.guava.version>31.0-android</project.guava.version>
<project.xpp3.version>1.1.4c</project.xpp3.version>
<project.commons-logging.version>1.1.1</project.commons-logging.version>
<project.jdo2-api.version>2.3-eb</project.jdo2-api.version>
Expand All @@ -473,6 +483,8 @@
<project.datanucleus-rdbms.version>3.2.13</project.datanucleus-rdbms.version>
<project.datanucleus-maven-plugin.version>4.0.5</project.datanucleus-maven-plugin.version>
<project.servlet-api.version>2.5</project.servlet-api.version>
<project.auto-value-annotations.version>1.8.2</project.auto-value-annotations.version>
<project.auto-service-annotations.version>1.0</project.auto-service-annotations.version>
<deploy.autorelease>false</deploy.autorelease>
</properties>

Expand Down

0 comments on commit 9df1cd7

Please sign in to comment.