Update Gradle build-file to use bnd instead of deprecated osgi plugin

This commit is contained in:
hedgecrw85 2020-02-19 11:49:37 -06:00
parent 7aec1d59d7
commit 9be622269f
1 changed files with 22 additions and 13 deletions

View File

@ -1,7 +1,14 @@
apply plugin: 'java' buildscript {
apply plugin: 'eclipse' repositories {
apply plugin: 'maven' mavenCentral()
apply plugin: 'osgi' gradlePluginPortal()
}
}
plugins {
id 'maven-publish'
id 'biz.aQute.bnd.builder' version '5.0.0'
}
group = 'com.fazecast' group = 'com.fazecast'
archivesBaseName = 'jSerialComm' archivesBaseName = 'jSerialComm'
@ -77,15 +84,17 @@ jar {
from sourceSets.main.output from sourceSets.main.output
from sourceSets.moduleInfo.output from sourceSets.moduleInfo.output
manifest { bnd (
instruction 'Bundle-Description', 'Java Serial Communications Library' 'Export-Package': 'com.fazecast.jSerialComm;version="' + version + '"',
instruction 'Bundle-Vendor', 'Fazecast, Inc.' 'Bundle-SymbolicName': 'com.fazecast.jSerialComm',
instruction 'Require-Capability', 'osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))"' 'Bundle-Description': 'Java Serial Communications Library',
attributes 'Implementation-Title': 'jSerialComm: Java Serial Communications Library', 'Bundle-Vendor': 'Fazecast, Inc.',
'Require-Capability': 'osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.6))"',
'Implementation-Title': 'jSerialComm: Java Serial Communications Library',
'Implementation-Version': version, 'Implementation-Version': version,
'Implementation-Vendor': 'Fazecast, Inc.', 'Implementation-Vendor': 'Fazecast, Inc.',
'Sealed': 'true' 'Sealed': 'true'
} )
} }
task testJar(type: Jar) { task testJar(type: Jar) {