geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [3/4] incubator-geode git commit: Fixing eclipse project generation for extensions
Date Tue, 09 Feb 2016 18:04:16 GMT
Fixing eclipse project generation for extensions

Eclipse was not happy with project names with / in them. Fixing the
names of the eclipse projects that are generated. Consolodated the logic
to clean up the name into a utilities gradle file.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/dd49add5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/dd49add5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/dd49add5

Branch: refs/heads/feature/GEODE-773-2
Commit: dd49add597df40dd2eb96618f63e3e750be1f0a0
Parents: 0daf181
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Mon Feb 8 13:38:45 2016 -0800
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Mon Feb 8 17:40:53 2016 -0800

----------------------------------------------------------------------
 build.gradle            |  1 +
 gradle/ide.gradle       |  3 +++
 gradle/java.gradle      |  7 ++++---
 gradle/utilities.gradle | 31 +++++++++++++++++++++++++++++++
 4 files changed, 39 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dd49add5/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 059cf31..7e3fc34 100755
--- a/build.gradle
+++ b/build.gradle
@@ -73,6 +73,7 @@ if (name == 'gemfire') {
   ext.scriptDir = 'gradle'
 }
 
+apply from: "${scriptDir}/utilities.gradle"
 apply from: "${scriptDir}/java.gradle"
 apply from: "${scriptDir}/test.gradle"
 apply from: "${scriptDir}/publish.gradle"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dd49add5/gradle/ide.gradle
----------------------------------------------------------------------
diff --git a/gradle/ide.gradle b/gradle/ide.gradle
index e4c7df5..d6ac715 100644
--- a/gradle/ide.gradle
+++ b/gradle/ide.gradle
@@ -26,6 +26,9 @@ subprojects {
       downloadSources = true
       plusConfigurations += [ configurations.provided ]
     }
+    project {
+      name = sanitizedName()
+    }
     // Several files have UTF-8 encoding and Eclipse running on Windows
     // will have trouble unless we tell it to use UTF-8 encoding.
     // This setting needs to go into the core.resources.prefs file,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dd49add5/gradle/java.gradle
----------------------------------------------------------------------
diff --git a/gradle/java.gradle b/gradle/java.gradle
index 015da2f..758420d 100644
--- a/gradle/java.gradle
+++ b/gradle/java.gradle
@@ -127,8 +127,9 @@ subprojects {
   }
 
   jar {
-    // Intended to strip off 'extensions/' from the modules so that artifacts don't end up
in libs/extensions/
-    def parts = project.name.split("/")
-    baseName = parts[parts.length - 1]
+    baseName = sanitizedName()
   }
+
 }
+
+

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dd49add5/gradle/utilities.gradle
----------------------------------------------------------------------
diff --git a/gradle/utilities.gradle b/gradle/utilities.gradle
new file mode 100644
index 0000000..18aef20
--- /dev/null
+++ b/gradle/utilities.gradle
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+allprojects {
+  //These methods will be added to each individual project.
+  //Use this for methods that access project variables (like project.name)
+  //
+  //What is is doing is adding properties to the extra properties of the
+  //project. Each property is itself a closure.
+  ext {
+    sanitizedName = {
+      // Intended to strip off 'extensions/' from the modules so that artifacts
+      // don't end up in libs/extensions/
+      def parts = project.name.split("/")
+      return parts[parts.length - 1];
+    }
+  }
+}


Mime
View raw message