From 0c3b798e8da3ed62a35e1dab046ab3c38ba2b332 Mon Sep 17 00:00:00 2001 From: Sander Hollaar Date: Mon, 19 Jun 2023 15:01:07 +0200 Subject: [PATCH] chore: bump dependencies for gradle 8 as gradle 4 is deprecated --- build.gradle | 28 ++++++++++--------- settings.gradle | 1 - .../privacybydesign/email/EmailProvider.java | 4 +-- .../privacybydesign/email/EmailRestApi.java | 8 +++--- .../privacybydesign/email/EmailSender.java | 4 +-- .../privacybydesign/email/EmailService.java | 2 +- src/main/resources/jetty-env.xml | 2 ++ 7 files changed, 26 insertions(+), 23 deletions(-) diff --git a/build.gradle b/build.gradle index 48b6048..3b182b5 100644 --- a/build.gradle +++ b/build.gradle @@ -2,9 +2,7 @@ group 'foundation.privacybydesign.email' version '1.1.0' apply plugin: 'war' -apply plugin: 'org.akhikhl.gretty' - -sourceCompatibility = 1.7 +apply plugin: 'org.gretty' buildscript { repositories { @@ -13,7 +11,7 @@ buildscript { } } dependencies { - classpath "gradle.plugin.org.akhikhl.gretty:gretty:1.4.2" + classpath "org.gretty:gretty:4.0.3" } } @@ -26,15 +24,19 @@ repositories { } dependencies { - compile 'org.glassfish.jersey.core:jersey-server:2.25' - compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.25' - compile 'ch.qos.logback:logback-classic:1.1.7' - compile 'com.sun.mail:javax.mail:1.5.6' - - compile 'org.irmacard.api:irma_api_common:1.2.2' - compile 'foundation.privacybydesign.common:irma_server_common:0.3.2' - - testCompile group: 'junit', name: 'junit', version: '4.12' + implementation 'ch.qos.logback:logback-classic:1.4.8' + implementation 'jakarta.ws.rs:jakarta.ws.rs-api:3.1.0' + implementation 'org.glassfish.jersey.core:jersey-server:3.1.2' + implementation 'org.glassfish.jersey.containers:jersey-container-servlet:3.1.2' + implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.7' + implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' + implementation group: 'com.sun.mail', name: 'jakarta.mail', version: '2.0.1' + implementation group: 'org.glassfish.jersey.inject', name: 'jersey-hk2', version: '3.1.2' + + implementation 'org.irmacard.api:irma_api_common:1.2.2' + implementation 'foundation.privacybydesign.common:irma_server_common:0.3.2' + + testImplementation group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.10.0-M1' } gretty { diff --git a/settings.gradle b/settings.gradle index 5857d8b..74a3877 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1 @@ rootProject.name = 'irma_email_issuer' - diff --git a/src/main/java/foundation/privacybydesign/email/EmailProvider.java b/src/main/java/foundation/privacybydesign/email/EmailProvider.java index 447ddfd..d0b6a5a 100644 --- a/src/main/java/foundation/privacybydesign/email/EmailProvider.java +++ b/src/main/java/foundation/privacybydesign/email/EmailProvider.java @@ -2,7 +2,7 @@ import foundation.privacybydesign.common.email.EmailTokens; -import javax.mail.internet.AddressException; +import jakarta.mail.internet.AddressException; /** * Test console application. Quite useless now, but was useful while writing @@ -23,4 +23,4 @@ public static void main(String[] args) throws AddressException { EmailSender.send(conf.getMailFrom(), "mail verification", mailBody); System.out.println("Done."); } -} \ No newline at end of file +} diff --git a/src/main/java/foundation/privacybydesign/email/EmailRestApi.java b/src/main/java/foundation/privacybydesign/email/EmailRestApi.java index 2876bc1..697f755 100644 --- a/src/main/java/foundation/privacybydesign/email/EmailRestApi.java +++ b/src/main/java/foundation/privacybydesign/email/EmailRestApi.java @@ -10,10 +10,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.mail.internet.AddressException; -import javax.ws.rs.*; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.mail.internet.AddressException; +import jakarta.ws.rs.*; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; diff --git a/src/main/java/foundation/privacybydesign/email/EmailSender.java b/src/main/java/foundation/privacybydesign/email/EmailSender.java index 27449f2..1c91644 100644 --- a/src/main/java/foundation/privacybydesign/email/EmailSender.java +++ b/src/main/java/foundation/privacybydesign/email/EmailSender.java @@ -4,8 +4,8 @@ import org.slf4j.LoggerFactory; import java.util.Properties; -import javax.mail.*; -import javax.mail.internet.*; +import jakarta.mail.*; +import jakarta.mail.internet.*; /** diff --git a/src/main/java/foundation/privacybydesign/email/EmailService.java b/src/main/java/foundation/privacybydesign/email/EmailService.java index af9ccf3..50a41f4 100644 --- a/src/main/java/foundation/privacybydesign/email/EmailService.java +++ b/src/main/java/foundation/privacybydesign/email/EmailService.java @@ -6,7 +6,7 @@ import org.glassfish.jersey.server.ResourceConfig; -import javax.ws.rs.*; +import jakarta.ws.rs.*; @ApplicationPath("/") public class EmailService extends ResourceConfig { diff --git a/src/main/resources/jetty-env.xml b/src/main/resources/jetty-env.xml index 60bc1c8..b12e446 100644 --- a/src/main/resources/jetty-env.xml +++ b/src/main/resources/jetty-env.xml @@ -1,4 +1,6 @@ + +