@@ -18,6 +18,7 @@ plugins {
1818 checkstyle
1919 java
2020 jacoco
21+ id(" biz.aQute.bnd.builder" )
2122 id(" com.diffplug.spotless" )
2223 id(" com.github.spotbugs" )
2324 id(" com.github.vlsi.gradle-extensions" )
@@ -30,6 +31,7 @@ dependencies {
3031 compileOnly(" com.zaxxer:HikariCP:4.0.3" ) // Version 4.+ is compatible with Java 8
3132 compileOnly(" software.amazon.awssdk:secretsmanager:2.17.285" )
3233 compileOnly(" com.fasterxml.jackson.core:jackson-databind:2.13.4" )
34+ compileOnly(" org.osgi:org.osgi.core:4.3.0" )
3335
3436 testImplementation(" org.junit.platform:junit-platform-commons:1.9.0" )
3537 testImplementation(" org.junit.platform:junit-platform-engine:1.9.0" )
@@ -174,6 +176,24 @@ tasks.jar {
174176 into(" META-INF/services/" )
175177 }
176178
179+ bundle {
180+ bnd(
181+ """
182+ -exportcontents: software.*
183+ -removeheaders: Created-By
184+ Bundle-Description: Amazon Web Services (AWS) Advanced JDBC Wrapper Driver
185+ Bundle-DocURL: https://github.com/awslabs/aws-advanced-jdbc-wrapper
186+ Bundle-Vendor: Amazon Web Services (AWS)
187+ Import-Package: javax.sql, javax.transaction.xa, javax.naming, javax.security.sasl;resolution:=optional, *;resolution:=optional
188+ Bundle-Activator: software.amazon.jdbc.osgi.WrapperBundleActivator
189+ Bundle-SymbolicName: software.aws.rds
190+ Bundle-Name: Amazon Web Services (AWS) Advanced JDBC Wrapper Driver
191+ Bundle-Copyright: Copyright Amazon.com Inc. or affiliates.
192+ Require-Capability: osgi.ee;filter:="(&(|(osgi.ee=J2SE)(osgi.ee=JavaSE))(version>=1.8))"
193+ """
194+ )
195+ }
196+
177197 doFirst {
178198 mkdir(" ${buildDir} /META-INF/services/" )
179199 val driverFile = File (" ${buildDir} /META-INF/services/java.sql.Driver" )
0 commit comments