Fix Groovy distribution zip
Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/51185f72 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/51185f72 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/51185f72 Branch: refs/heads/master Commit: 51185f72f534755de79d4f770ff59c559c74e121 Parents: 88fed12 Author: Cedric Champeau <cchamp...@apache.org> Authored: Mon Dec 11 11:09:36 2017 +0100 Committer: Cedric Champeau <cchamp...@apache.org> Committed: Mon Dec 11 19:17:11 2017 +0100 ---------------------------------------------------------------------- gradle/assemble.gradle | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/51185f72/gradle/assemble.gradle ---------------------------------------------------------------------- diff --git a/gradle/assemble.gradle b/gradle/assemble.gradle index 5f8e5af..a7dd207 100644 --- a/gradle/assemble.gradle +++ b/gradle/assemble.gradle @@ -352,8 +352,10 @@ ext.distSpec = copySpec { from("$projectDir/licenses/LICENSE-BINZIP") from("$projectDir/notices/NOTICE-BINZIP") rename { String filename -> filename == 'LICENSE-BINZIP' ? 'LICENSE' : filename == 'NOTICE-BINZIP' ? 'NOTICE' : filename } + exclude { it.file.name =~ /-raw/ } into('lib') { - from jar.archivePath + from jarjar + from modules()*.jarjar from { configurations.runtime.findAll { it.name.endsWith('jar') && !it.name.startsWith('openbeans-') && !it.name.startsWith('asm-') && !it.name.startsWith('antlr-') && !it.name.startsWith('antlr4-') } + @@ -366,12 +368,8 @@ ext.distSpec = copySpec { from('src/bin/groovy.icns') } into('indy') { - from { new File(jar.archivePath.parent, "${jar.baseName}-${jar.version}-indy.jar") } - from { - modules()*.jar.collect { j -> - new File(j.archivePath.parent, "${j.baseName}-${j.version}-indy.jar") - } - } + from jarjarWithIndy + from modules()*.jarjarWithIndy } into('grooid') { from { new File(jar.archivePath.parent, "${jar.baseName}-${jar.version}-grooid.jar") } @@ -386,7 +384,7 @@ ext.distSpec = copySpec { } into('bin') { from('src/bin') { - filter(ReplaceTokens, tokens: [GROOVYJAR:jar.archiveName]) + filter(ReplaceTokens, tokens: [GROOVYJAR:jarjar.archiveName]) fileMode = 0755 exclude 'groovy.icns' } @@ -404,15 +402,9 @@ ext.distSpec = copySpec { include 'junit-license.txt' include 'xstream-license.txt' } - into('embeddable') { - subprojects.each { - from jar.archivePath - from { new File(jar.destinationDir, "${jar.baseName}-${jar.version}-indy.jar") } - } - } } -task distBin(type: Zip, dependsOn: [jarjar]) { +task distBin(type: Zip) { baseName = 'apache-groovy' appendix = 'binary' into("groovy-$version") {