Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency management refactor #200

Merged
merged 4 commits into from
Sep 12, 2024
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
21 changes: 13 additions & 8 deletions authorisation-adjustment-example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
alias(libs.plugins.spring.framework)
alias(libs.plugins.spring.dependency)
id 'org.springframework.boot' version '3.1.4'
id 'io.spring.dependency-management' version '1.1.3'

id 'java'
}
Expand All @@ -12,18 +12,23 @@ sourceCompatibility = 17
targetCompatibility = 17

repositories {
mavenCentral()
mavenCentral()
}

dependencies {
implementation libs.adyen.java
implementation libs.bundles.spring
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect'
implementation 'com.adyen:adyen-java-api-library:23.0.1'

testImplementation(libs.bundles.spring.test){
exclude (group: 'org.junit.vintage', module: 'junit-vintage-engine')
developmentOnly 'org.springframework.boot:spring-boot-devtools'

testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}

}

test {
useJUnitPlatform()
useJUnitPlatform()
}
8 changes: 0 additions & 8 deletions authorisation-adjustment-example/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
rootProject.name = 'adyen-java-spring-online-payments-authorisation-adjustment'

dependencyResolutionManagement {
versionCatalogs {
libs {
from(files("../gradle/libs.versions.toml"))
}
}
}
21 changes: 13 additions & 8 deletions checkout-example-advanced/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
alias(libs.plugins.spring.framework)
alias(libs.plugins.spring.dependency)
id 'org.springframework.boot' version '3.1.4'
id 'io.spring.dependency-management' version '1.1.3'

id 'java'
}
Expand All @@ -12,18 +12,23 @@ sourceCompatibility = 17
targetCompatibility = 17

repositories {
mavenCentral()
mavenCentral()
}

dependencies {
implementation libs.adyen.java
implementation libs.bundles.spring
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect'
implementation 'com.adyen:adyen-java-api-library:23.0.1'

testImplementation(libs.bundles.spring.test){
exclude (group: 'org.junit.vintage', module: 'junit-vintage-engine')
developmentOnly 'org.springframework.boot:spring-boot-devtools'

testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}

}

test {
useJUnitPlatform()
useJUnitPlatform()
}
7 changes: 0 additions & 7 deletions checkout-example-advanced/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
rootProject.name = 'adyen-java-spring-online-payments-checkout-advanced'

