You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2018/10/15 15:59:53 UTC

[geode] branch develop updated: Better path resolution for srcDist exclusions

This is an automated email from the ASF dual-hosted git repository.

jbarrett 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 0ee362e  Better path resolution for srcDist exclusions
0ee362e is described below

commit 0ee362e9b2cb0084c74853a0b832e49aca32ba50
Author: Sean Goller <sg...@pivotal.io>
AuthorDate: Fri Sep 28 09:48:48 2018 -0700

    Better path resolution for srcDist exclusions
    
    Previous exclusion would count executable files named 'build' or 'out'
    regardless of path, when we only want to exclude the build-tools output
    directories.
---
 geode-assembly/build.gradle | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index bcb7c4b..f76e470 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -15,6 +15,9 @@
  * limitations under the License.
  */
 
+import java.nio.file.Paths
+import java.nio.file.Path
+
 evaluationDependsOn(":geode-core")
 
 apply plugin: 'distribution'
@@ -359,8 +362,6 @@ distributions {
         exclude '**/gradlew.bat'
         exclude '**/gradle/wrapper/gradle-wrapper.jar'
         exclude '**/.gradle'
-        exclude '**/build/**'
-        exclude '**/out/**'
         exclude '**/.project'
         exclude '**/.classpath'
         exclude '**/.settings/**'
@@ -377,6 +378,17 @@ distributions {
         exclude 'daemon'
         exclude 'native'
         exclude 'wrapper'
+
+        // These exclude the 'build' and 'out' artifact directories from Gradle and IntelliJ for each project
+        exclude 'buildSrc/build'
+        exclude 'buildSrc/out'
+        rootProject.allprojects.each {
+          def relPath = Paths.get(rootDir.getPath()).relativize(Paths.get(it.projectDir.getPath()))
+          def relOut = relPath.resolve("out").toString()
+          def relBuild = relPath.resolve("build").toString()
+          exclude relOut
+          exclude relBuild
+        }
       }
 
     }