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

update dependencies #28

Merged
merged 1 commit into from
Nov 21, 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
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: DWH Exporter Tests

on:
push:
branches:
- main
pull_request:
branches:
- main
paths-ignore:
- 'README.md'
workflow_call:

env:
NVD_API_TOKEN: ${{ secrets.NVD_API_KEY }} # Token to access NVD API for dependency-check

jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
container: openjdk:17-jdk-slim
steps:
- uses: actions/checkout@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: test
run: ./gradlew test

dependency-scan:
name: Dependency Scan
runs-on: ubuntu-latest
container: openjdk:17-jdk-slim
steps:
- uses: actions/checkout@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Scan dependencies
run: ./gradlew dependencyCheckAnalyze
35 changes: 17 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ plugins {
id 'org.springframework.boot' version "${springBootVersion}"
id 'java'
id 'idea'
id "org.cyclonedx.bom" version "1.7.4"
id "org.owasp.dependencycheck" version "8.4.0"
id "com.github.ben-manes.versions" version "0.49.0"
id "org.cyclonedx.bom" version "1.10.0"
id "org.owasp.dependencycheck" version "11.1.0"
id "com.github.ben-manes.versions" version "0.51.0"
}

apply plugin: 'io.spring.dependency-management'

group = 'de.novatec'
version = '2.2'
version = '2.3'

java {
sourceCompatibility = '17'
Expand All @@ -22,35 +22,30 @@ repositories {
mavenCentral()
}

test {
useJUnitPlatform()
}

// We only use snakeyaml transitively, but we want to force the
// current version due to existing CVEs.
// According to https://github.com/spring-projects/spring-boot/issues/34405
// this is a safe
ext['snakeyaml.version'] = '2.0'
ext['snakeyaml.version'] = '2.3'

dependencies {
annotationProcessor(
"org.projectlombok:lombok"
)

compileOnly(
"org.projectlombok:lombok"
)
annotationProcessor("org.projectlombok:lombok:${lombokVersion}")
compileOnly("org.projectlombok:lombok:${lombokVersion}")

implementation(
'org.springframework.boot:spring-boot-starter-web',
'org.springframework.boot:spring-boot-starter-actuator',
'org.springframework.boot:spring-boot-starter-validation',

'org.apache.commons:commons-text:1.10.0',
// If indluxdb-java is updated, check new version of the transitive dependency okio-jvm
// If there is a higher new version, remove the dependency override of okio-jvm
"org.apache.commons:commons-text:${commonsTextVersion}",
"org.influxdb:influxdb-java:${influxdbJavaVersion}",
// Override transitive dependency with newer version, due to security concerns
"com.squareup.okio:okio-jvm:${okioJvmVersion}",

)

testImplementation("org.springframework.boot:spring-boot-starter-test")
}

dependencyCheck {
Expand All @@ -61,6 +56,10 @@ dependencyCheck {
enabled = true
}
}
nvd {
apiKey = System.getenv("NVD_API_TOKEN")
delay = 10000
}
}

def isNonStable = { String candidate ->
Expand Down
11 changes: 6 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Spring Boot
springBootVersion=3.1.4
springBootVersion=3.3.5

# If indluxdb-java is updated, check new version of the transitive dependency okio-jvm
# If there is a higher new version, remove the dependency override of okio-jvm
influxdbJavaVersion=2.23
okioJvmVersion=3.5.0
influxdbJavaVersion=2.24

commonsTextVersion=1.12.0

lombokVersion=1.18.36
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.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
13 changes: 13 additions & 0 deletions src/test/java/de/novatec/dwhexport/ApplicationTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package de.novatec.dwhexport;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class ApplicationTest {

@Test
void contextLoads() {
System.out.println("Spring context loads");
}
}
Loading