Skip to content

Commit

Permalink
Fixed snyk test
Browse files Browse the repository at this point in the history
  • Loading branch information
blootsvoets committed Jul 3, 2023
1 parent b1ddf90 commit a5cf68c
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.25.0
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
SNYK-JAVA-ORGJETBRAINSKOTLIN-2393744:
- '*':
reason: Not using createTempDir in Kotlin
expires: 2024-12-02T10:06:59.964Z
created: 2023-07-03T10:06:59.968Z
patch: {}
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ object Versions {
const val slf4j = "2.0.7"
const val confluent = "7.4.0"
const val kafka = "7.4.0-ce"
const val snappy = "1.1.10.1"
const val guava = "32.1.1-jre"
const val avro = "1.11.1"
const val jackson = "2.15.2"
const val okhttp = "4.11.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ interface RadarDependencyManagementExtension {
class RadarDependencyManagementPlugin : Plugin<Project> {
override fun apply(project: Project): Unit = with(project) {
val extension = extensions.create<RadarDependencyManagementExtension>("radarDependencies").apply {
regex.convention("(^[0-9,.v-]+(-r)?|RELEASE|FINAL|GA|-CE)$")
regex.convention("(^[0-9,.v-]+(-r)?|RELEASE|FINAL|GA|-CE|-JRE|-ANDROID)$")
rejectMajorVersionUpdates.convention(false)
}

Expand Down
8 changes: 7 additions & 1 deletion radar-commons-server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ dependencies {

api("org.apache.avro:avro:${Versions.avro}")

implementation("org.apache.kafka:kafka-clients:${Versions.kafka}")
implementation("org.apache.kafka:kafka-clients:${Versions.kafka}") {
runtimeOnly("org.xerial.snappy:snappy-java") {
version {
strictly(Versions.snappy)
}
}
}

testImplementation("org.mockito:mockito-core:${Versions.mockito}")
// Direct producer uses KafkaAvroSerializer if initialized
Expand Down
13 changes: 11 additions & 2 deletions radar-commons-testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,17 @@ dependencies {
implementation(platform("com.fasterxml.jackson:jackson-bom:${Versions.jackson}"))
implementation("com.fasterxml.jackson.core:jackson-databind")

implementation("org.apache.kafka:kafka-clients:${Versions.kafka}")
implementation("io.confluent:kafka-avro-serializer:${Versions.confluent}")
implementation("org.apache.kafka:kafka-clients:${Versions.kafka}") {
runtimeOnly("org.xerial.snappy:snappy-java") {
version {
strictly(Versions.snappy)
}
}
}

implementation("io.confluent:kafka-avro-serializer:${Versions.confluent}") {
runtimeOnly("com.google.guava:guava:${Versions.guava}")
}

implementation(platform("io.ktor:ktor-bom:${Versions.ktor}"))
implementation("io.ktor:ktor-serialization-kotlinx-json")
Expand Down
4 changes: 3 additions & 1 deletion radar-commons/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ repositories {

// In this section you declare the dependencies for your production and test code
dependencies {
api("org.apache.avro:avro:${Versions.avro}")
api("org.apache.avro:avro:${Versions.avro}") {
runtimeOnly("com.fasterxml.jackson.core:jackson-databind:${Versions.jackson}")
}
api(kotlin("reflect"))

implementation(project(":radar-commons-kotlin"))
Expand Down

0 comments on commit a5cf68c

Please sign in to comment.