Skip to content

Commit

Permalink
[Tech] upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 committed May 8, 2024
1 parent 870d90a commit c064f48
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 36 deletions.
26 changes: 13 additions & 13 deletions backend/build.gradle.kts
@@ -1,10 +1,10 @@
plugins {
`java-library`
`maven-publish`
id("org.springframework.boot") version "3.2.0"
id("org.jetbrains.kotlin.plugin.spring") version "1.9.10"
id("org.springframework.boot") version "3.2.5"
id("org.jetbrains.kotlin.plugin.spring") version "1.9.23"
kotlin("jvm") version "1.9.10"
id("org.jetbrains.kotlin.plugin.allopen") version "1.9.10"
id("org.jetbrains.kotlin.plugin.allopen") version "1.9.23"
kotlin("plugin.noarg") version "1.9.10"
kotlin("plugin.jpa") version "1.9.10"
id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
Expand Down Expand Up @@ -41,12 +41,12 @@ tasks.named("compileKotlin", org.jetbrains.kotlin.gradle.tasks.KotlinCompilation
}

dependencies {
api("org.springframework.boot:spring-boot-starter-web:3.1.4")
api("org.springframework.boot:spring-boot-starter-web:3.2.5")
api("org.hibernate.validator:hibernate-validator:8.0.1.Final")
api("jakarta.validation:jakarta.validation-api:3.0.2")
api("org.springframework.boot:spring-boot-starter-actuator:3.1.4")
api("org.springframework.boot:spring-boot-starter-json:3.1.5")
api("org.springframework.boot:spring-boot-starter-security:3.1.4")
api("org.springframework.boot:spring-boot-starter-actuator:3.2.5")
api("org.springframework.boot:spring-boot-starter-json:3.2.5")
api("org.springframework.boot:spring-boot-starter-security:3.2.5")
api("org.springframework.boot:spring-boot-starter-data-jpa:3.2.5")
api("org.hibernate.orm:hibernate-spatial:6.2.9.Final")
api("com.fasterxml.jackson.module:jackson-module-kotlin:2.15.0")
Expand All @@ -55,33 +55,33 @@ dependencies {
api("org.flywaydb:flyway-core:9.22.0")
api("org.jetbrains.kotlin:kotlin-reflect:1.9.10")
api("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10")
api("org.springframework.boot:spring-boot-configuration-processor:3.2.0")
api("org.springframework.boot:spring-boot-configuration-processor:3.2.5")
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
api("com.neovisionaries:nv-i18n:1.29")
api("org.http4k:http4k-client-apache:5.10.4.0")
api("com.google.code.gson:gson:2.10.1")
api("org.springframework.boot:spring-boot-starter-cache:3.1.4")
api("org.springframework.boot:spring-boot-starter-cache:3.2.5")
api("com.github.ben-manes.caffeine:caffeine:3.1.5")
api("org.springframework.security:spring-security-test:6.1.5")
api("org.testcontainers:testcontainers:1.19.2")
api("io.hypersistence:hypersistence-utils-hibernate-62:3.5.2")
api("io.hypersistence:hypersistence-utils-hibernate-63:3.7.5")
api("org.assertj:assertj-core:3.24.2")
api("org.testcontainers:postgresql:1.19.2")
api("org.springframework.boot:spring-boot-starter-log4j2:3.1.4")
api("org.springframework.boot:spring-boot-starter-log4j2:3.2.5")
api("io.ktor:ktor-client-core-jvm:2.3.7")
api("io.ktor:ktor-client-java-jvm:2.3.7")
api("io.ktor:ktor-client-content-negotiation-jvm:2.3.7")
api("io.ktor:ktor-serialization-kotlinx-json-jvm:2.3.7")
api("io.sentry:sentry:6.31.0")
api("io.sentry:sentry-log4j2:6.31.0")
api("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0")
runtimeOnly("org.springframework.boot:spring-boot-devtools:3.1.4")
runtimeOnly("org.springframework.boot:spring-boot-devtools:3.2.5")
runtimeOnly("org.postgresql:postgresql:42.6.0")
testImplementation("io.ktor:ktor-client-mock-jvm:2.3.7")
testImplementation("jakarta.servlet:jakarta.servlet-api:6.0.0")
testImplementation("com.squareup.okhttp3:mockwebserver:4.10.0")
testImplementation("org.springframework.boot:spring-boot-starter-test:3.1.5")
testImplementation("org.springframework.boot:spring-boot-starter-test:3.2.5")
testImplementation("org.springframework.restdocs:spring-restdocs-mockmvc:3.0.0")
testImplementation("org.testcontainers:junit-jupiter:1.19.2")
testImplementation("net.java.dev.jna:jna:5.13.0")
Expand Down
Expand Up @@ -5,13 +5,13 @@ import fr.gouv.cacem.monitorenv.domain.entities.controlUnit.ControlUnitResourceE
import fr.gouv.cacem.monitorenv.domain.entities.controlUnit.ControlUnitResourceType
import fr.gouv.cacem.monitorenv.domain.entities.controlUnit.LegacyControlUnitResourceEntity
import fr.gouv.cacem.monitorenv.domain.use_cases.controlUnit.dtos.FullControlUnitResourceDTO
import io.hypersistence.utils.hibernate.type.basic.PostgreSQLEnumType
import jakarta.persistence.*
import org.hibernate.annotations.CreationTimestamp
import org.hibernate.annotations.Fetch
import org.hibernate.annotations.FetchMode
import org.hibernate.annotations.Type
import org.hibernate.annotations.JdbcType
import org.hibernate.annotations.UpdateTimestamp
import org.hibernate.dialect.PostgreSQLEnumJdbcType
import java.time.Instant

@Entity
Expand Down Expand Up @@ -47,7 +47,7 @@ data class ControlUnitResourceModel(

@Column(name = "type", nullable = false, columnDefinition = "control_unit_resource_type")
@Enumerated(EnumType.STRING)
@Type(PostgreSQLEnumType::class)
@JdbcType(PostgreSQLEnumJdbcType::class)
val type: ControlUnitResourceType,

@Column(name = "created_at_utc", nullable = false, updatable = false)
Expand Down
Expand Up @@ -12,7 +12,6 @@ import fr.gouv.cacem.monitorenv.domain.entities.mission.envAction.ActionTypeEnum
import fr.gouv.cacem.monitorenv.domain.entities.mission.envAction.EnvActionControlPlanEntity
import fr.gouv.cacem.monitorenv.domain.entities.mission.envAction.EnvActionEntity
import fr.gouv.cacem.monitorenv.domain.mappers.EnvActionMapper
import io.hypersistence.utils.hibernate.type.basic.PostgreSQLEnumType
import io.hypersistence.utils.hibernate.type.json.JsonBinaryType
import jakarta.persistence.CascadeType
import jakarta.persistence.Column
Expand All @@ -31,6 +30,7 @@ import org.hibernate.annotations.Fetch
import org.hibernate.annotations.FetchMode
import org.hibernate.annotations.JdbcType
import org.hibernate.annotations.Type
import org.hibernate.dialect.PostgreSQLEnumJdbcType
import org.hibernate.type.descriptor.jdbc.UUIDJdbcType
import org.locationtech.jts.geom.Geometry
import org.n52.jackson.datatype.jts.GeometryDeserializer
Expand All @@ -55,7 +55,7 @@ class EnvActionModel(
@Column(name = "completed_by") val completedBy: String? = null,
@Column(name = "completion", columnDefinition = "mission_action_completion")
@Enumerated(EnumType.STRING)
@Type(PostgreSQLEnumType::class)
@JdbcType(PostgreSQLEnumJdbcType::class)
val completion: ActionCompletionEnum? = null,
@JsonSerialize(using = GeometrySerializer::class)
@JsonDeserialize(contentUsing = GeometryDeserializer::class)
Expand Down
Expand Up @@ -11,16 +11,13 @@ import fr.gouv.cacem.monitorenv.domain.entities.mission.MissionSourceEnum
import fr.gouv.cacem.monitorenv.domain.entities.mission.MissionTypeEnum
import fr.gouv.cacem.monitorenv.domain.use_cases.missions.dtos.EnvActionAttachedToReportingIds
import fr.gouv.cacem.monitorenv.domain.use_cases.missions.dtos.MissionDTO
import io.hypersistence.utils.hibernate.type.array.ListArrayType
import io.hypersistence.utils.hibernate.type.array.internal.AbstractArrayType.SQL_ARRAY_TYPE
import io.hypersistence.utils.hibernate.type.basic.PostgreSQLEnumType
import jakarta.persistence.*
import jakarta.persistence.CascadeType
import jakarta.persistence.OrderBy
import jakarta.persistence.Table
import org.hibernate.Hibernate
import org.hibernate.annotations.*
import org.hibernate.annotations.Parameter
import org.hibernate.dialect.PostgreSQLEnumJdbcType
import org.locationtech.jts.geom.MultiPolygon
import org.n52.jackson.datatype.jts.GeometryDeserializer
import org.n52.jackson.datatype.jts.GeometrySerializer
Expand Down Expand Up @@ -185,13 +182,9 @@ class MissionModel(

@Column(name = "mission_source", nullable = false, columnDefinition = "mission_source_type")
@Enumerated(EnumType.STRING)
@Type(PostgreSQLEnumType::class)
@JdbcType(PostgreSQLEnumJdbcType::class)
val missionSource: MissionSourceEnum,

@Type(
ListArrayType::class,
parameters = [Parameter(name = SQL_ARRAY_TYPE, value = "text")],
)
@Column(name = "mission_types", columnDefinition = "text[]")
val missionTypes: List<MissionTypeEnum>,

Expand Down
Expand Up @@ -11,7 +11,6 @@ import fr.gouv.cacem.monitorenv.domain.entities.reporting.SourceTypeEnum
import fr.gouv.cacem.monitorenv.domain.entities.reporting.TargetDetailsEntity
import fr.gouv.cacem.monitorenv.domain.entities.reporting.TargetTypeEnum
import fr.gouv.cacem.monitorenv.domain.use_cases.reportings.dtos.ReportingDTO
import io.hypersistence.utils.hibernate.type.basic.PostgreSQLEnumType
import io.hypersistence.utils.hibernate.type.json.JsonBinaryType
import jakarta.persistence.CascadeType
import jakarta.persistence.Column
Expand All @@ -33,6 +32,7 @@ import org.hibernate.annotations.FetchMode
import org.hibernate.annotations.Generated
import org.hibernate.annotations.JdbcType
import org.hibernate.annotations.Type
import org.hibernate.dialect.PostgreSQLEnumJdbcType
import org.hibernate.generator.EventType
import org.hibernate.type.descriptor.jdbc.UUIDJdbcType
import org.locationtech.jts.geom.Geometry
Expand Down Expand Up @@ -61,7 +61,7 @@ class ReportingModel(

@Column(name = "source_type", columnDefinition = "reportings_source_type")
@Enumerated(EnumType.STRING)
@Type(PostgreSQLEnumType::class)
@JdbcType(PostgreSQLEnumJdbcType::class)
val sourceType: SourceTypeEnum? = null,

@ManyToOne(fetch = FetchType.LAZY)
Expand All @@ -79,12 +79,12 @@ class ReportingModel(

@Column(name = "target_type", columnDefinition = "reportings_target_type")
@Enumerated(EnumType.STRING)
@Type(PostgreSQLEnumType::class)
@JdbcType(PostgreSQLEnumJdbcType::class)
val targetType: TargetTypeEnum? = null,

@Column(name = "vehicle_type", columnDefinition = "reportings_vehicle_type")
@Enumerated(EnumType.STRING)
@Type(PostgreSQLEnumType::class)
@JdbcType(PostgreSQLEnumJdbcType::class)
val vehicleType: VehicleTypeEnum? = null,

@Column(name = "target_details", columnDefinition = "jsonb")
Expand All @@ -104,7 +104,7 @@ class ReportingModel(

@Column(name = "report_type", columnDefinition = "reportings_report_type")
@Enumerated(EnumType.STRING)
@Type(PostgreSQLEnumType::class)
@JdbcType(PostgreSQLEnumJdbcType::class)
val reportType: ReportingTypeEnum? = null,

@ManyToOne(fetch = FetchType.LAZY)
Expand Down
Expand Up @@ -56,17 +56,17 @@ interface IDBMissionRepository : JpaRepository<MissionModel, Int> {
:missionStatuses IS NULL
OR (
'UPCOMING' IN :missionStatuses AND (
mission.startDateTimeUtc >= now()
mission.startDateTimeUtc >= CAST(now() AS timestamp)
))
OR (
'PENDING' IN :missionStatuses AND (
(mission.endDateTimeUtc IS NULL OR mission.endDateTimeUtc >= now())
AND (mission.startDateTimeUtc <= now())
(mission.endDateTimeUtc IS NULL OR mission.endDateTimeUtc >= CAST(now() AS timestamp))
AND (mission.startDateTimeUtc <= CAST(now() AS timestamp))
)
)
OR (
'ENDED' IN :missionStatuses AND (
mission.endDateTimeUtc < now()
mission.endDateTimeUtc < CAST(now() AS timestamp)
)
)
)
Expand Down

0 comments on commit c064f48

Please sign in to comment.