Skip to content

Commit

Permalink
L&N tweaks (fix SDK zip)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulk-asert committed Jul 23, 2015
1 parent afcfdf0 commit 6a9032f
Show file tree
Hide file tree
Showing 19 changed files with 400 additions and 99 deletions.
10 changes: 5 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,15 @@
See the License for the specific language governing permissions and
limitations under the License.

--------------------------------------------------------------------
------------------------------------------------------------------------

Asciidoc License

This product uses the style.css from asciidoctor.org within
documentation. The file is available under the MIT License.
For details, see licenses/asciidoc-style-license.txt.

--------------------------------------------------------------------
------------------------------------------------------------------------

JLine2 Patch License

Expand All @@ -222,7 +222,7 @@ https://github.com/jline/jline2/issues/90
JLine2 is made available under a BSD License.
For details, see licenses/jline2-license.

--------------------------------------------------------------------
------------------------------------------------------------------------

JQuery License

Expand All @@ -233,7 +233,7 @@ The following file is used within documentation:
This file is made available under the following MIT license:
licenses/jquery-js-license.txt

--------------------------------------------------------------------
------------------------------------------------------------------------

JSR223 License

Expand All @@ -247,7 +247,7 @@ were derived from reference implementation files developed by Sun in
collaboration with the Groovy community. The reference implementation
has a BSD-style license. Details can be found in: licenses/jsr223-license.txt

--------------------------------------------------------------------
------------------------------------------------------------------------

normalize.css License

Expand Down
61 changes: 46 additions & 15 deletions gradle/assemble.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ ext.docSpec = copySpec {
include 'jquery-js-license.txt'
include 'normalize-stylesheet-license.txt'
}
from "$projectDir/licenses/LICENSE-DOC"
from "$projectDir/notices/NOTICE-BASE"
from "$projectDir/DISCLAIMER"
rename 'LICENSE-DOC', 'LICENSE'
rename 'NOTICE-BASE', 'NOTICE'
}

