Skip to content
Draft
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
16 changes: 15 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version: 2
updates:
# Java dependencies
- package-ecosystem: gradle
directory: "/"
schedule:
Expand All @@ -8,4 +9,17 @@ updates:
prefix: "[Dependabot]"
labels:
- "skip-release"
- "dependencies"
- "dependencies"
- "java"

# GitHub Actions dependencies
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 5
labels:
- "skip-release"
- "dependencies"
- "ci"
8 changes: 4 additions & 4 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ jobs:
acceptance-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ inputs.checkout_ref }}
- name: Setup JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'
cache: 'gradle'
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4
uses: gradle/actions/wrapper-validation@v5
- name: Acceptance tests in sandbox
env:
TL_CLIENT_ID: ${{ secrets.tl_client_id }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,22 @@ jobs:
matrix:
os: [ ubuntu-latest ]
java-distribution: [ temurin ]
java-version: [ 11, 17, 20, 21, 22, 23 ]
java-version: [ 17, 20, 23, 25 ]
runs-on: ${{ matrix.os }}
outputs:
project_version: ${{ steps.get_project_version.outputs.project_version }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ inputs.checkout_ref }}
- name: Setup JDK ${{ matrix.java }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.java-distribution }}
cache: 'gradle'
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4
uses: gradle/actions/wrapper-validation@v5
- name: Get project version
id: get_project_version
run: |
Expand All @@ -64,17 +64,17 @@ jobs:
name: Test coverage analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ inputs.checkout_ref }}
- name: Setup JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'
cache: 'gradle'
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4
uses: gradle/actions/wrapper-validation@v5
- name: Test coverage
run: ./gradlew unit-tests jacocoTestReport coveralls
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ jobs:
name: Release to Maven Central
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ inputs.checkout_ref }}
- name: Setup JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'
cache: 'gradle'
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4
uses: gradle/actions/wrapper-validation@v5
- name: Create Snapshot version
run: |
CHECKOUT_REF=${{inputs.checkout_ref}}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/workflow-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
run:
working-directory: ./examples/${{ matrix.project-working-dir }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'
cache: 'gradle'
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4
uses: gradle/actions/wrapper-validation@v5
- name: Lint
run: ./gradlew spotlessJavaCheck
- name: Build
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/workflow-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ jobs:
runs-on: ubuntu-latest
needs: [build-test-coverage, acceptance-tests]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.ref }}
- name: Setup JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '21'
java-version: '25'
distribution: 'temurin'
cache: 'gradle'
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4
uses: gradle/actions/wrapper-validation@v5
- name: Create tag
id: create_tag
uses: mathieudutour/github-tag-action@v6.1
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/).

## [17.6.0] - 2025-x-x
### Added
* New ProviderSelection builder method on the StartAuthorizationFlowRequest builder
* New Icon object to ProviderSelection in authorization flow requests
* New Consent type properties within the authorization flow request

### Changed
* ⚠️ Deprecated `withProviderSelection()` flag on authorization flow request builder
* Various dependency updates

