Skip to content

Commit

Permalink
specific license/notice
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Nov 13, 2024
1 parent ed10fdc commit ca013c1
Show file tree
Hide file tree
Showing 4 changed files with 294 additions and 4 deletions.
6 changes: 4 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ lazy val codegen = Project(id = "codegen", base = file("codegen"))
.disablePlugins(MimaPlugin)
.settings(Dependencies.codegen)
.settings(resolvers += Resolver.sbtPluginRepo("releases"))
.settings(MetaInfLicenseNoticeCopy.assemblySettings)
.settings(
name := s"$pekkoPrefix-codegen",
mkBatAssemblyTask := {
Expand All @@ -73,7 +74,7 @@ lazy val codegen = Project(id = "codegen", base = file("codegen"))
(assembly / assemblyMergeStrategy) := {
case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
case PathList("META-INF", "versions", _, "module-info.class") => MergeStrategy.discard
case "LICENSE" | "NOTICE" => MergeStrategy.discard
case "LICENSE" | "LICENSE.txt" | "NOTICE" => MergeStrategy.discard
case _ => MergeStrategy.deduplicate
},
crossScalaVersions := Dependencies.Versions.CrossScalaForPlugin,
Expand Down Expand Up @@ -121,6 +122,7 @@ lazy val runtime = Project(id = "runtime", base = file("runtime"))
val pekkoGrpcProtocPluginId = s"$pekkoPrefix-scalapb-protoc-plugin"
lazy val scalapbProtocPlugin = Project(id = "scalapb-protoc-plugin", base = file("scalapb-protoc-plugin"))
.disablePlugins(MimaPlugin)
.settings(MetaInfLicenseNoticeCopy.assemblySettings)
.settings(
name := s"$pekkoPrefix-scalapb-protoc-plugin",
libraryDependencies += {
Expand All @@ -140,7 +142,7 @@ lazy val scalapbProtocPlugin = Project(id = "scalapb-protoc-plugin", base = file
(assembly / assemblyMergeStrategy) := {
case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
case PathList("META-INF", "versions", _, "module-info.class") => MergeStrategy.discard
case "LICENSE" | "NOTICE" => MergeStrategy.discard
case "LICENSE" | "LICENSE.txt" | "NOTICE" => MergeStrategy.discard
case _ => MergeStrategy.deduplicate
})
.settings(
Expand Down
55 changes: 54 additions & 1 deletion legal/AssemblyLicense.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,57 @@

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

TODO add dependency licenses
The pekko-grpc-codegen and pekko-grpc-scalapb-protoc-plugin assembly jars and
bat archives contain classes from 3rd party projects.

Apache License Version 2.0:

com.thesamet.scalapb:compilerplugin
com.thesamet.scalapb:protoc-gen
com.thesamet.scalapb:protoc-bridge
io.grpc:grpc-api
io.grpc:grpc-protobuf
io.grpc:grpc-protobuf-lite
org.checkerframework:checker-qual
org.playframework.twirl:twirl-api
org.scala-lang:scala-library
org.scala-lang:scala3-library
org.scala-lang.modules:scala-collection-compat
org.scala-lang.modules:scala-xml

----

Checker Framework qualifiers
Copyright 2004-present by the Checker Framework developers

MIT License:

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

----

com.google.api.grpc:proto-google-common-protos:2.41.0
com.google.protobuf:protobuf-java
com.google.code.findbugs:jsr305
com.google.errorprone:error_prone_annotations
com.google.guava:guava
com.google.guava:failureaccess
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-..
com.google.j2objc:j2objc-annotations
dev.dirs:directories
231 changes: 231 additions & 0 deletions legal/AssemblyNotice.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
Apache Pekko gRPC
Copyright 2022-2024 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).

This product contains significant parts that were originally based on software from Lightbend (Akka <https://akka.io/>).
Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>

Apache Pekko gRPC is derived from Akka gRPC 2.1.x, the last version that was distributed under the
Apache License, Version 2.0 License.

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

The pekko-grpc-codegen and pekko-grpc-scalapb-protoc-plugin assembly jars and
bat archives contain classes from 3rd party projects. Some of these projects
have NOTICE files - included below.

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

grpc-api, grpc-protobuf, grpc-protobuf-lite

Copyright 2014 The gRPC Authors

Licensed 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.

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

This product contains a modified portion of 'OkHttp', an open source
HTTP & SPDY client for Android and Java applications, which can be obtained
at:

* LICENSE:
* okhttp/third_party/okhttp/LICENSE (Apache License 2.0)
* HOMEPAGE:
* https://github.com/square/okhttp
* LOCATION_IN_GRPC:
* okhttp/third_party/okhttp

This product contains a modified portion of 'Envoy', an open source
cloud-native high-performance edge/middle/service proxy, which can be
obtained at:

* LICENSE:
* xds/third_party/envoy/LICENSE (Apache License 2.0)
* NOTICE:
* xds/third_party/envoy/NOTICE
* HOMEPAGE:
* https://www.envoyproxy.io
* LOCATION_IN_GRPC:
* xds/third_party/envoy

This product contains a modified portion of 'protoc-gen-validate (PGV)',
an open source protoc plugin to generate polyglot message validators,
which can be obtained at:

* LICENSE:
* xds/third_party/protoc-gen-validate/LICENSE (Apache License 2.0)
* NOTICE:
* xds/third_party/protoc-gen-validate/NOTICE
* HOMEPAGE:
* https://github.com/envoyproxy/protoc-gen-validate
* LOCATION_IN_GRPC:
* xds/third_party/protoc-gen-validate

This product contains a modified portion of 'udpa',
an open source universal data plane API, which can be obtained at:

* LICENSE:
* xds/third_party/udpa/LICENSE (Apache License 2.0)
* HOMEPAGE:
* https://github.com/cncf/udpa
* LOCATION_IN_GRPC:
* xds/third_party/udpa

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

scala-library and scala-xml
Copyright (c) 2002-2024 EPFL
Copyright (c) 2011-2024 Lightbend, Inc.

Scala includes software developed at
LAMP/EPFL (https://lamp.epfl.ch/) and
Lightbend, Inc. (https://www.lightbend.com/).

Licensed under the Apache License, Version 2.0 (the "License").
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.

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

scala-collection-compat
Copyright (c) 2002-2023 EPFL
Copyright (c) 2011-2023 Lightbend, Inc.

Scala includes software developed at
LAMP/EPFL (https://lamp.epfl.ch/) and
Lightbend, Inc. (https://www.lightbend.com/).

Licensed under the Apache License, Version 2.0 (the "License").
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.

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

scala3-library

Dotty (https://dotty.epfl.ch)
Copyright 2012-2024 EPFL
Copyright 2012-2024 Lightbend, Inc.

Licensed under the Apache License, Version 2.0 (the "License"):
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.

The dotty compiler frontend has been developed since November 2012 by Martin
Odersky. It is expected and hoped for that the list of contributors to the
codebase will grow quickly. Dotty draws inspiration and code from the original
Scala compiler "nsc", which is developed at scala/scala [1].

The majority of the dotty codebase is new code, with the exception of the
components mentioned below. We have for each component tried to come up with a
list of the original authors in the scala/scala [1] codebase. Apologies if some
major authors were omitted by oversight.

* dotty.tools.dotc.ast: The syntax tree handling is mostly new, but some
elements, such as the idea of tree copiers and the `TreeInfo` module,
were adopted from scala/scala [1]. The original authors of these parts
include Martin Odersky, Paul Phillips, Adriaan Moors, and Matthias Zenger.

* dotty.tools.dotc.classpath: The classpath handling is taken mostly as is
from scala/scala [1]. The original authors were Grzegorz Kossakowski,
Michał Pociecha, Lukas Rytz, Jason Zaugg and others.

* dotty.tools.dotc.config: The configuration components were adapted and
extended from scala/scala [1]. The original sources were authored by Paul
Phillips with contributions from Martin Odersky, Miguel Garcia and others.

* dotty.tools.dotc.core: The core data structures and operations are mostly
new. Some parts (e.g. those dealing with names) were adapted from
scala/scala [1]. These were originally authored by Martin Odersky, Adriaan
Moors, Jason Zaugg, Paul Phillips, Eugene Burmako and others.

* dotty.tools.dotc.core.pickling: The classfile readers were adapted from the
current Scala compiler. Original authors were Martin Odersky, Iulian
Dragos, Matthias Zenger and others.

* dotty.tools.dotc.parsing: The lexical and syntactic analysis components
were adapted from the current Scala compiler. They were originally authored
by Martin Odersky, Burak Emir, Paul Phillips, Lex Spoon, Sean McDirmid and
others.

* dotty.tools.dotc.profile: The per-phase profiling support is taken mostly
as is from scala/scala. The original author was Mike Skells.

* dotty.tools.dotc.reporting: Adapted from scala/scala [1] with some heavy
modifications. They were originally authored by Matthias Zenger, Martin
Odersky, and others.

* dotty.tools.dotc.typer: This is new code except for some minor components
(e.g. the ConstantFolder). It uses however many solution details that have
been developed over time by many people, including Jason Zaugg, Adriaan
Moors, Lukas Rytz, Paul Phillips, Grzegorz Kossakowski, and others.

* dotty.tools.dotc.util: The utilities package is a mix of new and adapted
components. The files in scala/scala [1] were originally authored by many
people, including Paul Phillips, Martin Odersky, Sean McDirmid, and others.

* dotty.tools.io: The I/O support library was adapted from current Scala
compiler. Original authors were Paul Phillips and others.

* dotty.test.DottyBytecodeTest: Is an adaptation of the bytecode testing from
scala/scala [1]. It has been reworked to fit the needs of dotty. Original
authors include: Adrian Moors, Lukas Rytz, Grzegorz Kossakowski, Paul
Phillips.

* dotty.tools.dotc.sbt and everything in sbt-bridge: The sbt compiler phases
are based on [2] which attempts to integrate the sbt phases into scalac and
is itself based on the compiler bridge in sbt 0.13 [3], but has been
heavily adapted and refactored. Original authors were Mark Harrah, Grzegorz
Kossakowski, Martin Duhemm, Adriaan Moors and others.

* dotty.tools.dotc.plugins: Adapted from scala/scala [1] with some
modifications. They were originally authored by Lex Spoon, Som Snytt,
Adriaan Moors, Paul Phillips and others.

* dotty.tools.scaladoc: The Scaladoc documentation utility ships some
third-party JavaScript and CSS libraries which are located under
scaladoc/resources/dotty_res/styles/, scaladoc/resources/dotty_res/scripts/, docs/css/ and
docs/js/. Please refer to the license header of the concerned files for
details.

* dotty.tools.dotc.coverage: Coverage instrumentation utilities have been
adapted from the scoverage plugin for scala 2 [4], which is under the
Apache 2.0 license.

* dooty.tools.pc: Presentation compiler implementation adapted from
scalameta/metals [5] mtags module, which is under the Apache 2.0 license.

* The Dotty codebase contains parts which are derived from
the ScalaPB protobuf library [6], which is under the Apache 2.0 license.


[1] https://github.com/scala/scala
[2] https://github.com/adriaanm/scala/tree/sbt-api-consolidate/src/compiler/scala/tools/sbt
[3] https://github.com/sbt/sbt/tree/0.13/compile/interface/src/main/scala/xsbt
[4] https://github.com/scoverage/scalac-scoverage-plugin
[5] https://github.com/scalameta/metals
[6] https://github.com/scala/scala3/pull/5783/files

6 changes: 5 additions & 1 deletion project/MetaInfLicenseNoticeCopy.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import sbt.Keys._
import sbt._
import org.mdedetrich.apache.sonatype.ApacheSonatypePlugin
import ApacheSonatypePlugin.autoImport.{ apacheSonatypeDisclaimerFile, apacheSonatypeLicenseFile }
import ApacheSonatypePlugin.autoImport.{ apacheSonatypeLicenseFile, apacheSonatypeNoticeFile }

/**
* Copies LICENSE and NOTICE files into jar META-INF dir
Expand All @@ -37,4 +37,8 @@ object MetaInfLicenseNoticeCopy extends AutoPlugin {
lazy val runtimeSettings = Seq(
apacheSonatypeLicenseFile := baseDir.value / "legal" / "RuntimeLicense.txt")

lazy val assemblySettings = Seq(
apacheSonatypeLicenseFile := baseDir.value / "legal" / "AssemblyLicense.txt",
apacheSonatypeNoticeFile := baseDir.value / "legal" / "AssemblyNotice.txt")

}

0 comments on commit ca013c1

Please sign in to comment.