task copy(type: Copy) {
Expand Down Expand Up @@ -481,10 +486,12 @@ ext.distSpec = copySpec {
into('lib') {
from jar.archivePath
from {
configurations.runtime.findAll { it.name.endsWith('jar') && !it.name.startsWith('asm-') && !it.name.startsWith('antlr-') } +
configurations.runtime.findAll {
it.name.endsWith('jar') && !it.name.startsWith('openbeans-') && !it.name.startsWith('asm-') && !it.name.startsWith('antlr-') } +
modules()*.jar.archivePath +
modules().configurations.runtime*.findAll {
it.name.endsWith('jar') && !it.name.contains('livetribe-jsr223') && !it.name.matches(/groovy-\d.*/) && !it.name.startsWith('asm-') && !it.name.startsWith('antlr-')
it.name.endsWith('jar') && !it.name.contains('livetribe-jsr223') && !it.name.matches(/groovy-\d.*/) &&
!it.name.startsWith('asm-') && !it.name.startsWith('antlr-') && !it.name.startsWith('openbeans-')
}.flatten() as Set
}
from('src/bin/groovy.icns')
Expand All @@ -497,6 +504,14 @@ ext.distSpec = copySpec {
}
}
}
into('grooid') {
from { new File(jar.archivePath.parent, "${jar.baseName}-${jar.version}-grooid.jar") }
from {
modules()*.jar.collect { j ->
new File(j.archivePath.parent, "${j.baseName}-${j.version}-grooid.jar")
}
}
}
into('conf') {
from 'src/conf'
}
Expand Down Expand Up @@ -538,10 +553,6 @@ task distDoc(type: Zip, dependsOn: doc) {
appendix = 'docs'
into("groovy-$version") {
with docSpec
from "$projectDir/licenses/LICENSE-DOC"
from "$projectDir/notices/NOTICE-BASE"
from "$projectDir/DISCLAIMER"
rename { String filename -> filename == 'LICENSE-DOC' ? 'LICENSE' : filename == 'NOTICE-BASE' ? 'NOTICE' : filename }
}
}

Expand All @@ -556,7 +567,7 @@ task syncDoc(type: Copy, dependsOn: doc) {
into('gapi') {
from groovydoc.destinationDir
}
// groovy-jdk already at the good place
// groovy-jdk already at the correct place
}

task distSrc(type: Zip) {
Expand All @@ -581,11 +592,17 @@ task installGroovy(type: Sync, dependsOn: distBin) {
into installDir
}

import org.gradle.api.file.DuplicatesStrategy

task dist(type: Zip, dependsOn: [distBin, distSrc, distDoc, syncDoc]) {
description = 'Generates the binary, sources, documentation and full distributions'
baseName = 'apache-groovy'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
appendix 'sdk'
into "groovy-$version"
from("$projectDir/licenses/LICENSE-SDK")
from("$projectDir/notices/NOTICE-SDK")
rename { String filename -> filename == 'LICENSE-SDK' ? 'LICENSE' : filename == 'NOTICE-SDK' ? 'NOTICE' : filename }
with distSpec
into('doc') {
with docSpec
Expand Down Expand Up @@ -614,10 +631,10 @@ task updateLicenses {
ext.licenseBinZipFile = "${licensesDir}/LICENSE-BINZIP"
ext.licenseDocFile = "${licensesDir}/LICENSE-DOC"
ext.licenseJarJarFile = "${licensesDir}/LICENSE-JARJAR"
ext.licenseSdkFile = "${licensesDir}/LICENSE-SDK"
inputs.files(licenseBaseFile, fileTree(licensesDir).include('*.txt'))
outputs.files(licenseAllJarJarFile, licenseBinZipFile, licenseDocFile,
licenseJarJarFile, licenseSrcFile, licenseDocGeneratorFile,
licenseGroovyDocFile, licenseGroovyshFile, licenseJsr223File)
outputs.files(licenseAllJarJarFile, licenseBinZipFile, licenseDocFile, licenseJarJarFile, licenseSrcFile,
licenseDocGeneratorFile, licenseGroovyDocFile, licenseGroovyshFile, licenseJsr223File, licenseSdkFile)

doLast {
def srcFiles = fileTree(licensesDir).include('*-SRC*.txt').sort { it.name }
Expand All @@ -636,6 +653,7 @@ task updateLicenses {
def groovydocFiles = fileTree(licensesDir).include('normalize-stylesheet-groovy-groovydoc.txt')
def groovyshFiles = fileTree(licensesDir).include('jline2-patch-ALLJARJAR-SRC.txt')
def jsr223Files = fileTree(licensesDir).include('jsr223-ALLJARJAR-SRC.txt')
def licenseHdr = '\n\n------------------------------------------------------------------------\n\n'
[
(licenseAllJarJarFile) : allJarjarFiles,
(licenseBinZipFile) : binzipFiles,
Expand All @@ -648,11 +666,16 @@ task updateLicenses {
(licenseJsr223File) : jsr223Files,
].each { outFile, inFiles ->
file(outFile).withWriter('utf-8') { writer ->
writer << ([file(licenseBaseFile)] + inFiles).collect {
it.text.replaceAll(/[\n\r]*$/, '')
}.join('\n\n--------------------------------------------------------------------\n\n')
writer << ([file(licenseBaseFile)] + inFiles).collect { it.text.replaceAll(/[\n\r]*$/, '') }.join(licenseHdr)
}
}
file(licenseSdkFile).withWriter { writer ->
writer << [
file(licenseBinZipFile).text,
"This convenience zip embeds Groovy's src and doc zips.\nSee also src/LICENSE " +
"and doc/LICENSE files for additional license information."
].join(licenseHdr)
}
}
}

Expand All @@ -668,9 +691,10 @@ task updateNotices {
ext.noticeGrooidFile = "${noticesDir}/NOTICE-GROOID"
ext.noticeGrooidJarJarFile = "${noticesDir}/NOTICE-GROOIDJARJAR"
ext.noticeJarJarFile = "${noticesDir}/NOTICE-JARJAR"
ext.noticeSdkFile = "${noticesDir}/NOTICE-SDK"
inputs.files(noticeBaseFile, fileTree(noticesDir).include('*.txt'))
outputs.files(noticeAllJarJarFile, noticeBinZipFile, noticeGrooidFile,
noticeGrooidJarJarFile, noticeJarJarFile, noticeSrcFile, noticeGroovyConsoleFile)
outputs.files(noticeAllJarJarFile, noticeBinZipFile, noticeGrooidFile, noticeGrooidJarJarFile,
noticeJarJarFile, noticeSrcFile, noticeGroovyConsoleFile, noticeSdkFile)

doLast {
def srcFiles = fileTree(noticesDir).include('*-SRC*.txt').sort { it.name }
Expand Down Expand Up @@ -706,5 +730,12 @@ task updateNotices {
}.join('\n\n')
}
}
file(noticeSdkFile).withWriter { writer ->
writer << [
file(noticeBinZipFile).text,
"This convenience zip embeds Groovy's src and doc zips.\nSee also src/NOTICE " +
"and doc/NOTICE files for additional notice information."
].join('\n\n')
}
}
}
15 changes: 0 additions & 15 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
# 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.

#Mon May 11 13:37:20 AEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
Expand Down
10 changes: 5 additions & 5 deletions licenses/LICENSE-ALLJARJAR
Original file line number Diff line number Diff line change
Expand Up @@ -201,20 +201,20 @@
See the License for the specific language governing permissions and
limitations under the License.

--------------------------------------------------------------------
------------------------------------------------------------------------

ANTLR 2 License

Antlr2 is released in the public domain.
See licenses/antlr2-license.txt for details.

--------------------------------------------------------------------
------------------------------------------------------------------------

ASM 4 License

ASM 4 uses a 3-clause BSD license. For details, see licenses/asm-license.txt.

--------------------------------------------------------------------
------------------------------------------------------------------------

JLine2 Patch License

Expand All @@ -227,7 +227,7 @@ https://github.com/jline/jline2/issues/90
JLine2 is made available under a BSD License.
For details, see licenses/jline2-license.

--------------------------------------------------------------------
------------------------------------------------------------------------

JSR223 License

Expand All @@ -241,7 +241,7 @@ were derived from reference implementation files developed by Sun in
collaboration with the Groovy community. The reference implementation
has a BSD-style license. Details can be found in: licenses/jsr223-license.txt

--------------------------------------------------------------------
------------------------------------------------------------------------

normalize.css License

Expand Down
24 changes: 12 additions & 12 deletions licenses/LICENSE-BINZIP
Original file line number Diff line number Diff line change
Expand Up @@ -201,34 +201,34 @@
See the License for the specific language governing permissions and
limitations under the License.

--------------------------------------------------------------------
------------------------------------------------------------------------

ANTLR 2 License

Antlr2 is released in the public domain.
See licenses/antlr2-license.txt for details.

--------------------------------------------------------------------
------------------------------------------------------------------------

ASM 4 License

ASM 4 uses a 3-clause BSD license. For details, see licenses/asm-license.txt.

--------------------------------------------------------------------
------------------------------------------------------------------------

Hamcrest License (needed when using optional JUnit dependency)

This product bundles the Hamcrest jar, which is available under a
BSD license. For details, see licenses/hamcrest-license.

--------------------------------------------------------------------
------------------------------------------------------------------------

JLine2 License (optional dependency used with groovysh)

This product bundles the JLine2 jar, which is available under a
BSD License. For details, see licenses/jline2-license.

--------------------------------------------------------------------
------------------------------------------------------------------------

JLine2 Patch License

Expand All @@ -241,15 +241,15 @@ https://github.com/jline/jline2/issues/90
JLine2 is made available under a BSD License.
For details, see licenses/jline2-license.

--------------------------------------------------------------------
------------------------------------------------------------------------

JSR166y License (optionally used by the optional GPars dependency)

This product bundles the jsr166y jar (resulting from the works
by the JSR-166 EG, Doug Lea, and Jason T. Greene), which is available in
This product bundles the jsr166y jar (containing works from
the JSR-166 EG, Doug Lea, and Jason T. Greene) made available in
the public domain. For details, see licenses/jsr166y-license.

--------------------------------------------------------------------
------------------------------------------------------------------------

JSR223 License

Expand All @@ -263,22 +263,22 @@ were derived from reference implementation files developed by Sun in
collaboration with the Groovy community. The reference implementation
has a BSD-style license. Details can be found in: licenses/jsr223-license.txt

--------------------------------------------------------------------
------------------------------------------------------------------------

JUnit License (optional dependency when using Groovy for testing)

This product bundles the JUnit jar, which is available under the
Eclipse Public License v1.0. For details, see licenses/junit-license.

--------------------------------------------------------------------
------------------------------------------------------------------------

normalize.css License

The stylesheet.css file (originally normalize.css) is used by the
groovydoc and docgenerator components for groovy-jdk/gapi documentation.
It is made available under a MIT License. Details: licenses/normalize-stylesheet-license.txt

--------------------------------------------------------------------
------------------------------------------------------------------------

XStream License (optional dependency when serializing AST as XML)

Expand Down
6 changes: 3 additions & 3 deletions licenses/LICENSE-DOC
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,15 @@
See the License for the specific language governing permissions and
limitations under the License.

--------------------------------------------------------------------
------------------------------------------------------------------------

Asciidoc License

This product uses the style.css from asciidoctor.org within
documentation. The file is available under the MIT License.
For details, see licenses/asciidoc-style-license.txt.

--------------------------------------------------------------------
------------------------------------------------------------------------

JQuery License

Expand All @@ -220,7 +220,7 @@ The following file is used within documentation:
This file is made available under the following MIT license:
licenses/jquery-js-license.txt

--------------------------------------------------------------------
------------------------------------------------------------------------

normalize.css License

Expand Down
4 changes: 2 additions & 2 deletions licenses/LICENSE-JARJAR
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@
See the License for the specific language governing permissions and
limitations under the License.

--------------------------------------------------------------------
------------------------------------------------------------------------

ANTLR 2 License

Antlr2 is released in the public domain.
See licenses/antlr2-license.txt for details.

--------------------------------------------------------------------
------------------------------------------------------------------------

ASM 4 License

Expand Down
Loading

0 comments on commit 6a9032f

Please sign in to comment.