Skip to content

Commit

Permalink
Merge pull request ehcache#2562 from chrisdennis/gradle-5.1.1
Browse files Browse the repository at this point in the history
Upgrade to Gradle 5.2.1
  • Loading branch information
anthonydahanne authored Feb 15, 2019
2 parents 0fc040e + f06d999 commit a818d3d
Show file tree
Hide file tree
Showing 15 changed files with 75 additions and 72 deletions.
12 changes: 6 additions & 6 deletions 107/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

apply plugin: EhDeploy
apply plugin: 'osgi'
apply plugin: 'biz.aQute.bnd.builder'
apply plugin: 'osgi-ds'

configurations {
Expand Down Expand Up @@ -53,11 +53,11 @@ javadoc {
}

jar {
manifest {
instruction 'Export-Package', '!org.ehcache.jsr107.tck', '!org.ehcache.jsr107.internal.*', 'org.ehcache.jsr107.*'
instruction 'Import-Package', 'javax.cache.*;resolution:=optional', '*'
instruction 'Service-Component', 'OSGI-INF/*.xml'
}
bnd(
'Export-Package': '!org.ehcache.jsr107.tck, !org.ehcache.jsr107.internal.*, org.ehcache.jsr107.*',
'Import-Package': 'javax.cache.*;resolution:=optional, *',
'Service-Component': 'OSGI-INF/*.xml'
)
}

test {
Expand Down
10 changes: 5 additions & 5 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
*/

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

checkstyle {
configFile = file("$projectDir/config/checkstyle.xml")
}

jar {
manifest {
instruction 'Export-Package', 'org.ehcache.*'
instruction 'Import-Package', '*'
}
bnd(
'Export-Package': 'org.ehcache.*',
'Import-Package': '*'
)
}
25 changes: 14 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ plugins {
// ./gradlew <task1> ... <taskN> taskTree
id "com.dorongold.task-tree" version "1.3.1"
// Declare spotbugs at the top
id 'com.github.spotbugs' version '1.6.5' apply false
id 'com.github.spotbugs' version '1.6.9' apply false
// Declare osgi-ds at the top
id 'org.jayware.osgi-ds' version '0.5.5' apply false
//OWASP Security Vulnerability Detection
id 'org.owasp.dependencycheck' version '4.0.2' apply false
// Declare bnd at the top
id 'biz.aQute.bnd.builder' version '4.1.0' apply false
}

wrapper {
Expand Down Expand Up @@ -231,18 +233,19 @@ subprojects {
}
}

if (plugins.hasPlugin('osgi')) {
plugins.withType(aQute.bnd.gradle.BndBuilderPlugin) {
jar {
manifest {
instruction 'Bundle-Name', project.properties.subPomName
instruction 'Bundle-Description', project.properties.subPomDesc
instruction 'Bundle-SymbolicName', "org.ehcache.$project.archivesBaseName"
instruction 'Bundle-DocURL', 'http://ehcache.org'
instruction 'Bundle-License', 'LICENSE'
instruction 'Bundle-Vendor', 'Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.'
instruction 'Bundle-RequiredExecutionEnvironment', 'JavaSE-1.8'
}
bnd(
'Bundle-Name': project.properties.subPomName,
'Bundle-Description': project.properties.subPomDesc,
'Bundle-SymbolicName': "org.ehcache.modules.$project.archivesBaseName",
'Bundle-DocURL': 'http://ehcache.org',
'Bundle-License': 'LICENSE',
'Bundle-Vendor': 'Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.',
'Bundle-RequiredExecutionEnvironment': 'JavaSE-1.8',
)
}
check.dependsOn(baseline)
}
}

Expand Down
21 changes: 9 additions & 12 deletions buildSrc/src/main/groovy/EhDistribute.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class EhDistribute implements Plugin<Project> {
project.plugins.apply 'java-library'
project.plugins.apply 'maven'
project.plugins.apply 'signing'
project.plugins.apply 'biz.aQute.bnd.builder'
project.plugins.apply 'com.github.johnrengelman.shadow'
project.plugins.apply EhPomMangle
project.plugins.apply EhDocs
Expand Down Expand Up @@ -62,18 +63,14 @@ class EhDistribute implements Plugin<Project> {
from "$project.rootDir/NOTICE"
duplicatesStrategy = 'exclude'

def osgiConvention = new OsgiPluginConvention(project)
manifest = osgiConvention.osgiManifest {
classesDir = project.shadowJar.archivePath
classpath = project.files(project.configurations.shadowCompile, project.configurations.shadowProvided)

// Metadata
instruction 'Bundle-DocURL', 'http://ehcache.org'
instruction 'Bundle-License', 'LICENSE'
instruction 'Bundle-Vendor', 'Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.'
instruction 'Bundle-RequiredExecutionEnvironment', 'JavaSE-1.8'
instruction 'Service-Component', 'OSGI-INF/*.xml'
}
classpath = project.files(project.configurations.shadowCompile, project.configurations.shadowProvided)
bnd(
'Bundle-DocURL': 'http://ehcache.org',
'Bundle-License': 'LICENSE',
'Bundle-Vendor': 'Terracotta Inc., a wholly-owned subsidiary of Software AG USA, Inc.',
'Bundle-RequiredExecutionEnvironment': 'JavaSE-1.8',
'Service-Component': 'OSGI-INF/*.xml'
)

utils.fillManifest(manifest, project.archivesBaseName)
}
Expand Down
1 change: 0 additions & 1 deletion clustered/client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

apply plugin: EhDeploy
apply plugin: 'osgi'
apply plugin: 'osgi-ds'

dependencies {
Expand Down
10 changes: 6 additions & 4 deletions clustered/clustered-dist/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ task copyDocs(type: Copy) {
}

jar {
manifest {
instruction 'Export-Package', '!com.tc.*', '!com.terracotta.*', '!org.terracotta.*', '!org.ehcache.*.internal.*', '!sun.misc', 'org.ehcache.clustered.client.*'
instruction 'Import-Package', '!sun.misc.*', 'org.ehcache.xml.*;resolution:=optional', '*'
}
bnd (
'Bundle-SymbolicName': 'org.ehcache.clustered',
'Export-Package': '!com.tc.*, !com.terracotta.*, !org.terracotta.*, !org.ehcache.*.internal.*, !sun.misc, ' +
'org.ehcache.clustered.client.*, org.ehcache.clustered.common.*',
'Import-Package': '!sun.misc.*, org.ehcache.xml.*;resolution:=optional, *'
)
}

distributions {
Expand Down
11 changes: 6 additions & 5 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

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

dependencies {
api project(':api')
Expand All @@ -25,8 +25,9 @@ dependencies {
}

jar {
manifest {
instruction 'Bundle-Activator', 'org.ehcache.core.osgi.EhcacheActivator'
instruction 'Export-Package', '!org.ehcache.core.internal.*', 'org.ehcache.core.*'
}
bnd (
'Bundle-Activator': 'org.ehcache.core.osgi.EhcacheActivator',
'Import-Package': '!javax.annotation, *',
'Export-Package': '!org.ehcache.core.internal.*, org.ehcache.core.*',
)
}
16 changes: 8 additions & 8 deletions dist/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ dependencies {
}

jar {
manifest {
instructionReplace 'Bundle-Name', "Ehcache 3"
instructionReplace 'Bundle-SymbolicName', "org.ehcache"
instructionReplace 'Bundle-Description', 'Ehcache is an open-source caching library, compliant with the JSR-107 standard.'
bnd (
'Bundle-Name': 'Ehcache 3',
'Bundle-SymbolicName': 'org.ehcache',
'Bundle-Description': 'Ehcache is an open-source caching library, compliant with the JSR-107 standard.',

instruction 'Bundle-Activator', 'org.ehcache.core.osgi.EhcacheActivator'
instruction 'Export-Package', '!org.ehcache.jsr107.tck', '!org.ehcache.*.internal.*', 'org.ehcache.*', 'org.terracotta.statistics.*', 'org.terracotta.context'
instruction 'Import-Package', 'javax.cache.*;resolution:=optional', '!sun.misc', '*'
}
'Bundle-Activator': 'org.ehcache.core.osgi.EhcacheActivator',
'Export-Package': '!org.ehcache.jsr107.tck, !org.ehcache.*.internal.*, org.ehcache.*, org.terracotta.statistics.*, org.terracotta.context',
'Import-Package': 'javax.cache.*;resolution:=optional, !sun.misc, *'
)
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down
2 changes: 1 addition & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
14 changes: 7 additions & 7 deletions impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

apply plugin: EhDeploy
apply plugin: 'osgi'
apply plugin: 'biz.aQute.bnd.builder'
apply plugin: 'osgi-ds'

dependencies {
Expand All @@ -33,12 +33,12 @@ dependencies {

jar {
from "$rootDir/NOTICE"
manifest {
instruction 'Export-Package', '!org.ehcache.impl.internal.*', 'org.ehcache.impl.*', 'org.ehcache.config.builders',
'org.ehcache.impl.internal.spi.loaderwriter' //ugly 107 induced internal export wart
instruction 'Import-Package', '!sun.misc', '*'
instruction 'Service-Component', 'OSGI-INF/*.xml'
}
bnd (
'Export-Package': '!org.ehcache.impl.internal.*, org.ehcache.impl.*, org.ehcache.config.builders, ' +
'org.ehcache.impl.internal.spi.loaderwriter', //ugly 107 induced internal export wart
'Import-Package': '!sun.misc, *',
'Service-Component': 'OSGI-INF/*.xml'
)
}

compileJava {
Expand Down
13 changes: 7 additions & 6 deletions transactions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

group = 'org.ehcache'

apply plugin: 'osgi'
apply plugin: 'biz.aQute.bnd.builder'
apply plugin: 'osgi-ds'
apply plugin: EhPomMangle

Expand Down Expand Up @@ -47,11 +47,12 @@ test {
}

jar {
manifest {
instruction 'Export-Package', 'org.ehcache.transactions.xa.*'
instruction 'Import-Package', 'bitronix.tm.*;resolution:=optional', 'javax.transaction.*;resolution:=optional', 'org.ehcache.xml.*;resolution:=optional', '*'
instruction 'Service-Component', 'OSGI-INF/*.xml'
}
bnd (
'Bundle-SymbolicName': 'org.ehcache.transactions',
'Export-Package': 'org.ehcache.transactions.xa.*',
'Import-Package': 'bitronix.tm.*;resolution:=optional, javax.transaction.*;resolution:=optional, org.ehcache.xml.*;resolution:=optional, *',
'Service-Component': 'OSGI-INF/*.xml'
)
}

project.signing {
Expand Down
8 changes: 4 additions & 4 deletions xml/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ plugins {
}

apply plugin: EhDeploy
apply plugin: 'osgi'
apply plugin: 'biz.aQute.bnd.builder'
apply plugin: 'com.github.hauner.jarTest'

dependencies {
Expand All @@ -39,9 +39,9 @@ test {
}

jar {
manifest {
instruction 'Export-Package', 'org.ehcache.xml', 'org.ehcache.xml.exceptions', 'org.ehcache.xml.model'
}
bnd (
'Export-Package': 'org.ehcache.xml, org.ehcache.xml.exceptions, org.ehcache.xml.model',
)
}

xjcGenerate {
Expand Down

0 comments on commit a818d3d

Please sign in to comment.