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: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
strategy:
fail-fast: false
matrix:
jdk-version: [ 8, 11 ]
jdk-version: [25, 21, 17, 11, 8]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v2
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
java-version: "${{ matrix.jdk-version }}"
distribution: adopt
distribution: temurin
- name: Verify java installed properly
run: java -version
- name: Grant execute permission for gradlew
Expand All @@ -36,7 +36,7 @@ jobs:
run: |-
mkdir -p ~/junit
find . -type f -regex "./build/test-results/test/.*xml" -exec cp {} ~/junit/ \;
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v6
if: always()
with:
name: test_library_jdk${{ matrix.jdk-version }}_junit
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Java Client for GoCardless Pro API
# Java Client for GoCardless API

This library provides a simple wrapper around the [GoCardless API](http://developer.gocardless.com/api-reference).

Expand Down
30 changes: 22 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ buildscript {

dependencies {
classpath 'ch.raffael.pegdown-doclet:pegdown-doclet:1.2.1'
// Only add Spotless if running on Java 11+
// TODO: Remove this when we drop support for Java 8
if (JavaVersion.current() >= JavaVersion.VERSION_11) {
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.25.0'
}
}
}

Expand All @@ -19,7 +24,6 @@ plugins {
id "signing"
id "maven-publish"
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
id "com.diffplug.spotless" version "5.12.5"
}

sourceCompatibility = 1.8
Expand All @@ -29,6 +33,13 @@ version = '7.6.0'

apply plugin: 'ch.raffael.pegdown-doclet'

// TODO: Remove this when we drop support for Java 8
// Conditionally apply Spotless plugin only on Java 11+
// (required because Spotless 6.x needs Java 11+ to load)
if (JavaVersion.current() >= JavaVersion.VERSION_11) {
apply plugin: 'com.diffplug.spotless'
}

repositories {
mavenCentral()
maven { url 'https://plugins.gradle.org/m2/' }
Expand Down Expand Up @@ -66,12 +77,12 @@ javadoc {

task javadocJar(type: Jar, dependsOn: javadoc) {
from tasks.javadoc.destinationDir
classifier = 'javadoc'
archiveClassifier = 'javadoc'
}

task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
archiveClassifier = 'sources'
}

publishing {
Expand Down Expand Up @@ -147,10 +158,13 @@ nexusPublishing {
}
}

spotless {
java {
importOrder()
removeUnusedImports()
eclipse().configFile("format.xml")
// Only configure Spotless if it was applied (Java 11+)
if (JavaVersion.current() >= JavaVersion.VERSION_11) {
spotless {
java {
importOrder()
removeUnusedImports()
eclipse().configFile("format.xml")
}
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip