Skip to content

Commit

Permalink
Development: Update dependencies, change package name and modernize b…
Browse files Browse the repository at this point in the history
…uild.gradle
  • Loading branch information
krusche committed Dec 22, 2024
1 parent 9e712a2 commit 3aca21c
Show file tree
Hide file tree
Showing 238 changed files with 9,179 additions and 9,336 deletions.
4 changes: 2 additions & 2 deletions .run/Benchmarking (Server).run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<configuration default="false" name="Benchmarking (Server)" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<option name="ACTIVE_PROFILES" value="dev,local" />
<module name="Artemis-Benchmarking.main" />
<option name="SPRING_BOOT_MAIN_CLASS" value="de.tum.cit.ase.ArtemisBenchmarkingApp" />
<option name="SPRING_BOOT_MAIN_CLASS" value="de.tum.cit.aet.ArtemisBenchmarkingApp" />
<option name="VM_PARAMETERS" value="-XX:+ShowCodeDetailsInExceptionMessages -Duser.country=US -Duser.language=en -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>
2 changes: 1 addition & 1 deletion .run/Benchmarking (Server-Prod).run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration default="false" name="Benchmarking (Server-Prod)" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
<option name="ACTIVE_PROFILES" value="prod,local" />
<module name="Artemis-Benchmarking.main" />
<option name="SPRING_BOOT_MAIN_CLASS" value="de.tum.cit.ase.ArtemisBenchmarkingApp" />
<option name="SPRING_BOOT_MAIN_CLASS" value="de.tum.cit.aet.ArtemisBenchmarkingApp" />
<method v="2">
<option name="Make" enabled="true" />
</method>
Expand Down
130 changes: 53 additions & 77 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.gorylenko.GenerateGitPropertiesTask