## [17.5.1] - 2025-10-31
### Fixed
* Update Sonatype Central badge url in order to show latest version
Expand Down
56 changes: 34 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import com.vanniktech.maven.publish.JavadocJar
plugins {
id 'java-library'
// to unleash the lombok magic
id "io.freefair.lombok" version "8.13.1"
id "io.freefair.lombok" version "9.1.0"
// to make our tests output more fancy
id 'com.adarshr.test-logger' version '4.0.0'
// code linting
id "com.diffplug.spotless" version "7.0.3"
id "com.diffplug.spotless" version "8.1.0"
// test coverage
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.12.2'
Expand Down Expand Up @@ -58,7 +58,17 @@ testlogger {
theme 'mocha'
}

tasks.withType(Test).configureEach {
testlogger {
theme 'mocha'
}
}

tasks.register('unit-tests', Test) {
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath

dependsOn testClasses
outputs.upToDateWhen { false }
useJUnitPlatform{
excludeTags "integration"
Expand All @@ -67,13 +77,21 @@ tasks.register('unit-tests', Test) {
}

tasks.register('integration-tests', Test) {
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath

dependsOn testClasses
outputs.upToDateWhen { false }
useJUnitPlatform{
includeTags "integration"
}
}

tasks.register('acceptance-tests', Test) {
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath

dependsOn testClasses
outputs.upToDateWhen { false }
useJUnitPlatform{
includeTags "acceptance"
Expand All @@ -84,46 +102,40 @@ tasks.register('acceptance-tests', Test) {

dependencies {
// Utilities
implementation group: 'org.apache.commons', name: 'commons-configuration2', version: '2.11.0'
implementation group: 'org.apache.commons', name: 'commons-configuration2', version: '2.13.0'

// HTTP client
def retrofitVersion = '2.9.0'
def retrofitVersion = '3.0.0'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is huge and to be validated. They have updated the underlying OkHTTP version

implementation group: 'com.squareup.retrofit2', name: 'retrofit', version: retrofitVersion
implementation group: 'com.squareup.retrofit2', name: 'converter-jackson', version: retrofitVersion

// TL signing library
implementation group: 'com.truelayer', name: 'truelayer-signing', version: '0.2.6'

// Serialization
def jacksonVersion = '2.14.1'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: jacksonVersion
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: jacksonVersion
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: jacksonVersion
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: jacksonVersion
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jacksonVersion
def jacksonVersion = '3.0.3'
implementation group: 'tools.jackson.core', name: 'jackson-core', version: jacksonVersion
implementation group: 'tools.jackson.core', name: 'jackson-databind', version: jacksonVersion
def jacksonDatatypeVersion = '2.20.1'
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: jacksonDatatypeVersion
implementation group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: jacksonDatatypeVersion
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.20'

// Logging
def tinyLogVersion = '2.5.0'
def tinyLogVersion = '2.7.0'
implementation group: 'org.tinylog', name: 'tinylog-api', version: tinyLogVersion
implementation group: 'org.tinylog', name: 'tinylog-impl', version: tinyLogVersion

// JUnit test framework.
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.12.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '6.0.1'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

// Mocking libraries
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.17.0'
testImplementation group: 'org.wiremock', name: 'wiremock', version: '3.12.1'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.21.0'
testImplementation group: 'org.wiremock', name: 'wiremock', version: '3.13.2'

// Wait test utility
testImplementation group: 'org.awaitility', name: 'awaitility', version: '4.3.0'

// Transitive dependencies constraints
constraints {
implementation('com.squareup.okhttp3:okhttp:4.12.0') {
because 'version 3.14.9 used by com.squareup.retrofit2:retrofit:2.9.0 has known vulnerabilities'
}
}
}

jacocoTestReport {
Expand All @@ -132,7 +144,7 @@ jacocoTestReport {
xml.required = true
html.required = true
}
getExecutionData().setFrom(fileTree(buildDir).include("/jacoco/unit-tests.exec"))
getExecutionData().setFrom(fileTree(rootProject.layout.buildDirectory).include("/jacoco/unit-tests.exec"))
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Main properties
group=com.truelayer
archivesBaseName=truelayer-java
version=17.5.1
version=18.0.0

# Artifacts properties
project_name=TrueLayer Java
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/truelayer/java/entities/ResourceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
@RequiredArgsConstructor
@Getter
public enum ResourceType {
// TODO: can this be deprecated? We should leverage the HPP URI generated by the payments-gateway instead.
// note that deprecating would probably mean creating a new type for our test utils
PAYMENT("payments", "payment_id", HPP),
Comment on lines +12 to 14
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO


MANDATE("mandates", "mandate_id", HPP),
PAYOUT("payouts", "payout_id", HP2),
;
PAYOUT("payouts", "payout_id", HP2);

private final String hppLinkPath;
private final String hppLinkQueryParameter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,13 @@ public class CreatePaymentRequest {
* Optional field for sub-merchant details
*/
private SubMerchants subMerchants;

/**
* Optional field for configuring the authorization flow
*/
private StartAuthorizationFlowRequest authorizationFlow;

// TODO: hosted page

// TODO: user consent
}
Loading
Loading