Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Java Tests

on:
push:
branches:
- '**'

jobs:
test:
uses: ./.github/workflows/test.yml
55 changes: 29 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,24 @@ name: Publish Java
on:
push:
tags:
- '*'
- '!**-dev**'
- '**'

jobs:
release:
runs-on: ubuntu-latest
needs: publish
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set Version
id: set_version
run: |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
shell: bash

- name: Create Release
run: |
gh release create ${{ env.VERSION }} --title "Release ${{ env.VERSION }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
uses: ./.github/workflows/test.yml

publish:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v6

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
java-version: '19'
distribution: 'adopt'
java-version: '17'
distribution: 'temurin'
server-id: central
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
Expand All @@ -54,3 +36,24 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

release:
runs-on: ubuntu-latest
needs: publish
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Set Version
id: set_version
run: |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
shell: bash

- name: Create Release
run: |
gh release create ${{ env.VERSION }} --title "Release ${{ env.VERSION }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Run Tests

on:
workflow_call:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [17, 21, 24]
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup Java ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'

- name: Run tests
run: make test
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
```bash
make test # Run unit tests (mvn test)
make integration-test # Run integration tests (requires SMARTY_AUTH_ID and SMARTY_AUTH_TOKEN env vars)
make compile # Clean, test, then compile
make compile # Clean, then compile
make clean # Clean and reset version files
make publish # Full publish workflow with version updates
```
Expand All @@ -24,7 +24,7 @@ mvn test -Dtest=ClientTest#testMethodName

## Architecture

This is the official SmartyStreets Java SDK for address validation and geocoding APIs. Requires Java 11+.
This is the official SmartyStreets Java SDK for address validation and geocoding APIs. Requires Java 17+.

### Dependencies

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test:
integration-test:
mvn integration-test

compile: clean test
compile: clean
mvn compile

publish: compile
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The official client libraries for accessing SmartyStreets APIs from Java (and JRE-based languages)

Compatible with Java 11 and later. Earlier Java versions supported by SDK version 3.10.7 and earlier.
Compatible with Java 17 and later.

You may have noticed this page is curiously sparse. Don't panic, there's [documentation](https://smartystreets.com/docs/sdk/java) and [examples](src/main/java/examples).

Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
</scm>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -95,7 +95,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<source>8</source>
<source>17</source>
</configuration>
<version>3.4.0</version>
<executions>
Expand Down Expand Up @@ -158,8 +158,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>11</source>
<target>11</target>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
Expand Down