Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
exclude target directory
  • Loading branch information
chenson42 committed Oct 13, 2015
1 parent 1fb3531 commit 2b0ea71
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions symmetric-assemble/common.gradle
Expand Up @@ -36,12 +36,38 @@ allprojects {
}
}

eclipse.project.file.withXml { provider ->
ignoreDerivedResources(provider.asNode())
}

ext {
majorMinorVersion = version.substring(0, version.indexOf(".", version.indexOf(".")+ 1))
}

}

def ignoreDerivedResources(projectDescription, directories = ["build", "target", "test-output"]) {
def count = directories.count { file(it).exists() }
if (count > 0) {
def filter = projectDescription
.appendNode("filteredResources")
.appendNode("filter")
filter.appendNode("id", System.currentTimeMillis().toString().trim())
filter.appendNode("type", "26")
filter.appendNode("name")
def matcher = filter.appendNode("matcher")
matcher.appendNode("id", "org.eclipse.ui.ide.orFilterMatcher")
def arguments = matcher.appendNode("arguments")
directories.each {
if (file(it).exists()) {
def dirMatcher = arguments.appendNode("matcher")
dirMatcher.appendNode("id", "org.eclipse.ui.ide.multiFilter")
dirMatcher.appendNode("arguments", "1.0-projectRelativePath-matches-false-false-${it}")
}
}
}
}

subprojects { subproject ->

apply plugin:'license-report'
Expand Down

0 comments on commit 2b0ea71

Please sign in to comment.