SGF-445 - Remove MaxPermSize Java option from Gradle build.
This commit is contained in:
233
build.gradle
233
build.gradle
@@ -2,10 +2,11 @@ buildscript {
|
|||||||
repositories {
|
repositories {
|
||||||
maven { url 'https://repo.spring.io/plugins-release' }
|
maven { url 'https://repo.spring.io/plugins-release' }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0'
|
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0'
|
||||||
classpath 'org.asciidoctor:asciidoctorj:1.5.0'
|
classpath 'org.asciidoctor:asciidoctorj:1.5.0'
|
||||||
classpath 'org.springframework.build.gradle:bundlor-plugin:0.1.2'
|
classpath 'org.springframework.build.gradle:bundlor-plugin:0.1.3'
|
||||||
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.6'
|
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.6'
|
||||||
classpath 'io.spring.gradle:docbook-reference-plugin:0.3.0'
|
classpath 'io.spring.gradle:docbook-reference-plugin:0.3.0'
|
||||||
classpath 'io.spring.gradle:spring-io-plugin:0.0.4.RELEASE'
|
classpath 'io.spring.gradle:spring-io-plugin:0.0.4.RELEASE'
|
||||||
@@ -16,14 +17,6 @@ configurations {
|
|||||||
sharedResources
|
sharedResources
|
||||||
}
|
}
|
||||||
|
|
||||||
description = 'Spring Data GemFire'
|
|
||||||
group = 'org.springframework.data'
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
maven { url "https://repo.spring.io/libs-snapshot" }
|
|
||||||
maven { url "https://repo.spring.io/plugins-release"}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: "java"
|
apply plugin: "java"
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
apply plugin: 'idea'
|
apply plugin: 'idea'
|
||||||
@@ -33,7 +26,13 @@ apply plugin: 'propdeps'
|
|||||||
apply plugin: 'docbook-reference'
|
apply plugin: 'docbook-reference'
|
||||||
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
|
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
|
||||||
|
|
||||||
//project.bundlor.bundleSymbolicName = "${bundleSymbolicName}"
|
description = 'Spring Data GemFire'
|
||||||
|
group = 'org.springframework.data'
|
||||||
|
|
||||||
|
sourceCompatibility = 1.6
|
||||||
|
targetCompatibility = 1.6
|
||||||
|
|
||||||
|
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:-serial"]
|
||||||
|
|
||||||
if (project.hasProperty('platformVersion')) {
|
if (project.hasProperty('platformVersion')) {
|
||||||
apply plugin: 'spring-io'
|
apply plugin: 'spring-io'
|
||||||
@@ -51,6 +50,22 @@ if (project.hasProperty('platformVersion')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (JavaVersion.current().isJava8Compatible()) {
|
||||||
|
allprojects {
|
||||||
|
tasks.withType(Javadoc) {
|
||||||
|
options.addStringOption('Xdoclint:none', '-quiet')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(Test).all {
|
||||||
|
forkEvery = 1
|
||||||
|
systemProperties['gemfire.disableShutdownHook'] = 'true'
|
||||||
|
systemProperties['javax.net.ssl.keyStore'] = System.getProperty('user.dir') + '/src/test/resources/trusted.keystore'
|
||||||
|
systemProperties['org.springframework.data.gemfire.test.GemfireTestRunner.nomock'] =
|
||||||
|
System.getProperty('org.springframework.data.gemfire.test.GemfireTestRunner.nomock')
|
||||||
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
output.resourcesDir = 'build/classes/main'
|
output.resourcesDir = 'build/classes/main'
|
||||||
@@ -62,16 +77,11 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:-serial"]
|
repositories {
|
||||||
|
maven { url "https://repo.spring.io/libs-snapshot" }
|
||||||
tasks.withType(Test).all {
|
maven { url "https://repo.spring.io/plugins-release"}
|
||||||
forkEvery = 1
|
|
||||||
systemProperties['gemfire.disableShutdownHook'] = 'true'
|
|
||||||
systemProperties['javax.net.ssl.keyStore'] = System.getProperty('user.dir') + '/src/test/resources/trusted.keystore'
|
|
||||||
systemProperties['org.springframework.data.gemfire.test.GemfireTestRunner.nomock'] = System.getProperty('org.springframework.data.gemfire.test.GemfireTestRunner.nomock')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Common dependencies
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Spring Framework
|
// Spring Framework
|
||||||
compile("org.springframework:spring-context-support:$springVersion") {
|
compile("org.springframework:spring-context-support:$springVersion") {
|
||||||
@@ -119,54 +129,12 @@ dependencies {
|
|||||||
sharedResources "org.springframework.data.build:spring-data-build-resources:$springDataBuildVersion@zip"
|
sharedResources "org.springframework.data.build:spring-data-build-resources:$springDataBuildVersion@zip"
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = 1.6
|
bundlor {
|
||||||
targetCompatibility = 1.6
|
manifestTemplate = file("template.mf").text
|
||||||
|
|
||||||
if (JavaVersion.current().isJava8Compatible()) {
|
|
||||||
allprojects {
|
|
||||||
tasks.withType(Javadoc) {
|
|
||||||
options.addStringOption('Xdoclint:none', '-quiet')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
javadoc {
|
|
||||||
dependsOn = [ 'extractSharedResources' ]
|
|
||||||
|
|
||||||
ext.srcDir = file("${projectDir}/docs/src/api")
|
|
||||||
destinationDir = file("${buildDir}/api")
|
|
||||||
ext.tmpDir = file("${buildDir}/api-work")
|
|
||||||
|
|
||||||
configure(options) {
|
|
||||||
stylesheetFile = file("$buildDir/shared-resources/javadoc/spring-javadoc.css")
|
|
||||||
docFilesSubDirs = true
|
|
||||||
outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET
|
|
||||||
breakIterator = true
|
|
||||||
showFromProtected()
|
|
||||||
groups = [
|
|
||||||
'Spring GemFire' : ['org.springframework.data.gemfire*'],
|
|
||||||
]
|
|
||||||
|
|
||||||
links = [
|
|
||||||
"http://static.springframework.org/spring/docs/3.1.x/javadoc-api",
|
|
||||||
"http://download.oracle.com/javase/6/docs/api",
|
|
||||||
"http://www.gemstone.com/docs/6.5.1/product/docs/japi/",
|
|
||||||
"http://asm.objectweb.org/asm223/javadoc/user",
|
|
||||||
"http://logging.apache.org/log4j/docs/api/",
|
|
||||||
"http://atinject.googlecode.com/svn/trunk/javadoc/"
|
|
||||||
]
|
|
||||||
|
|
||||||
exclude "org/springframework/data/gemfire/config/**"
|
|
||||||
}
|
|
||||||
|
|
||||||
title = "${rootProject.description} ${version} API"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
|
manifest.attributes['Implementation-Title'] = project.name
|
||||||
dependsOn = [ 'bundlor' ]
|
|
||||||
|
|
||||||
manifest.attributes['Implementation-Title'] = 'spring-data-gemfire'
|
|
||||||
manifest.attributes['Implementation-Version'] = project.version
|
manifest.attributes['Implementation-Version'] = project.version
|
||||||
|
|
||||||
from("$rootDir/docs/src/info") {
|
from("$rootDir/docs/src/info") {
|
||||||
@@ -177,25 +145,40 @@ jar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bundlor {
|
javadoc {
|
||||||
manifestTemplate = file("template.mf").text
|
dependsOn = [ 'extractSharedResources' ]
|
||||||
}
|
|
||||||
|
|
||||||
// Reference documentation
|
destinationDir = file("${buildDir}/api")
|
||||||
|
ext.srcDir = file("${projectDir}/docs/src/api")
|
||||||
|
ext.tmpDir = file("${buildDir}/api-work")
|
||||||
|
|
||||||
reference {
|
configure(options) {
|
||||||
// Avoid copy with expansions
|
breakIterator = true
|
||||||
expandPlaceholders = '';
|
docFilesSubDirs = true
|
||||||
}
|
outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET
|
||||||
|
stylesheetFile = file("$buildDir/shared-resources/javadoc/spring-javadoc.css")
|
||||||
|
showFromProtected()
|
||||||
|
|
||||||
referencePdf {
|
groups = [
|
||||||
dependsOn = [ 'asciidoctor' ]
|
'Spring GemFire' : ['org.springframework.data.gemfire*'],
|
||||||
sourceDir = asciidoctor.outputDir
|
]
|
||||||
|
|
||||||
|
links = [
|
||||||
|
"http://docs.oracle.com/javase/6/docs/api/",
|
||||||
|
"http://docs.spring.io/spring/docs/current/javadoc-api/",
|
||||||
|
"http://gemfire.docs.pivotal.io/docs-gemfire/latest/javadocs/japi/",
|
||||||
|
"http://logging.apache.org/log4j/1.2/apidocs/",
|
||||||
|
]
|
||||||
|
|
||||||
|
exclude "org/springframework/data/gemfire/config/**"
|
||||||
|
}
|
||||||
|
|
||||||
|
title = "${rootProject.description} ${version} API"
|
||||||
}
|
}
|
||||||
|
|
||||||
asciidoctor {
|
asciidoctor {
|
||||||
sourceDir = file("${projectDir}/src/main/asciidoc")
|
|
||||||
dependsOn = [ 'extractSharedResources' ]
|
dependsOn = [ 'extractSharedResources' ]
|
||||||
|
sourceDir = file("${projectDir}/src/main/asciidoc")
|
||||||
backends = [ 'html5', 'docbook' ]
|
backends = [ 'html5', 'docbook' ]
|
||||||
options = [
|
options = [
|
||||||
doctype: 'book',
|
doctype: 'book',
|
||||||
@@ -216,6 +199,15 @@ asciidoctor {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reference {
|
||||||
|
expandPlaceholders = ''; // avoid copy with expansions
|
||||||
|
}
|
||||||
|
|
||||||
|
referencePdf {
|
||||||
|
dependsOn = [ 'asciidoctor' ]
|
||||||
|
sourceDir = asciidoctor.outputDir
|
||||||
|
}
|
||||||
|
|
||||||
task sourcesJar(type: Jar, dependsOn:classes) {
|
task sourcesJar(type: Jar, dependsOn:classes) {
|
||||||
classifier = 'sources'
|
classifier = 'sources'
|
||||||
from sourceSets.main.allJava
|
from sourceSets.main.allJava
|
||||||
@@ -226,6 +218,33 @@ task javadocJar(type: Jar) {
|
|||||||
from javadoc
|
from javadoc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task schemaZip(type: Zip) {
|
||||||
|
group = 'Distribution'
|
||||||
|
classifier = 'schema'
|
||||||
|
description = "Builds -${classifier} archive containing all XSDs for deployment"
|
||||||
|
|
||||||
|
def Properties schemas = new Properties();
|
||||||
|
|
||||||
|
sourceSets.main.resources.find {
|
||||||
|
it.path.endsWith('META-INF' + File.separator + 'spring.schemas')
|
||||||
|
}?.withInputStream { schemas.load(it) }
|
||||||
|
|
||||||
|
for (def key : schemas.keySet()) {
|
||||||
|
def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
|
||||||
|
def alias = key.replaceAll(/http.*schema.(.*).(spring-.*)/, '$2')
|
||||||
|
assert shortName != key
|
||||||
|
File xsdFile = sourceSets.main.resources.find {
|
||||||
|
it.path.replace('\\', '/').endsWith(schemas.get(key))
|
||||||
|
}
|
||||||
|
assert xsdFile != null
|
||||||
|
|
||||||
|
into (shortName) {
|
||||||
|
from xsdFile.path
|
||||||
|
rename { String fileName -> alias }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task docsZip(type: Zip) {
|
task docsZip(type: Zip) {
|
||||||
group = 'Distribution'
|
group = 'Distribution'
|
||||||
classifier = 'docs'
|
classifier = 'docs'
|
||||||
@@ -251,38 +270,11 @@ task docsZip(type: Zip) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task schemaZip(type: Zip) {
|
|
||||||
group = 'Distribution'
|
|
||||||
classifier = 'schema'
|
|
||||||
description = "Builds -${classifier} archive containing all XSDs for deployment"
|
|
||||||
|
|
||||||
def Properties schemas = new Properties();
|
|
||||||
|
|
||||||
sourceSets.main.resources.find {
|
|
||||||
it.path.endsWith('META-INF' + File.separator + 'spring.schemas')
|
|
||||||
}?.withInputStream { schemas.load(it) }
|
|
||||||
|
|
||||||
for (def key : schemas.keySet()) {
|
|
||||||
def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
|
|
||||||
def alias = key.replaceAll(/http.*schema.(.*).(spring-.*)/, '$2')
|
|
||||||
assert shortName != key
|
|
||||||
File xsdFile = sourceSets.main.resources.find {
|
|
||||||
it.path.replace('\\', '/').endsWith(schemas.get(key))
|
|
||||||
}
|
|
||||||
assert xsdFile != null
|
|
||||||
|
|
||||||
into (shortName) {
|
|
||||||
from xsdFile.path
|
|
||||||
rename { String fileName -> alias }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task distZip(type: Zip, dependsOn: [jar, docsZip, schemaZip, sourcesJar, javadocJar]) {
|
task distZip(type: Zip, dependsOn: [jar, docsZip, schemaZip, sourcesJar, javadocJar]) {
|
||||||
|
description = "Builds -${classifier} archive, containing all jars and docs, suitable for community download page."
|
||||||
group = 'Distribution'
|
group = 'Distribution'
|
||||||
classifier = 'dist'
|
classifier = 'dist'
|
||||||
description = "Builds -${classifier} archive, containing all jars and docs, " +
|
|
||||||
"suitable for community download page."
|
|
||||||
|
|
||||||
ext.zipRootDir = "${project.name}-${project.version}"
|
ext.zipRootDir = "${project.name}-${project.version}"
|
||||||
|
|
||||||
@@ -293,7 +285,6 @@ task distZip(type: Zip, dependsOn: [jar, docsZip, schemaZip, sourcesJar, javadoc
|
|||||||
include 'notice.txt'
|
include 'notice.txt'
|
||||||
expand(copyright: new Date().format('yyyy'), version: project.version)
|
expand(copyright: new Date().format('yyyy'), version: project.version)
|
||||||
}
|
}
|
||||||
|
|
||||||
from('samples/') {
|
from('samples/') {
|
||||||
into 'samples'
|
into 'samples'
|
||||||
exclude '**/build/**'
|
exclude '**/build/**'
|
||||||
@@ -302,11 +293,9 @@ task distZip(type: Zip, dependsOn: [jar, docsZip, schemaZip, sourcesJar, javadoc
|
|||||||
exclude '**/vf*.*'
|
exclude '**/vf*.*'
|
||||||
exclude '**/vf*.txt'
|
exclude '**/vf*.txt'
|
||||||
}
|
}
|
||||||
|
|
||||||
from(zipTree(docsZip.archivePath)) {
|
from(zipTree(docsZip.archivePath)) {
|
||||||
into "docs"
|
into "docs"
|
||||||
}
|
}
|
||||||
|
|
||||||
from(zipTree(schemaZip.archivePath)) {
|
from(zipTree(schemaZip.archivePath)) {
|
||||||
into "schema"
|
into "schema"
|
||||||
}
|
}
|
||||||
@@ -316,39 +305,41 @@ task distZip(type: Zip, dependsOn: [jar, docsZip, schemaZip, sourcesJar, javadoc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task extractSharedResources(type: Copy) {
|
||||||
|
from {
|
||||||
|
// use of closure defers evaluation until execution time
|
||||||
|
configurations.sharedResources.collect { zipTree(it) }
|
||||||
|
}
|
||||||
|
into "$buildDir/shared-resources"
|
||||||
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives sourcesJar
|
archives sourcesJar
|
||||||
archives javadocJar
|
archives javadocJar
|
||||||
|
|
||||||
archives docsZip
|
|
||||||
archives schemaZip
|
archives schemaZip
|
||||||
|
archives docsZip
|
||||||
archives distZip
|
archives distZip
|
||||||
}
|
}
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
task wrapper(type: Wrapper) {
|
||||||
description = "Generates gradlew[.bat] scripts"
|
description = "Generates gradlew[.bat] shell scripts."
|
||||||
gradleVersion = "1.12"
|
gradleVersion = "1.12"
|
||||||
|
|
||||||
doLast() {
|
doLast() {
|
||||||
def gradleOpts = "-XX:MaxPermSize=1024m -Xms256m -Xmx1024m"
|
def gradleOpts = "-Xms256m -Xmx1024m"
|
||||||
def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=1024m"
|
def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=1024m"
|
||||||
|
|
||||||
File wrapperFile = file("gradlew")
|
File wrapperFile = file("gradlew")
|
||||||
|
|
||||||
wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
|
wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
|
||||||
"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
|
"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
|
||||||
|
|
||||||
File wrapperBatFile = file("gradlew.bat")
|
File wrapperBatFile = file("gradlew.bat")
|
||||||
|
|
||||||
wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
|
wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
|
||||||
"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
|
"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task extractSharedResources(type: Copy) {
|
|
||||||
|
|
||||||
from { // use of closure defers evaluation until execution time
|
|
||||||
configurations.sharedResources.collect { zipTree(it) }
|
|
||||||
}
|
|
||||||
|
|
||||||
into "$buildDir/shared-resources"
|
|
||||||
}
|
|
||||||
|
|
||||||
assemble.dependsOn = ['jar', 'sourcesJar']
|
assemble.dependsOn = ['jar', 'sourcesJar']
|
||||||
defaultTasks 'build'
|
defaultTasks 'build'
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
#Tue Jul 07 13:51:54 BST 2015
|
#Fri May 06 15:39:35 PDT 2016
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-bin.zip
|
||||||
|
|||||||
2
gradlew
vendored
2
gradlew
vendored
@@ -7,7 +7,7 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
GRADLE_OPTS="-XX:MaxPermSize=1024m -Xms256m -Xmx1024m $GRADLE_OPTS"
|
GRADLE_OPTS="-Xms256m -Xmx1024m $GRADLE_OPTS"
|
||||||
DEFAULT_JVM_OPTS=""
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
APP_NAME="Gradle"
|
||||||
|
|||||||
2
gradlew.bat
vendored
2
gradlew.bat
vendored
@@ -9,7 +9,7 @@
|
|||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set GRADLE_OPTS=-XX:MaxPermSize=1024m -Xms256m -Xmx1024m -XX:MaxHeapSize=1024m %GRADLE_OPTS%
|
set GRADLE_OPTS=-Xms256m -Xmx1024m -XX:MaxHeapSize=1024m %GRADLE_OPTS%
|
||||||
set DEFAULT_JVM_OPTS=
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
|
|||||||
Reference in New Issue
Block a user