Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OSGi manifest headers #690

Merged
merged 1 commit into from
Jul 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 65 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ plugins {
id 'com.gradle.build-scan' version '2.3'
id "io.freefair.javadoc-links" version "3.8.1" apply false
id 'com.github.johnrengelman.shadow' version '5.1.0' apply false
id 'biz.aQute.bnd.builder' version '4.2.0' apply false
}

defaultTasks 'clean', 'build', 'shadowJar', 'install'
Expand Down Expand Up @@ -235,13 +236,23 @@ project(':aeron-client') {
}
}

apply plugin: 'biz.aQute.bnd.builder'

jar {
manifest.attributes(
'Implementation-Title': 'Aeron',
'Implementation-Version': "${aeronVersion}",
'Implementation-Vendor': 'Real Logic Limited',
'Automatic-Module-Name': 'io.aeron.client'
)
bnd """
Automatic-Module-Name: io.aeron.client
Bundle-Name: io.aeron.client
Bundle-SymbolicName: io.aeron.client
Implementation-Title: Aeron
Implementation-Vendor: Real Logic Limited
Implementation-Version: ${aeronVersion}

-exportcontents: io.aeron, io.aeron.*

# Suppress headers that reduce reproducibility.
-reproducible: true
-noextraheaders: true
"""
}

task sourcesJar(type: Jar) {
Expand Down Expand Up @@ -290,13 +301,23 @@ project(':aeron-driver') {
}
}

apply plugin: 'biz.aQute.bnd.builder'

jar {
manifest.attributes(
'Implementation-Title': 'Aeron',
'Implementation-Version': "${aeronVersion}",
'Implementation-Vendor': 'Real Logic Limited',
'Automatic-Module-Name': 'io.aeron.driver'
)
bnd """
Automatic-Module-Name: io.aeron.driver
Bundle-Name: io.aeron.driver
Bundle-SymbolicName: io.aeron.driver
Implementation-Title: Aeron
Implementation-Vendor: Real Logic Limited
Implementation-Version: ${aeronVersion}

-exportcontents: io.aeron.driver, io.aeron.driver.*

# Suppress headers that reduce reproducibility.
-reproducible: true
-noextraheaders: true
"""
}

task sourcesJar(type: Jar) {
Expand Down Expand Up @@ -371,17 +392,27 @@ project(':aeron-archive') {
args = ['src/main/resources/aeron-archive-codecs.xml']
}

apply plugin: 'biz.aQute.bnd.builder'

jar {
from("${buildDir}/classes/java/generated") {
include '**/*.class'
}

manifest.attributes(
'Implementation-Title': 'Aeron',
'Implementation-Version': "${aeronVersion}",
'Implementation-Vendor': 'Real Logic Limited',
'Automatic-Module-Name': 'io.aeron.archive'
)
bnd """
Automatic-Module-Name: io.aeron.archive
Bundle-Name: io.aeron.archive
Bundle-SymbolicName: io.aeron.archive
Implementation-Title: Aeron
Implementation-Vendor: Real Logic Limited
Implementation-Version: ${aeronVersion}

-exportcontents: io.aeron.archive, io.aeron.archive.*

# Suppress headers that reduce reproducibility.
-reproducible: true
-noextraheaders: true
"""
}

uploadArchives {
Expand Down Expand Up @@ -460,17 +491,27 @@ project(':aeron-cluster') {
'src/main/resources/aeron-cluster-mark-codecs.xml']
}

apply plugin: 'biz.aQute.bnd.builder'

jar {
from("${buildDir}/classes/java/generated") {
include '**/*.class'
}

manifest.attributes(
'Implementation-Title': 'Aeron',
'Implementation-Version': "${aeronVersion}",
'Implementation-Vendor': 'Real Logic Limited',
'Automatic-Module-Name': 'io.aeron.cluster'
)
bnd """
Automatic-Module-Name: io.aeron.cluster
Bundle-Name: io.aeron.cluster
Bundle-SymbolicName: io.aeron.cluster
Implementation-Title: Aeron
Implementation-Vendor: Real Logic Limited
Implementation-Version: ${aeronVersion}

-exportcontents: io.aeron.cluster, io.aeron.cluster.*

# Suppress headers that reduce reproducibility.
-reproducible: true
-noextraheaders: true
"""
}

uploadArchives {
Expand Down