Skip to content

Commit

Permalink
Merge pull request #690 from io7m/master
Browse files Browse the repository at this point in the history
Add OSGi manifest headers
  • Loading branch information
mjpt777 authored Jul 27, 2019
2 parents 9465fd9 + 4d797e5 commit f729649
Showing 1 changed file with 65 additions and 24 deletions.
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

0 comments on commit f729649

Please sign in to comment.