11plugins {
2+ id ' java'
23 id ' java-library'
34 id ' maven-publish'
45 id ' signing'
5- id ' org.springframework.boot ' version ' 2.4.5 '
6- id ' io.spring.dependency-management ' version ' 1 .0.11.RELEASE '
6+ id ' com.github.johnrengelman.shadow ' version ' 7.0.0 '
7+ id ' io.freefair.lombok ' version ' 6 .0.0-m2 '
78 id ' io.github.gradle-nexus.publish-plugin' version ' 1.1.0'
89 id ' net.researchgate.release' version ' 2.8.1'
910 id ' com.github.ben-manes.versions' version ' 0.38.0'
@@ -25,34 +26,29 @@ repositories {
2526 mavenCentral()
2627}
2728
28- bootJar {
29- enabled = false
30- }
31-
32- jar {
33- enabled = true
34- }
35-
3629dependencies {
37- compileOnly ' org.projectlombok:lombok'
38- annotationProcessor ' org.projectlombok:lombok'
39- api ' org.junit.jupiter:junit-jupiter-api'
40- api ' org.junit.jupiter:junit-jupiter-engine'
41- api ' org.junit.jupiter:junit-jupiter-params'
42- api group : ' org.testcontainers' , name : ' testcontainers' , version : testcontainers_version
43- api group : ' org.testcontainers' , name : ' junit-jupiter' , version : testcontainers_version
44- implementation ' io.lettuce:lettuce-core:6.1.2.RELEASE'
45- testImplementation ' org.projectlombok:lombok'
46- testAnnotationProcessor ' org.projectlombok:lombok'
47- testImplementation ' org.slf4j:slf4j-simple'
30+ implementation group : ' org.testcontainers' , name : ' testcontainers' , version : testcontainers_version
31+ testImplementation ' org.junit.jupiter:junit-jupiter-api:5.7.2'
32+ testImplementation ' org.junit.jupiter:junit-jupiter-engine:5.7.2'
33+ testImplementation ' org.junit.jupiter:junit-jupiter-params:5.7.2'
34+ testImplementation group : ' org.testcontainers' , name : ' junit-jupiter' , version : testcontainers_version
35+ testImplementation ' org.slf4j:slf4j-simple:1.7.30'
4836 testImplementation ' com.redislabs:mesclun:1.3.3-SNAPSHOT'
4937}
5038
51- configurations. all {
52- resolutionStrategy. eachDependency { DependencyResolveDetails details ->
53- if (details. requested. group == ' io.lettuce' ) {
54- details. useVersion ' 6.2.0.BUILD-SNAPSHOT'
55- }
39+ shadowJar {
40+ archiveClassifier. set(' ' )
41+ dependencies {
42+ exclude(dependency(' com.fasterxml.jackson.core:jackson-annotations' ))
43+ exclude(dependency(' com.github.docker-java:docker-java-api' ))
44+ exclude(dependency(' com.github.docker-java:docker-java-transport' ))
45+ exclude(dependency(' com.github.docker-java:docker-java-transport-zerodep' ))
46+ exclude(dependency(' junit:junit' ))
47+ exclude(dependency(' net.java.dev.jna:jna' ))
48+ exclude(dependency(' org.apache.commons:commons-compress' ))
49+ exclude(dependency(' org.hamcrest:hamcrest-core' ))
50+ exclude(dependency(' org.rnorth.duct-tape:duct-tape' ))
51+ exclude(dependency(' org.slf4j:slf4j-api' ))
5652 }
5753}
5854
@@ -64,44 +60,47 @@ ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
6460
6561publishing {
6662 publications {
67- mavenJava(MavenPublication ) {
68- from(components. java)
69- versionMapping {
70- usage(' java-api' ) {
71- fromResolutionOf(' runtimeClasspath' )
72- }
73- usage(' java-runtime' ) {
74- fromResolutionResult()
75- }
76- }
77- pom {
78- name = ' Testcontainers Redis'
79- description = ' Redis modules for Testcontainers'
80- url = ' https://github.com/redis-developer/testcontainers-redis'
81- licenses {
82- license {
83- name = ' The Apache License, Version 2.0'
84- url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
85- }
86- }
87- developers {
88- developer {
89- id = ' jruaux'
90- name = ' Julien Ruaux'
91- }
92- }
93- scm {
94- connection = ' scm:git:git://github.com/redis-developer/testcontainers-redis'
95- developerConnection = ' scm:git:git@github.com:redis-developer/testcontainers-redis'
96- url = ' https://github.com/redis-developer/testcontainers-redis'
97- }
98- }
63+ shadow(MavenPublication ) { publication ->
64+ project. shadow. component(publication)
9965 }
66+ // mavenJava(MavenPublication) {
67+ // from(components.java)
68+ // versionMapping {
69+ // usage('java-api') {
70+ // fromResolutionOf('runtimeClasspath')
71+ // }
72+ // usage('java-runtime') {
73+ // fromResolutionResult()
74+ // }
75+ // }
76+ // pom {
77+ // name = 'Testcontainers Redis'
78+ // description = 'Redis modules for Testcontainers'
79+ // url = 'https://github.com/redis-developer/testcontainers-redis'
80+ // licenses {
81+ // license {
82+ // name = 'The Apache License, Version 2.0'
83+ // url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
84+ // }
85+ // }
86+ // developers {
87+ // developer {
88+ // id = 'jruaux'
89+ // name = 'Julien Ruaux'
90+ // }
91+ // }
92+ // scm {
93+ // connection = 'scm:git:git://github.com/redis-developer/testcontainers-redis'
94+ // developerConnection = 'scm:git:git@github.com:redis-developer/testcontainers-redis'
95+ // url = 'https://github.com/redis-developer/testcontainers-redis'
96+ // }
97+ // }
98+ // }
10099 }
101100}
102101
103102signing {
104- sign publishing. publications. mavenJava
103+ sign publishing. publications. shadow
105104}
106105
107106tasks. withType(Sign ) {
0 commit comments