From 048d8d787ae62ef1511eafaedcb520a809216891 Mon Sep 17 00:00:00 2001 From: Leonid Date: Wed, 2 Jun 2021 19:57:57 +0300 Subject: [PATCH] Replace Gradle OSGi plugin for BND build tools (#730) * Swap out JCenter for Maven Central and Gradle repos * Deprecate use of OSGi Gradle plugin Co-authored-by: Leonid Malikov --- build.gradle | 10 +++++++--- gradle/binaryCompatibility.gradle | 5 ++++- json-path-assert/build.gradle | 6 +++--- json-path-web-test/build.gradle | 10 +++++----- json-path/build.gradle | 8 ++++---- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index 3f3cac5a6..18fb5fa9e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,14 @@ buildscript { repositories { - jcenter() + mavenCentral() + maven { + url "https://plugins.gradle.org/m2/" + } } dependencies { classpath 'me.champeau.gradle:japicmp-gradle-plugin:0.1.0' - classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0' + classpath 'com.github.jengelman.gradle.plugins:shadow:5.2.0' + classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:5.3.0' } } @@ -47,7 +51,7 @@ allprojects { subprojects { apply plugin: 'java' apply plugin: 'signing' - apply plugin: 'osgi' + apply plugin: 'biz.aQute.bnd.builder' sourceCompatibility = 1.8 targetCompatibility = 1.8 diff --git a/gradle/binaryCompatibility.gradle b/gradle/binaryCompatibility.gradle index b74e8301f..3f02e320d 100644 --- a/gradle/binaryCompatibility.gradle +++ b/gradle/binaryCompatibility.gradle @@ -21,7 +21,10 @@ import groovy.text.markup.TemplateConfiguration buildscript { // this block should not be necessary, but for some reason it fails without! repositories { - jcenter() + mavenCentral() + maven { + url "https://plugins.gradle.org/m2/" + } } dependencies { diff --git a/json-path-assert/build.gradle b/json-path-assert/build.gradle index 8bc738c1f..7e5a6fc3b 100644 --- a/json-path-assert/build.gradle +++ b/json-path-assert/build.gradle @@ -4,9 +4,9 @@ description = "Assertions on Json using JsonPath" jar { baseName 'json-path-assert' - manifest { - attributes 'Implementation-Title': 'json-path-assert', 'Implementation-Version': version - } + bnd ( + 'Implementation-Title': 'json-path-assert', 'Implementation-Version': version + ) } dependencies { diff --git a/json-path-web-test/build.gradle b/json-path-web-test/build.gradle index 4f3713c7f..ced2f5342 100644 --- a/json-path-web-test/build.gradle +++ b/json-path-web-test/build.gradle @@ -18,11 +18,11 @@ task createBuildInfoFile { jar { dependsOn createBuildInfoFile baseName 'json-path-web-test' - manifest { - attributes 'Implementation-Title': 'json-path-web-test', - 'Implementation-Version': version, - 'Main-Class': mainClassName - } + bnd ( + 'Implementation-Title': 'json-path-web-test', + 'Implementation-Version': version, + 'Main-Class': mainClassName + ) } diff --git a/json-path/build.gradle b/json-path/build.gradle index 812eac64d..b5d75f052 100644 --- a/json-path/build.gradle +++ b/json-path/build.gradle @@ -4,10 +4,10 @@ description = "Java port of Stefan Goessner JsonPath." jar { baseName 'json-path' - manifest { - attributes 'Implementation-Title': 'json-path', 'Implementation-Version': version - instruction 'Import-Package', 'org.json.*;resolution:=optional', 'com.google.gson.*;resolution:=optional', 'com.fasterxml.jackson.*;resolution:=optional', 'org.apache.tapestry5.json.*;resolution:=optional', 'org.codehaus.jettison.*;resolution:=optional', '*' - } + bnd ( + 'Implementation-Title': 'json-path', 'Implementation-Version': version, + 'Import-Package': 'org.json.*;resolution:=optional, com.google.gson.*;resolution:=optional, com.fasterxml.jackson.*;resolution:=optional, org.apache.tapestry5.json.*;resolution:=optional, org.codehaus.jettison.*;resolution:=optional, *' + ) } dependencies {