mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
Merge pull request #499 from jitsi/feature/4.4/osgi
Make Smack jars OSGi bundles
This commit is contained in:
commit
a0f97707d8
5 changed files with 68 additions and 3 deletions
14
build.gradle
14
build.gradle
|
@ -7,6 +7,7 @@ buildscript {
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'org.kordamp.gradle:clirr-gradle-plugin:0.2.2'
|
classpath 'org.kordamp.gradle:clirr-gradle-plugin:0.2.2'
|
||||||
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1"
|
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.3.1"
|
||||||
|
classpath "biz.aQute.bnd:biz.aQute.bnd.gradle:6.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,6 +414,7 @@ subprojects {
|
||||||
apply plugin: 'signing'
|
apply plugin: 'signing'
|
||||||
apply plugin: 'checkstyle'
|
apply plugin: 'checkstyle'
|
||||||
apply plugin: 'org.kordamp.gradle.clirr'
|
apply plugin: 'org.kordamp.gradle.clirr'
|
||||||
|
apply plugin: 'biz.aQute.bnd.builder'
|
||||||
|
|
||||||
checkstyle {
|
checkstyle {
|
||||||
toolVersion = '8.27'
|
toolVersion = '8.27'
|
||||||
|
@ -575,9 +577,15 @@ project(':smack-omemo').clirr.enabled = false
|
||||||
project(':smack-omemo-signal').clirr.enabled = false
|
project(':smack-omemo-signal').clirr.enabled = false
|
||||||
|
|
||||||
subprojects*.jar {
|
subprojects*.jar {
|
||||||
manifest {
|
manifest {
|
||||||
from sharedManifest
|
from sharedManifest
|
||||||
}
|
}
|
||||||
|
bundle {
|
||||||
|
bnd(
|
||||||
|
'-removeheaders': 'Tool, Bnd-*',
|
||||||
|
'-exportcontents': '*',
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configure(subprojects - gplLicensedProjects) {
|
configure(subprojects - gplLicensedProjects) {
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
// Note that this is also declared in the main build.gradle for
|
||||||
|
// subprojects, but since evaluationDependsOnChildren is enabled we
|
||||||
|
// need to declare it here too to have bundle{bnd{...}} available
|
||||||
|
apply plugin: 'biz.aQute.bnd.builder'
|
||||||
|
|
||||||
description = """\
|
description = """\
|
||||||
Smack core components."""
|
Smack core components."""
|
||||||
|
|
||||||
|
@ -55,3 +60,11 @@ task createVersionResource(type: CreateFileTask) {
|
||||||
}
|
}
|
||||||
|
|
||||||
compileJava.dependsOn(createVersionResource)
|
compileJava.dependsOn(createVersionResource)
|
||||||
|
|
||||||
|
jar {
|
||||||
|
bundle {
|
||||||
|
bnd(
|
||||||
|
'DynamicImport-Package': '*',
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
// Note that this is also declared in the main build.gradle for
|
||||||
|
// subprojects, but since evaluationDependsOnChildren is enabled we
|
||||||
|
// need to declare it here too to have bundle{bnd{...}} available
|
||||||
|
apply plugin: 'biz.aQute.bnd.builder'
|
||||||
|
|
||||||
description = """\
|
description = """\
|
||||||
Smack XML parser using Stax."""
|
Smack XML parser using Stax."""
|
||||||
|
|
||||||
|
@ -5,3 +10,13 @@ dependencies {
|
||||||
compile project(':smack-xmlparser')
|
compile project(':smack-xmlparser')
|
||||||
//testCompile project(path: ":smack-xmlparser", configuration: "testRuntime")
|
//testCompile project(path: ":smack-xmlparser", configuration: "testRuntime")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
bundle {
|
||||||
|
bnd(
|
||||||
|
// see http://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.loader.html
|
||||||
|
'Require-Capability': 'osgi.extender;filter:="(osgi.extender=osgi.serviceloader.registrar)"',
|
||||||
|
'Provide-Capability': "osgi.serviceloader;osgi.serviceloader=org.jivesoftware.smack.xml.XmlPullParserFactory;register:=org.jivesoftware.smack.xml.stax.StaxXmlPullParserFactory",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
// Note that this is also declared in the main build.gradle for
|
||||||
|
// subprojects, but since evaluationDependsOnChildren is enabled we
|
||||||
|
// need to declare it here too to have bundle{bnd{...}} available
|
||||||
|
apply plugin: 'biz.aQute.bnd.builder'
|
||||||
|
|
||||||
description = """\
|
description = """\
|
||||||
Smack XML parser using XPP3."""
|
Smack XML parser using XPP3."""
|
||||||
|
|
||||||
|
@ -11,3 +16,13 @@ dependencies {
|
||||||
api project(':smack-xmlparser')
|
api project(':smack-xmlparser')
|
||||||
//testCompile project(path: ":smack-xmlparser", configuration: "testRuntime")
|
//testCompile project(path: ":smack-xmlparser", configuration: "testRuntime")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jar {
|
||||||
|
bundle {
|
||||||
|
bnd(
|
||||||
|
// see http://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.loader.html
|
||||||
|
'Require-Capability': 'osgi.extender;filter:="(osgi.extender=osgi.serviceloader.registrar)"',
|
||||||
|
'Provide-Capability': "osgi.serviceloader;osgi.serviceloader=org.jivesoftware.smack.xml.XmlPullParserFactory;register:=org.jivesoftware.smack.xml.xpp3.Xpp3XmlPullParserFactory",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,2 +1,16 @@
|
||||||
|
// Note that this is also declared in the main build.gradle for
|
||||||
|
// subprojects, but since evaluationDependsOnChildren is enabled we
|
||||||
|
// need to declare it here too to have bundle{bnd{...}} available
|
||||||
|
apply plugin: 'biz.aQute.bnd.builder'
|
||||||
|
|
||||||
description = """\
|
description = """\
|
||||||
Smack XML parser fundamentals"""
|
Smack XML parser fundamentals"""
|
||||||
|
|
||||||
|
jar {
|
||||||
|
bundle {
|
||||||
|
bnd(
|
||||||
|
// see http://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.loader.html
|
||||||
|
'Require-Capability': 'osgi.extender;filter:="(osgi.extender=osgi.serviceloader.processor)"',
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue