Skip to content
Permalink
Browse files

Improved: Rewrite ‘getJarManifestClasspathForCurrentOs’ (OFBIZ-10872)

Simplify the code logic and rename it ‘getJarClasspath’.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856197 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Mar 25, 2019
1 parent 0c6f530 commit 6dfe4a460b6ecbb499964bbc688ecf4181e84ff7
Showing with 4 additions and 12 deletions.
  1. +4 −12 build.gradle
@@ -290,7 +290,7 @@ sourceSets {
jar.manifest.attributes(
'Implementation-Title': project.name,
'Main-Class': application.mainClassName,
'Class-Path': getJarManifestClasspathForCurrentOs()
'Class-Path': getJarClasspath()
)

// Eclipse plugin settings
@@ -1044,19 +1044,11 @@ def generateFileFromTemplate(templateFileInFullPath, targetDirectory, filterToke
}
}

def getJarManifestClasspathForCurrentOs() {
def osClassPath = ''
if (os.contains('windows')) {
configurations.runtimeClasspath.each { cpEntry ->
osClassPath += '\\' + cpEntry.toString() + ' '
}
} else {
osClassPath = configurations.runtimeClasspath.collect { "$it" }.join(' ')
}
return osClassPath
def getJarClasspath() {
def mapper = os.contains('windows') ? { '\\' + "$it" } : { "$it" }
configurations.runtimeClasspath.collect(mapper).join(' ')
}


def subprojectExists(fullyQualifiedProject) {
subprojects.stream()
.anyMatch { it.path == fullyQualifiedProject.toString() }

0 comments on commit 6dfe4a4

Please sign in to comment.
You can’t perform that action at this time.