Add a NOTICE-tools to cover third-party code in the "toolsrc" directory

Fix a few other small build issues as well.
This commit is contained in:
Gregory Brail 2022-01-05 10:00:42 -08:00 коммит произвёл Greg Brail
Родитель 4b95d3835b
Коммит a4a6915f31
3 изменённых файлов: 57 добавлений и 20 удалений

4
.github/workflows/publish-github.yml поставляемый
Просмотреть файл

@ -25,11 +25,11 @@ jobs:
settings-path: ${{ github.workspace }}
- name: Publish
env:
ORG_GRADLE_PROJECT_mavenUser: ${{ github.actor }}
ORG_GRADLE_PROJECT_mavenPassword: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_SIGNINGKEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
ORG_GRADLE_PROJECT_SIGNINGPASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
run: >-
./gradlew publish
-PmavenReleaseRepo="https://maven.pkg.github.com/mozilla/rhino"
-PmavenSnapshotRepo="https://maven.pkg.github.com/mozilla/rhino"
-PmavenUser=${{ github.actor }}
-PmavenPassword=${{ secrets.GITHUB_TOKEN }}

37
NOTICE-tools.txt Normal file
Просмотреть файл

@ -0,0 +1,37 @@
Rhino is licensed subject to the terms of the Mozilla Public License, v. 2.0.
See "LICENSE.txt" for the text of the license.
The files in toolsrc/org/mozilla/javascript/tools/debugger/treetable (runtime
package org.mozilla.javascript.tools.debugger.treetable) are available under
the following license:
----
Copyright 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of Sun Microsystems nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Просмотреть файл

@ -205,13 +205,17 @@ task engineJar(type: Jar) {
}
jar {
dependsOn runtimeJar, engineJar
dependsOn compileJava
from ('LICENSE.txt') {
into 'META-INF'
}
from ('NOTICE.txt') {
into 'META-INF'
}
from ('NOTICE-tools.txt') {
into 'META-INF'
}
from sourceSets.main.output
excludes = ["org/mozilla/javascript/engine/**", "META-INF/services/**"]
// Class ImplementationVersion uses 'Implementation-Title'
manifest {
@ -255,12 +259,16 @@ task engineJavadocJar(type: Jar) {
task sourceJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
from ('LICENSE.txt') {
into 'META-INF'
}
from ('NOTICE.txt') {
into 'META-INF'
}
from ('NOTICE-tools.txt') {
into 'META-INF'
}
}
task runtimeSourceJar(type: Jar) {
@ -289,6 +297,7 @@ publishing {
rhino(MavenPublication) {
groupId 'org.mozilla'
artifactId 'rhino'
artifacts = [jar, sourceJar, javadocJar]
pom.withXml {
def root = asNode()
@ -319,13 +328,6 @@ publishing {
o.appendNode("url", "http://www.mozilla.org")
}
from components.java
artifact sourceJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
}
rhinoruntime(MavenPublication) {
@ -358,7 +360,6 @@ publishing {
def o = root.appendNode("organization")
o.appendNode("name", "The Mozilla Foundation")
o.appendNode("url", "http://www.mozilla.org")
}
}
@ -421,16 +422,15 @@ publishing {
signing {
if (project.hasProperty('SIGNINGKEY')) {
// Check for ORG_GRADLE_PROJECT_SIGNINGKEY environment variable for use in CI system
def signingKey = getProperty('SIGNINGKEY')
def signingPassword = getProperty('SIGNINGPASSWORD')
useInMemoryPgpKeys(signingKey, signingPassword)
} else {
useGpgCmd()
// Check for ORG_GRADLE_PROJECT_SIGNINGKEY environment variable for use in CI system.
// Otherwise, do not sign.
def signingKey = getProperty('SIGNINGKEY')
def signingPassword = getProperty('SIGNINGPASSWORD')
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.rhino
sign publishing.publications.rhinoengine
sign publishing.publications.rhinoruntime
}
sign publishing.publications.rhino
sign publishing.publications.rhinoengine
sign publishing.publications.rhinoruntime
}
spotbugs {