11plugins {
22 id ' java-library'
3+ id ' nu.studer.credentials' version ' 1.0.7'
4+ id ' maven'
5+ id ' signing'
36}
47
58group ' org.firebirdsql'
@@ -12,15 +15,18 @@ ext {
1215 testContainersVersion = ' 1.11.3'
1316 lombokVersion = ' 1.18.8'
1417 jaybirdVersion = ' 3.0.6'
18+
19+ isReleaseVersion = ! version. endsWith(" SNAPSHOT" )
20+ set(" signing.password" , credentials. " signing.password" )
21+ ossrhPassword = credentials. ossrhPassword
1522}
1623
1724repositories {
1825 mavenCentral()
1926}
2027
2128dependencies {
22- implementation platform(" org.testcontainers:testcontainers-bom:$testContainersVersion " )
23- implementation ' org.testcontainers:jdbc'
29+ api " org.testcontainers:jdbc:$testContainersVersion "
2430
2531 annotationProcessor " org.projectlombok:lombok:$lombokVersion "
2632 compileOnly " org.projectlombok:lombok:$lombokVersion "
@@ -32,3 +38,76 @@ dependencies {
3238 testImplementation ' commons-dbutils:commons-dbutils:1.6'
3339 testImplementation ' com.zaxxer:HikariCP:3.3.1'
3440}
41+
42+ jar {
43+ manifest {
44+ attributes(
45+ ' Implementation-Title' : project. name,
46+ ' Implementation-Version' : project. version,
47+ ' Automatic-Module-Name' : ' org.firebirdsql.testcontainers'
48+ )
49+ }
50+ }
51+
52+ task javadocJar (type : Jar ) {
53+ archiveClassifier = ' javadoc'
54+ from javadoc
55+ }
56+
57+ task sourcesJar (type : Jar ) {
58+ archiveClassifier = ' sources'
59+ from sourceSets. main. allSource
60+ }
61+
62+ artifacts {
63+ archives javadocJar, sourcesJar
64+ }
65+
66+ signing {
67+ required { isReleaseVersion && gradle. taskGraph. hasTask(" uploadArchives" ) }
68+ sign configurations. archives
69+ }
70+
71+ uploadArchives {
72+ repositories {
73+ mavenDeployer {
74+ beforeDeployment { MavenDeployment deployment -> signing. signPom(deployment) }
75+
76+ repository(url : " https://oss.sonatype.org/service/local/staging/deploy/maven2/" ) {
77+ authentication(userName : ossrhUsername, password : ossrhPassword)
78+ }
79+
80+ snapshotRepository(url : " https://oss.sonatype.org/content/repositories/snapshots/" ) {
81+ authentication(userName : ossrhUsername, password : ossrhPassword)
82+ }
83+
84+ pom. project {
85+ name ' firebird-testcontainers-java'
86+ packaging ' jar'
87+ description ' A module for Testcontainers.org to provide lightweight, throwaway instances of Firebird for JUnit tests.'
88+ url ' https://github.com/FirebirdSQL/firebird-testcontainers-java'
89+
90+ scm {
91+ connection ' scm:git:https://github.com/FirebirdSQL/firebird-testcontainers-java.git'
92+ developerConnection ' scm:git:git@github.com:FirebirdSQL/firebird-testcontainers-java.git'
93+ url ' https://github.com/FirebirdSQL/firebird-testcontainers-java'
94+ }
95+
96+ licenses {
97+ license {
98+ name ' The MIT License'
99+ url ' https://opensource.org/licenses/MIT'
100+ }
101+ }
102+
103+ developers {
104+ developer {
105+ id ' mrotteveel'
106+ name ' Mark Rotteveel'
107+ email ' mark@lawinegevaar.nl'
108+ }
109+ }
110+ }
111+ }
112+ }
113+ }
0 commit comments