Skip to content

Commit

Permalink
Merge pull request #357 from gessnerfl/dependency_update
Browse files Browse the repository at this point in the history
  • Loading branch information
gessnerfl authored Dec 27, 2023
2 parents 76e5d31 + b3f1d35 commit 95fa9de
Show file tree
Hide file tree
Showing 22 changed files with 6,487 additions and 15,903 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 17
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ jobs:
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 17

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-extended,security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/dependency-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 17
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 17
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
!gradle/wrapper/gradle-wrapper.jar
/gradle/
.qodana/
dist/

### STS ###
.apt_generated
Expand Down
27 changes: 17 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "pl.allegro.tech.build.axion-release" version "1.15.5"
id "org.springframework.boot" version "3.1.4"
id "pl.allegro.tech.build.axion-release" version "1.16.1"
id "org.springframework.boot" version "3.2.1"
id "org.sonarqube" version "4.4.1.3373"
id 'com.google.cloud.tools.jib' version '3.4.0'
id "com.github.node-gradle.node" version "7.0.1"
Expand Down Expand Up @@ -41,19 +41,19 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-mail")
implementation("commons-io:commons-io:2.14.0")
implementation("commons-io:commons-io:2.15.1")
implementation("org.yaml:snakeyaml:2.2")
implementation('org.flywaydb:flyway-core')
implementation("org.glassfish.jaxb:jaxb-runtime:4.0.3")
implementation("org.glassfish.jaxb:jaxb-runtime:4.0.4")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
implementation('org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0')
implementation('org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0')

runtimeOnly("com.h2database:h2:2.2.224")
runtimeOnly("io.micrometer:micrometer-registry-prometheus")

testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.ow2.asm:asm:9.6")
testImplementation("org.apache.commons:commons-lang3:3.13.0")
testImplementation("org.apache.commons:commons-lang3:3.14.0")
testImplementation("org.hamcrest:hamcrest-core:2.2")
}

Expand All @@ -72,6 +72,13 @@ node {
nodeProjectDir = file("${project.projectDir}/webapp")
}

tasks.register('webappClean', Delete) {
delete file("${project.projectDir}/webapp/build")
delete file("${project.projectDir}/webapp/dist")
delete file("${project.projectDir}/webapp/coverage")
}
clean.dependsOn webappClean

tasks.register('webappNpmBuild', NpmTask) {
dependsOn(npmInstall)
args = ["run", "build"]
Expand All @@ -84,14 +91,14 @@ tasks.register('webappNpmTest', NpmTask) {

tasks.register('copyStaticAssets', Copy) {
dependsOn(compileJava, compileTestJava, webappNpmTest, resolveMainClassName)
from(file('webapp/build'))
from(file('webapp/dist'))
into(file('build/resources/main/static/'))
exclude("index.html")
}

tasks.register('copyTemplateAssets', Copy) {
dependsOn(compileJava, compileTestJava, webappNpmTest, resolveMainClassName)
from(file('webapp/build/index.html'))
from(file('webapp/dist/index.html'))
into(file('build/resources/main/templates/'))
filter { line -> line.replaceAll(/(href|src)(=\")([^\"]+)(\")/, 'th:$1$2@{$3}$4').replaceAll(/(name="base-path"\s+)(content=")([^"]+)(")/, '$1th:$2@{$3}$4') }
}
Expand Down Expand Up @@ -119,7 +126,7 @@ sonar {
property "sonar.sources", "src/main,webapp/src"
property "sonar.test.inclusions", "src/test/**/*.*, webapp/src/**/*.spec.ts, webapp/src/**/*.spec.tsx"
property "sonar.javascript.lcov.reportPaths", "./webapp/coverage/lcov.info"
property "sonar.coverage.exclusions", "webapp/src/setupTests.ts, webapp/src/setupProxy.js"
property "sonar.coverage.exclusions", "webapp/src/setupTests.ts"
}
}

Expand All @@ -144,7 +151,7 @@ jacocoTestReport {

jib {
from {
image = 'amazoncorretto:17.0.8-al2023-headless'
image = 'amazoncorretto:17.0.9-al2023-headless'
container {
ports = ["8080", "8081", "8025"]
creationTime = 'USE_CURRENT_TIMESTAMP'
Expand Down
32 changes: 0 additions & 32 deletions qodana.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package de.gessnerfl.fakesmtp.smtp.server;

import com.sun.mail.util.BASE64DecoderStream;
import de.gessnerfl.fakesmtp.model.*;
import de.gessnerfl.fakesmtp.util.TimestampProvider;
import org.apache.commons.io.IOUtils;
import org.eclipse.angus.mail.util.BASE64DecoderStream;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

Expand Down
19 changes: 19 additions & 0 deletions webapp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<link rel="icon" href="/favicon.ico"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="theme-color" content="#000000"/>
<meta name="description"
content="Fake SMTP Server - SMTP Server which stores all received emails in an in-memory database and renders the emails in a web interface"
/>
<link rel="apple-touch-icon" href="/logo128.png"/>
<link rel="manifest" href="/manifest.json"/>
<title>Fake SMTP Server</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
21 changes: 21 additions & 0 deletions webapp/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export default {
//preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom',
transform: {
"^.+\\.tsx?$": "ts-jest"
},
setupFilesAfterEnv: ["@testing-library/jest-dom", "<rootDir>/src/setupTests.ts"],
moduleNameMapper: {
'\\.(gif|ttf|eot|svg|png)$': '<rootDir>/test/__mocks__/fileMock.js',
'\\.(css|less|sass|scss)$': 'identity-obj-proxy',
},
collectCoverageFrom: [
"src/**/*.{js,jsx,ts,tsx}",
"!<rootDir>/node_modules/",
"!src/setup-tests.ts"
],
coverageReporters: [
"text",
"lcov"
]
}
Loading

0 comments on commit 95fa9de

Please sign in to comment.