plugins {
id "checkstyle"
id "java"
Expand All @@ -6,21 +8,21 @@ plugins {
id "eclipse"
id "jacoco"
id "org.springframework.boot"
id "com.google.cloud.tools.jib" version "3.4.2"
id "com.google.cloud.tools.jib" version "3.4.4"
id "com.gorylenko.gradle-git-properties" version "2.4.2"
id "org.openapi.generator" version "7.6.0"
id "com.github.node-gradle.node" version "7.0.2"
id "org.sonarqube" version "5.0.0.4638"
id "org.openapi.generator" version "7.10.0"
id "com.github.node-gradle.node" version "7.1.0"
id "org.sonarqube" version "6.0.1.5171"
id "com.diffplug.spotless" version "6.25.0"
id "com.github.andygoossens.gradle-modernizer-plugin" version "1.9.2"
id "com.github.andygoossens.gradle-modernizer-plugin" version "1.10.0"
id "org.liquibase.gradle" version "2.2.2"
// this allows us to find outdated dependencies via ./gradlew dependencyUpdates
id "com.github.ben-manes.versions" version "0.51.0"
// jhipster-needle-gradle-plugins - JHipster will add additional gradle plugins here
}

group = "de.tum.cit.ase"
version = "0.1.2"
group = "de.tum.cit.aet"
version = "0.1.3"

description = ""

Expand Down Expand Up @@ -54,7 +56,7 @@ apply from: "gradle/cache.gradle"
apply from: "gradle/liquibase.gradle"
// jhipster-needle-gradle-apply-from - JHipster will add additional gradle scripts to be applied here

if (project.hasProperty("prod") || project.hasProperty("gae")) {
if (project.hasProperty("prod")) {
apply from: "gradle/profile_prod.gradle"
} else {
apply from: "gradle/profile_dev.gradle"
Expand All @@ -64,20 +66,6 @@ if (project.hasProperty("war")) {
apply from: "gradle/war.gradle"
}

if (project.hasProperty("gae")) {
apply plugin: 'maven'
apply plugin: 'org.springframework.boot.experimental.thin-launcher'
apply plugin: 'io.spring.dependency-management'

dependencyManagement {
imports {
mavenBom "tech.jhipster:jhipster-dependencies:${jhipsterDependenciesVersion}"
}
}
appengineStage.dependsOn thinResolve
}


idea {
module {
excludeDirs += files("node_modules")
Expand Down Expand Up @@ -121,22 +109,23 @@ modernizer {


check.dependsOn integrationTest
task testReport(type: TestReport) {
destinationDirectory = file("$buildDir/reports/tests")
testResults.from(test)

tasks.register("testReport", TestReport) {
destinationDirectory.set(layout.buildDirectory.dir("reports/tests"))
testResults.from(tasks.named("test"))
}

task integrationTestReport(type: TestReport) {
destinationDirectory = file("$buildDir/reports/tests")
testResults.from(integrationTest)
tasks.register("integrationTestReport", TestReport) {
destinationDirectory.set(layout.buildDirectory.dir("reports/tests"))
testResults.from(tasks.named("integrationTest"))
}

gitProperties {
failOnNoGitDirectory = false
keys = ["git.branch", "git.commit.id.abbrev", "git.commit.id.describe"]
}

tasks.withType(com.gorylenko.GenerateGitPropertiesTask).configureEach {
tasks.withType(GenerateGitPropertiesTask).configureEach {
outputs.doNotCacheIf("Task is always executed") { true }
}

Expand All @@ -160,9 +149,7 @@ repositories {

dependencies {
// import JHipster dependencies BOM
if (!project.hasProperty("gae")) {
implementation platform("tech.jhipster:jhipster-dependencies:${jhipsterDependenciesVersion}")
}
implementation platform("tech.jhipster:jhipster-dependencies:${jhipsterDependenciesVersion}")

// Use ", version: jhipsterDependenciesVersion, changing: true" if you want
// to use a SNAPSHOT release instead of a stable release
Expand All @@ -174,16 +161,16 @@ dependencies {
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
testImplementation "org.testcontainers:junit-jupiter:${testcontainersVersion}"
testImplementation "org.testcontainers:testcontainers:${testcontainersVersion}"
implementation "org.springdoc:springdoc-openapi-starter-webmvc-api"
implementation "com.zaxxer:HikariCP"
implementation "org.apache.commons:commons-lang3"
implementation "org.springdoc:springdoc-openapi-starter-webmvc-api:2.7.0"
implementation "com.zaxxer:HikariCP:6.2.1"
implementation "org.apache.commons:commons-lang3:3.17.0"
implementation "org.openapitools:jackson-databind-nullable:${jacksonDatabindNullableVersion}"
// Openapi generator uses javax namespace for now https://github.com/OpenAPITools/openapi-generator/pull/13593
implementation "javax.annotation:javax.annotation-api:1.3.2"
implementation "javax.validation:validation-api:2.0.1.Final"
annotationProcessor "org.hibernate.orm:hibernate-jpamodelgen:${hibernateVersion}"
implementation "org.hibernate.orm:hibernate-core"
implementation "org.hibernate.validator:hibernate-validator"
implementation "org.hibernate.validator:hibernate-validator:8.0.2.Final"
implementation "org.mapstruct:mapstruct:${mapstructVersion}"
annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}"
Expand Down Expand Up @@ -214,38 +201,26 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-oauth2-resource-server:${springBootVersion}"
implementation "org.springframework.security:spring-security-data:${springSecurityVersion}"

implementation "io.micrometer:micrometer-registry-prometheus:1.13.0"
implementation "io.dropwizard.metrics:metrics-core"
implementation "io.micrometer:micrometer-registry-prometheus:1.14.2"
implementation "io.dropwizard.metrics:metrics-core:4.2.29"
implementation "org.springframework.security:spring-security-messaging:${springSecurityVersion}"
implementation "commons-io:commons-io:2.16.1"
implementation "commons-io:commons-io:2.18.0"
implementation "com.thedeanda:lorem:2.2"
implementation "org.eclipse.jgit:org.eclipse.jgit:6.9.0.202403050737-r"
implementation "io.reactivex.rxjava3:rxjava:3.1.8"
implementation 'io.netty:netty-resolver-dns-native-macos:4.1.100.Final:osx-aarch_64'
implementation "org.eclipse.jgit:org.eclipse.jgit:7.1.0.202411261347-r"
implementation "io.reactivex.rxjava3:rxjava:3.1.10"
implementation 'io.netty:netty-resolver-dns-native-macos:4.1.116.Final:osx-aarch_64'
implementation 'com.opencsv:opencsv:5.9'
}

if (project.hasProperty("gae")) {
task createPom {
def basePath = 'build/resources/main/META-INF/maven'
doLast {
pom {
withXml(dependencyManagement.pomConfigurer)
}.writeTo("${basePath}/${project.group}/${project.name}/pom.xml")
}
}
bootJar.dependsOn = [createPom]
}

task cleanResources(type: Delete) {
delete "build/resources"
tasks.register("cleanResources", Delete) {
delete(layout.buildDirectory.dir("resources"))
}

wrapper {
gradleVersion = "8.7"
gradleVersion = "8.12"
}

task webapp_test(type: NpmTask) {
tasks.register("webapp_test", NpmTask) {
inputs.property('appVersion', project.version)
inputs.files("package-lock.json")
.withPropertyName('package-lock')
Expand All @@ -270,30 +245,29 @@ task webapp_test(type: NpmTask) {
outputs.file("build/test-results/clover.xml")
.withPropertyName("clover-result")

dependsOn npmInstall,compileTestJava
dependsOn(tasks.named("npmInstall"), tasks.named("compileTestJava"))
args = ["run", "webapp:test"]
}

if (project.hasProperty("nodeInstall")) {
node {
version = "20.10.0"
npmVersion = "10.2.4"
download = true
}
node {
download = true
version = "${node_version}"
npmVersion = "${npm_version}"
}

// Copy local node and npm to a fixed location for npmw
def fixedNode = tasks.register("fixedNode", Copy) {
from nodeSetup
into 'build/node'
}
tasks.named("nodeSetup").configure { finalizedBy fixedNode }
// Copy local node and npm to a fixed location for npmw
def fixedNode = tasks.register("fixedNode", Copy) {
from nodeSetup
into 'build/node'
}
tasks.named("nodeSetup").configure { finalizedBy fixedNode }

def fixedNpm = tasks.register("fixedNpm", Copy) {
from npmSetup
into 'build/node'
}
tasks.named("npmSetup").configure { finalizedBy fixedNpm }
def fixedNpm = tasks.register("fixedNpm", Copy) {
from npmSetup
into 'build/node'
}
tasks.named("npmSetup").configure { finalizedBy fixedNpm }


test.dependsOn webapp_test
compileJava.dependsOn processResources
Expand All @@ -317,4 +291,6 @@ tasks.named("dependencyUpdates").configure {

// Available commands:
//
// 1) Find dependency updates: ./gradlew dependencyUpdates -Drevision=release
// 1) Build production: ./gradlew -Pprod -Pwar clean bootWar
// 2) Execute tests without coverage report: ./gradlew test -x webapp
// 3) Find dependency updates: ./gradlew dependencyUpdates -Drevision=release
22 changes: 13 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
rootProject.name=artemis-benchmarking
profile=dev

# Build properties
node_version=22.12.0
npm_version=10.9.0

# Dependency versions
jhipsterDependenciesVersion=8.4.0
jhipsterDependenciesVersion=8.7.2
# The spring-boot version should match the one managed by
# https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/8.4.0
springBootVersion=3.3.0
springSecurityVersion=6.3.0
springBootVersion=3.4.1
springSecurityVersion=6.4.2
# The hibernate version should match the one managed by
# https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/3.3.0 -->
hibernateVersion=6.5.2.Final
mapstructVersion=1.5.5.Final
hibernateVersion=6.6.4.Final
mapstructVersion=1.6.3
archunitJunit5Version=1.3.0
jacksonDatabindNullableVersion=0.2.6
hazelcastSpringVersion=5.4.0
mysqlVersion=8.4.0
testcontainersVersion=1.19.8
hazelcastSpringVersion=5.5.0
mysqlVersion=9.1.0
testcontainersVersion=1.20.4


jaxbRuntimeVersion=4.0.4
Expand All @@ -32,7 +36,7 @@ modernizerPluginVersion=1.9.0

liquibaseTaskPrefix=liquibase
liquibasePluginVersion=2.2.1
liquibaseVersion=4.28.0
liquibaseVersion=4.30.0
# jhipster-needle-gradle-property - JHipster will add additional properties here

## below are some of the gradle performance improvement settings that can be used as required, these are not enabled by default
Expand Down
2 changes: 1 addition & 1 deletion gradle/docker.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
jib {
from {
image = "eclipse-temurin:17-jre-focal"
image = "eclipse-temurin:21-jre-focal"
platforms {
platform {
architecture = "${findProperty('jibArchitecture') ?: 'amd64'}"
Expand Down
2 changes: 1 addition & 1 deletion gradle/liquibase.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ configurations {
resolutionStrategy {
// Inherited version from Spring Boot can't be used because of regressions:
// To be removed as soon as spring-boot use the same version
force 'org.liquibase:liquibase-core:4.24.0'
force "org.liquibase:liquibase-core:${liquibaseVersion}"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 3aca21c

Please sign in to comment.