Skip to content

Commit cbc5f1a

Browse files
authored
Update dependencies and fix formatting on Windows with Java 8 (#32)
* Update dependencies and fix formatting on Windows with Java 8 * Use explicit mvn test
1 parent 7bde04f commit cbc5f1a

8 files changed

Lines changed: 25 additions & 12 deletions

File tree

.github/workflows/maven.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
branches: [ master ]
1111

1212
jobs:
13-
build:
13+
test:
1414

1515
runs-on: ubuntu-latest
1616

@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/setup-java@v1
2121
with:
2222
java-version: 1.8
23-
- name: Build with Maven
23+
- name: Test with Maven
2424
env:
2525
TEST_CONFIGURATION_ACCESS_TOKEN: ${{ secrets.TEST_CONFIGURATION_ACCESS_TOKEN }}
26-
run: mvn -B package --file pom.xml
26+
run: mvn test

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ all: format test
55

66
.PHONY: fix
77
fix:
8-
find $(SRC) -type f -iname 'RegionPoint.java' -exec sed -i -e 's_@SerializedName(value = "\(X\|Y\)"_@SerializedName(value = "\l\1"_g' '{}' \;
8+
./scripts/fix-region-point.bash
99

1010
.PHONY: format
1111
format: fix
12-
find ./src -iname "*.java" | xargs java -jar tools/google-java-format-1.9-all-deps.jar --aosp --replace
13-
# Repeat for consistent formatting
14-
find ./src -iname "*.java" | xargs java -jar tools/google-java-format-1.9-all-deps.jar --aosp --replace
12+
./scripts/format.bash
1513

1614
.PHONY: format_tests
1715
format_tests:
@@ -27,4 +25,4 @@ publish: test
2725

2826
.PHONY: update
2927
update:
30-
echo "Not implemented"
28+
mvn versions:use-latest-releases

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@
206206
<maven.compiler.source>${java.version}</maven.compiler.source>
207207
<maven.compiler.target>${java.version}</maven.compiler.target>
208208
<gson-fire-version>1.8.5</gson-fire-version>
209-
<swagger-core-version>1.6.4</swagger-core-version>
209+
<swagger-core-version>1.6.6</swagger-core-version>
210210
<okhttp-version>2.7.5</okhttp-version>
211-
<gson-version>2.8.9</gson-version>
212-
<threetenbp-version>1.5.1</threetenbp-version>
211+
<gson-version>2.9.0</gson-version>
212+
<threetenbp-version>1.6.0</threetenbp-version>
213213
<maven-plugin-version>1.0.0</maven-plugin-version>
214214
<junit-version>4.13.2</junit-version>
215215
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash
2-
32
set -euo pipefail
43

54
sed -n '/^```java/,/^```/ p' < README.md | sed '/^```/ d'

scripts/fix-region-point.bash

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
#
3+
# Put @SerializedName value to lower case for 'X' and 'Y'
4+
#
5+
set -euo pipefail
6+
7+
find ./src -type f -iname 'RegionPoint.java' -exec sed -i -e 's_@SerializedName(value = "\(X\|Y\)"_@SerializedName(value = "\l\1"_g' '{}' \;

scripts/format.bash

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
#
3+
# Format java code using https://github.com/google/google-java-format/releases
4+
#
5+
set -euo pipefail
6+
7+
find ./src -iname "*.java" -print0 | xargs -0 java -jar tools/google-java-format-1.7-all-deps.jar --aosp --replace
8+
# Repeat for consistent formatting
9+
find ./src -iname "*.java" -print0 | xargs -0 java -jar tools/google-java-format-1.7-all-deps.jar --aosp --replace
5.81 MB
Binary file not shown.
-3.25 MB
Binary file not shown.

0 commit comments

Comments
 (0)