Skip to content

Commit 2fc3cce

Browse files
authored
Java 11 support, release on push to main (#13)
1 parent 3591f9c commit 2fc3cce

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

.github/workflows/build-and-test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Build and Test
22
on:
3-
push:
3+
pull_request:
4+
branches:
5+
- main
46
workflow_call:
57

68
jobs:
@@ -49,7 +51,7 @@ jobs:
4951
uses: actions/setup-java@v4
5052
with:
5153
distribution: 'zulu'
52-
java-version: 17 # Java 16+ is required for jpostal
54+
java-version: 11
5355

5456
# install & build jpostal
5557
- name: Checkout jpostal

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Release
22

33
on:
4+
push:
5+
branches:
6+
- main
47
workflow_dispatch:
58

69
jobs:
@@ -32,7 +35,7 @@ jobs:
3235
uses: actions/setup-java@v4
3336
with:
3437
distribution: 'zulu'
35-
java-version: 17 # Java 16+ is required for jpostal
38+
java-version: 11
3639
- name: Checkout jpostal
3740
uses: actions/checkout@v4
3841
with:

build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plugins {
99
}
1010

1111
group = 'com.wherobots'
12-
version = '1.2.1-SNAPSHOT'
12+
version = '1.2.2-SNAPSHOT'
1313

1414
repositories {
1515
mavenCentral()
@@ -113,6 +113,8 @@ jar {
113113

114114

115115
java {
116+
sourceCompatibility = JavaVersion.VERSION_11
117+
targetCompatibility = JavaVersion.VERSION_11
116118
withJavadocJar()
117119
withSourcesJar()
118120
}

src/main/java/com/mapzen/jpostal/Config.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ public String toString() {
6464
public boolean equals(final Object o) {
6565
if (this == o) {
6666
return true;
67-
} else if (!(o instanceof Config other)) {
67+
} else if (!(o instanceof Config)) {
6868
return false;
6969
} else {
70+
Config other = (Config) o;
7071
return Objects.equals(this.dataDir, other.dataDir) &&
7172
Objects.equals(this.libraryFile, other.libraryFile);
7273
}

0 commit comments

Comments
 (0)