Fix Gradle deprecation warnings
This commit is contained in:
14
build.gradle
14
build.gradle
@@ -55,12 +55,14 @@ sonarqube {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task configDocsZip(dependsOn: [':docs:asciidoctor',':spring-session:javadoc']) << {
|
task configDocsZip(dependsOn: [':docs:asciidoctor',':spring-session:javadoc']) {
|
||||||
project.tasks.docsZip.from(project(':docs').asciidoctor) {
|
doLast {
|
||||||
into('reference')
|
project.tasks.docsZip.from(project(':docs').asciidoctor) {
|
||||||
}
|
into('reference')
|
||||||
project.tasks.docsZip.from(project(':spring-session').javadoc) {
|
}
|
||||||
into('api')
|
project.tasks.docsZip.from(project(':spring-session').javadoc) {
|
||||||
|
into('api')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,25 +41,27 @@ springBoot {
|
|||||||
mainClass = 'sample.client.Application'
|
mainClass = 'sample.client.Application'
|
||||||
}
|
}
|
||||||
|
|
||||||
task runGemFireServer() << {
|
task runGemFireServer() {
|
||||||
println 'STARTING GEMFIRE SERVER...'
|
doLast {
|
||||||
|
println 'STARTING GEMFIRE SERVER...'
|
||||||
|
|
||||||
ext.port = reservePort()
|
ext.port = reservePort()
|
||||||
|
|
||||||
String classpath = sourceSets.main.runtimeClasspath.collect { it }.join(File.pathSeparator)
|
String classpath = sourceSets.main.runtimeClasspath.collect { it }.join(File.pathSeparator)
|
||||||
|
|
||||||
String[] commandLine = ['java', '-server', '-ea', '-classpath', classpath,
|
String[] commandLine = ['java', '-server', '-ea', '-classpath', classpath,
|
||||||
"-Dgemfire.cache.server.port=$port",
|
"-Dgemfire.cache.server.port=$port",
|
||||||
//"-Dgemfire.log-file=gemfire-server.log",
|
//"-Dgemfire.log-file=gemfire-server.log",
|
||||||
"-Dgemfire.log-level=" + System.getProperty('gemfire.log.level', 'config'),
|
"-Dgemfire.log-level=" + System.getProperty('gemfire.log.level', 'config'),
|
||||||
'sample.server.GemFireServer']
|
'sample.server.GemFireServer']
|
||||||
|
|
||||||
//println commandLine
|
//println commandLine
|
||||||
|
|
||||||
ext.process = commandLine.execute()
|
ext.process = commandLine.execute()
|
||||||
process.in.close()
|
process.in.close()
|
||||||
process.out.close()
|
process.out.close()
|
||||||
process.err.close()
|
process.err.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,29 +27,33 @@ mainClassName = 'sample.Application'
|
|||||||
def port
|
def port
|
||||||
def process
|
def process
|
||||||
|
|
||||||
task availablePort() << {
|
task availablePort() {
|
||||||
def serverSocket = new ServerSocket(0)
|
doLast {
|
||||||
port = serverSocket.localPort
|
def serverSocket = new ServerSocket(0)
|
||||||
serverSocket.close()
|
port = serverSocket.localPort
|
||||||
|
serverSocket.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task runGemFireServer(dependsOn: availablePort) << {
|
task runGemFireServer(dependsOn: availablePort) {
|
||||||
println 'STARTING GEMFIRE SERVER...'
|
doLast {
|
||||||
|
println 'STARTING GEMFIRE SERVER...'
|
||||||
|
|
||||||
String classpath = sourceSets.main.runtimeClasspath.collect { it }.join(File.pathSeparator)
|
String classpath = sourceSets.main.runtimeClasspath.collect { it }.join(File.pathSeparator)
|
||||||
|
|
||||||
String[] commandLine = ['java', '-server', '-ea',
|
String[] commandLine = ['java', '-server', '-ea',
|
||||||
"-Dspring.session.data.gemfire.port=$port",
|
"-Dspring.session.data.gemfire.port=$port",
|
||||||
"-Dsample.httpsession.gemfire.log-level="
|
"-Dsample.httpsession.gemfire.log-level="
|
||||||
+ System.getProperty('sample.httpsession.gemfire.log-level', 'warning'),
|
+ System.getProperty('sample.httpsession.gemfire.log-level', 'warning'),
|
||||||
'-classpath', classpath, 'sample.Application' ]
|
'-classpath', classpath, 'sample.Application']
|
||||||
|
|
||||||
//println commandLine
|
//println commandLine
|
||||||
|
|
||||||
process = commandLine.execute()
|
process = commandLine.execute()
|
||||||
process.in.close()
|
process.in.close()
|
||||||
process.out.close()
|
process.out.close()
|
||||||
process.err.close()
|
process.err.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
integrationTest.doLast {
|
integrationTest.doLast {
|
||||||
|
|||||||
@@ -28,29 +28,33 @@ def process
|
|||||||
|
|
||||||
mainClassName = "sample.ServerConfig"
|
mainClassName = "sample.ServerConfig"
|
||||||
|
|
||||||
task availablePort() << {
|
task availablePort() {
|
||||||
def serverSocket = new ServerSocket(0)
|
doLast {
|
||||||
port = serverSocket.localPort
|
def serverSocket = new ServerSocket(0)
|
||||||
serverSocket.close()
|
port = serverSocket.localPort
|
||||||
|
serverSocket.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task runGemFireServer(dependsOn: availablePort) << {
|
task runGemFireServer(dependsOn: availablePort) {
|
||||||
println 'STARTING GEMFIRE SERVER...'
|
doLast {
|
||||||
|
println 'STARTING GEMFIRE SERVER...'
|
||||||
|
|
||||||
String classpath = sourceSets.main.runtimeClasspath.collect { it }.join(File.pathSeparator)
|
String classpath = sourceSets.main.runtimeClasspath.collect { it }.join(File.pathSeparator)
|
||||||
|
|
||||||
String[] commandLine = ['java', '-server', '-ea',
|
String[] commandLine = ['java', '-server', '-ea',
|
||||||
"-Dspring.session.data.gemfire.port=$port",
|
"-Dspring.session.data.gemfire.port=$port",
|
||||||
"-Dsample.httpsession.gemfire.log-level="
|
"-Dsample.httpsession.gemfire.log-level="
|
||||||
+ System.getProperty('sample.httpsession.gemfire.log-level', 'warning'),
|
+ System.getProperty('sample.httpsession.gemfire.log-level', 'warning'),
|
||||||
'-classpath', classpath, 'sample.ServerConfig']
|
'-classpath', classpath, 'sample.ServerConfig']
|
||||||
|
|
||||||
//println commandLine
|
//println commandLine
|
||||||
|
|
||||||
process = commandLine.execute()
|
process = commandLine.execute()
|
||||||
process.in.close()
|
process.in.close()
|
||||||
process.out.close()
|
process.out.close()
|
||||||
process.err.close()
|
process.err.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
integrationTest.doLast {
|
integrationTest.doLast {
|
||||||
|
|||||||
Reference in New Issue
Block a user