60 lines
1.4 KiB
Groovy
60 lines
1.4 KiB
Groovy
plugins {
|
|
id 'org.springframework.pulsar.spring-module'
|
|
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
|
}
|
|
|
|
description = 'Spring Pulsar Caffeine Cache Provider'
|
|
|
|
dependencies {
|
|
api project (':spring-pulsar-cache-provider')
|
|
implementation 'com.github.ben-manes.caffeine:caffeine'
|
|
shadow project(':spring-pulsar-cache-provider')
|
|
}
|
|
|
|
jar {
|
|
archiveClassifier.set('original')
|
|
}
|
|
|
|
shadowJar {
|
|
archiveClassifier.set(null)
|
|
dependsOn(project.tasks.jar)
|
|
manifest {
|
|
inheritFrom project.tasks.jar.manifest
|
|
}
|
|
relocate 'com.github.benmanes.caffeine', 'org.springframework.pulsar.shade.com.github.benmanes.caffeine'
|
|
relocate 'com.google', 'org.springframework.pulsar.shade.com.google'
|
|
relocate 'org.checkerframework', 'org.springframework.pulsar.shade.org.checkerframework'
|
|
dependencies {
|
|
exclude(dependency {
|
|
!['com.github.ben-manes.caffeine', 'org.checkerframework', 'com.google.errorprone'].contains(it.moduleGroup)
|
|
})
|
|
}
|
|
}
|
|
|
|
tasks.build.dependsOn tasks.shadowJar
|
|
|
|
// delay the maven publishing - instead add shadowJar to the publication
|
|
components.java.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
|
|
skip()
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava {
|
|
artifact(shadowJar)
|
|
pom.withXml {
|
|
Node pomNode = asNode()
|
|
pomNode.dependencies.'*'.findAll() {
|
|
it.artifactId.text() == 'caffeine'
|
|
}.each() {
|
|
it.parent().remove(it)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
test {
|
|
testLogging.showStandardStreams = true
|
|
}
|