You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ud...@apache.org on 2017/09/28 19:15:37 UTC
[geode] branch develop updated: GEODE-3699: Prevent gradle warnings
by avoiding deprecated << operator.
This is an automated email from the ASF dual-hosted git repository.
udo pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 365d523 GEODE-3699: Prevent gradle warnings by avoiding deprecated << operator.
365d523 is described below
commit 365d5230e8c2e06b9617f7fc09c3fa9702a6150e
Author: Sarge <md...@pivotal.io>
AuthorDate: Tue Sep 26 09:24:53 2017 -0700
GEODE-3699: Prevent gradle warnings by avoiding deprecated << operator.
---
geode-assembly/build.gradle | 32 ++++++-------
gradle/dependency-resolution.gradle | 89 +++++++++++++++++++------------------
gradle/ide.gradle | 16 ++++---
3 files changed, 73 insertions(+), 64 deletions(-)
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index a0a317e..84f88c1 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -439,22 +439,24 @@ def printJars(tree) {
};
}
-task dumpInstalledJars(dependsOn: installDist) << {
- description "Dump a list of all of the jars shipped with the binary distribution, for validation purposes"
+task dumpInstalledJars(dependsOn: installDist) {
+ doLast {
+ description "Dump a list of all of the jars shipped with the binary distribution, for validation purposes"
- FileTree installDir = fileTree(dir: installDist.destinationDir)
+ FileTree installDir = fileTree(dir: installDist.destinationDir)
- println("Jars in the binary install")
- println("==========================")
- printJars(installDir)
+ println("Jars in the binary install")
+ println("==========================")
+ printJars(installDir)
- installDir.include("**/*.war").visit{ file ->
- if(!file.isDirectory()) {
- FileTree warContents = zipTree(file.file)
- println ""
- println file.name
- println("==========================")
- printJars(warContents);
- }
- };
+ installDir.include("**/*.war").visit{ file ->
+ if(!file.isDirectory()) {
+ FileTree warContents = zipTree(file.file)
+ println ""
+ println file.name
+ println("==========================")
+ printJars(warContents);
+ }
+ };
+ }
}
diff --git a/gradle/dependency-resolution.gradle b/gradle/dependency-resolution.gradle
index 1b36bfa..73b8e5a 100644
--- a/gradle/dependency-resolution.gradle
+++ b/gradle/dependency-resolution.gradle
@@ -17,66 +17,69 @@
subprojects {
//Task to dump all depencies of all projects, in a way
//that can be diffed before and after dependency changes
- task dumpDependencies() << {
- description "Dump all of the dependencies as a flat, sorted list"
+ task dumpDependencies() {
+ doLast {
+ description "Dump all of the dependencies as a flat, sorted list"
- project.configurations.each{ configuration ->
- println( project.name + ":" + configuration.name )
- println( '-------------------')
- configuration.resolvedConfiguration.resolvedArtifacts.collect{dep -> dep.file.name}.unique().toSorted().each{dep ->
- println(dep)
+ project.configurations.each{ configuration ->
+ println( project.name + ":" + configuration.name )
+ println( '-------------------')
+ configuration.resolvedConfiguration.resolvedArtifacts.collect{dep -> dep.file.name}.unique().toSorted().each{dep ->
+ println(dep)
+ }
+ println()
}
- println()
}
}
//Task to find all of the jars in a compile task
//that are unused
- task findUsage() << {
- description "Find usages of a jar in the source code"
+ task findUsage() {
+ doLast {
+ description "Find usages of a jar in the source code"
- String jarName = System.getProperty("jar.name")
- if(jar == null || jar == "") {
- println "You must specify a jar name: ./gradlew findUsage -Djar.name=commons-io"
- return
- }
- FileTree sourceFiles = compileJava.source
- FileCollection jars = compileJava.classpath
+ String jarName = System.getProperty("jar.name")
+ if(jar == null || jar == "") {
+ println "You must specify a jar name: ./gradlew findUsage -Djar.name=commons-io"
+ return
+ }
+ FileTree sourceFiles = compileJava.source
+ FileCollection jars = compileJava.classpath
- File jar = jars.find{file -> file.name.contains(jarName)}
+ File jar = jars.find{file -> file.name.contains(jarName)}
- FileTree jarContents = zipTree(jar)
- Set packages = new HashSet()
- jarContents.visit{file ->
- if(!file.isDirectory() && !file.path.contains("META-INF")) {
- packages.add(file.relativePath.parent.toString().replace('/', '.'))
+ FileTree jarContents = zipTree(jar)
+ Set packages = new HashSet()
+ jarContents.visit{file ->
+ if(!file.isDirectory() && !file.path.contains("META-INF")) {
+ packages.add(file.relativePath.parent.toString().replace('/', '.'))
+ }
}
- }
- println("Packages")
- println "========"
- packages.each { p -> println p }
+ println("Packages")
+ println "========"
+ packages.each { p -> println p }
- println ""
- println("Matches")
- println "========"
- sourceFiles.visit{ file ->
- if(!file.isDirectory()) {
- boolean matches = false;
- file.file.eachLine { line ->
- def matcher = line =~ /^import (.*)\..*;/
- if(matcher) {
- def pack = matcher[0][1]
-// println pack
- matches |= packages.contains(pack)
+ println ""
+ println("Matches")
+ println "========"
+ sourceFiles.visit{ file ->
+ if(!file.isDirectory()) {
+ boolean matches = false;
+ file.file.eachLine { line ->
+ def matcher = line =~ /^import (.*)\..*;/
+ if(matcher) {
+ def pack = matcher[0][1]
+// println pack
+ matches |= packages.contains(pack)
+ }
}
- }
- if(matches) {
- println file.relativePath;
+ if(matches) {
+ println file.relativePath;
+ }
}
}
}
}
-
}
diff --git a/gradle/ide.gradle b/gradle/ide.gradle
index 8d70505..246cd3a 100644
--- a/gradle/ide.gradle
+++ b/gradle/ide.gradle
@@ -57,15 +57,19 @@ subprojects {
// will have trouble unless we tell it to use UTF-8 encoding.
// This setting needs to go into the core.resources.prefs file,
// which the JDT script isn't set up to configure
- eclipseJdt << {
- File f = file('.settings/org.eclipse.core.resources.prefs')
- f.write('eclipse.preferences.version=1\n')
- f.append('encoding/<project>=utf-8')
+ eclipseJdt {
+ doLast {
+ File f = file('.settings/org.eclipse.core.resources.prefs')
+ f.write('eclipse.preferences.version=1\n')
+ f.append('encoding/<project>=utf-8')
+ }
}
}
- cleanEclipse << {
- delete '.settings/org.eclipse.core.resources.prefs'
+ cleanEclipse {
+ doLast {
+ delete '.settings/org.eclipse.core.resources.prefs'
+ }
}
tasks.eclipse.dependsOn(cleanEclipse)
--
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].