Skip to content

Commit

Permalink
Add slf4j which is the dep of cronutils (opensearch-project#256) (ope…
Browse files Browse the repository at this point in the history
…nsearch-project#257)

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
(cherry picked from commit 7dab8ea)

Co-authored-by: bowenlan-amzn <bowenlan23@gmail.com>
Signed-off-by: Prudhvi Godithi <pgodithi@amazon.com>
  • Loading branch information
2 people authored and prudhvigodithi committed May 9, 2023
1 parent 075f190 commit 3a762fe
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,26 @@ jacocoTestReport {
}
check.dependsOn jacocoTestReport

def slf4j_version_of_cronutils = "1.7.30"
dependencies {
compileOnly "org.opensearch:opensearch:${opensearch_version}"
// slf4j is the runtime dependency of cron-utils
// if cron-utils version gets bumped, pls check the slf4j version cron-utils depending on
// and bump if needed
implementation "com.cronutils:cron-utils:9.2.0"
runtimeOnly "org.slf4j:slf4j-api:${slf4j_version_of_cronutils}"

testImplementation "org.opensearch.test:framework:${opensearch_version}"
testImplementation "org.apache.logging.log4j:log4j-core:${versions.log4j}"
}

configurations.all {
if (it.state != Configuration.State.UNRESOLVED) return
resolutionStrategy {
force "org.slf4j:slf4j-api:${slf4j_version_of_cronutils}"
}
}

shadowJar {
relocate 'com.cronutils', 'org.opensearch.jobscheduler.repackage.com.cronutils'
relocate 'org.slf4j', 'org.opensearch.jobscheduler.repackage.org.slf4j' // dependency of cron-utils
Expand Down

0 comments on commit 3a762fe

Please sign in to comment.