dependencyResolutionManagement {
versionCatalogs {
libs {
from(files("../gradle/libs.versions.toml"))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public ResponseEntity<PaymentResponse> payments(@RequestHeader String host, @Req
paymentRequest.setReturnUrl(request.getScheme() + "://" + host + "/api/handleShopperRedirect?orderRef=" + orderRef);

paymentRequest.setAmount(amount);
// set lineItems required for some payment methods (ie Klarna)
// set countryCode and lineItems required for some payment methods (ie Klarna)
paymentRequest.setCountryCode("NL");
paymentRequest.setLineItems(Arrays.asList(
new LineItem().quantity(1L).amountIncludingTax(5000L).description("Sunglasses"),
new LineItem().quantity(1L).amountIncludingTax(5000L).description("Headphones"))
Expand Down
16 changes: 10 additions & 6 deletions checkout-example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
alias(libs.plugins.spring.framework)
alias(libs.plugins.spring.dependency)
id 'org.springframework.boot' version '3.1.4'
id 'io.spring.dependency-management' version '1.1.3'

id 'java'
}
Expand All @@ -16,11 +16,15 @@ repositories {
}

dependencies {
implementation libs.adyen.java
implementation libs.bundles.spring
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect'
implementation 'com.adyen:adyen-java-api-library:23.0.1'

testImplementation(libs.bundles.spring.test){
exclude (group: 'org.junit.vintage', module: 'junit-vintage-engine')
developmentOnly 'org.springframework.boot:spring-boot-devtools'

testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}

}
Expand Down
8 changes: 0 additions & 8 deletions checkout-example/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
rootProject.name = 'adyen-java-spring-online-payments-checkout'

dependencyResolutionManagement {
versionCatalogs {
libs {
from(files("../gradle/libs.versions.toml"))
}
}
}
21 changes: 13 additions & 8 deletions giftcard-example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
alias(libs.plugins.spring.framework)
alias(libs.plugins.spring.dependency)
id 'org.springframework.boot' version '3.1.4'
id 'io.spring.dependency-management' version '1.1.3'

id 'java'
}
Expand All @@ -12,18 +12,23 @@ sourceCompatibility = 17
targetCompatibility = 17

repositories {
mavenCentral()
mavenCentral()
}

dependencies {
implementation libs.adyen.java
implementation libs.bundles.spring
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect'
implementation 'com.adyen:adyen-java-api-library:23.0.1'

testImplementation(libs.bundles.spring.test){
exclude (group: 'org.junit.vintage', module: 'junit-vintage-engine')
developmentOnly 'org.springframework.boot:spring-boot-devtools'

testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}

}

test {
useJUnitPlatform()
useJUnitPlatform()
}
7 changes: 0 additions & 7 deletions giftcard-example/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
rootProject.name = 'adyen-java-spring-online-payments-giftcard'

dependencyResolutionManagement {
versionCatalogs {
libs {
from(files("../gradle/libs.versions.toml"))
}
}
}
17 changes: 11 additions & 6 deletions giving-example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
alias(libs.plugins.spring.framework)
alias(libs.plugins.spring.dependency)
id 'org.springframework.boot' version '3.1.4'
id 'io.spring.dependency-management' version '1.1.3'

id 'java'
}
Expand All @@ -16,12 +16,17 @@ repositories {
}

dependencies {
implementation libs.adyen.java
implementation libs.bundles.spring
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect'
implementation 'com.adyen:adyen-java-api-library:23.0.1'

testImplementation(libs.bundles.spring.test){
exclude (group: 'org.junit.vintage', module: 'junit-vintage-engine')
developmentOnly 'org.springframework.boot:spring-boot-devtools'

testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}

}

test {
Expand Down
7 changes: 0 additions & 7 deletions giving-example/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
rootProject.name = 'giving-example'

dependencyResolutionManagement {
versionCatalogs {
libs {
from(files("../gradle/libs.versions.toml"))
}
}
}
21 changes: 0 additions & 21 deletions gradle/libs.versions.toml

This file was deleted.

21 changes: 13 additions & 8 deletions in-person-payments-example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
alias(libs.plugins.spring.framework)
alias(libs.plugins.spring.dependency)
id 'org.springframework.boot' version '3.1.4'
id 'io.spring.dependency-management' version '1.1.3'

id 'java'
}
Expand All @@ -12,18 +12,23 @@ sourceCompatibility = 17
targetCompatibility = 17

repositories {
mavenCentral()
mavenCentral()
}

dependencies {
implementation libs.adyen.java
implementation libs.bundles.spring
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect'
implementation 'com.adyen:adyen-java-api-library:23.0.1'

testImplementation(libs.bundles.spring.test){
exclude (group: 'org.junit.vintage', module: 'junit-vintage-engine')
developmentOnly 'org.springframework.boot:spring-boot-devtools'

testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}

}

test {
useJUnitPlatform()
useJUnitPlatform()
}
7 changes: 0 additions & 7 deletions in-person-payments-example/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,2 @@
rootProject.name = 'adyen-java-spring-in-person-payments'

dependencyResolutionManagement {
versionCatalogs {
libs {
from(files("../gradle/libs.versions.toml"))
}
}
}
44 changes: 15 additions & 29 deletions paybylink-example/build.gradle
Original file line number Diff line number Diff line change
@@ -1,48 +1,34 @@
plugins {
alias(libs.plugins.spring.framework)
alias(libs.plugins.spring.dependency)
id 'org.springframework.boot' version '3.1.4'
id 'io.spring.dependency-management' version '1.1.3'

id 'java'

id "com.moowork.node" version "1.3.1"
}

group = 'com.adyen'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

sourceCompatibility = 17
targetCompatibility = 17

repositories {
mavenCentral()
}

dependencies {
implementation libs.adyen.java
implementation libs.bundles.spring
}

tasks.named('test') {
useJUnitPlatform()
}
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect'
implementation 'com.adyen:adyen-java-api-library:23.0.1'

developmentOnly 'org.springframework.boot:spring-boot-devtools'

tasks.register('myNpmInstall', Exec) {
workingDir 'src/main/js'
commandLine 'npm', 'install'
}

tasks.register('myNpmRun', Exec) {
workingDir 'src/main/js'
commandLine 'npm', 'run', 'dist'
}
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}

myNpmInstall {
dependsOn nodeSetup
}

myNpmRun {
dependsOn myNpmInstall
}

jar {
dependsOn myNpmRun
test {
useJUnitPlatform()
}
8 changes: 0 additions & 8 deletions paybylink-example/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
rootProject.name = 'paybylink-example'

dependencyResolutionManagement {
versionCatalogs {
libs {
from(files("../gradle/libs.versions.toml"))
}
}
}
Loading
Loading