From 17b7e93bd94fc3a82b59c608c1951c1a1a3086e7 Mon Sep 17 00:00:00 2001 From: Jonathan Oddy Date: Sun, 25 Oct 2026 07:20:45 +0000 Subject: [PATCH] Ship LICENSE and the upstream NOTICEs in every jar Envoy and Prometheus client_model, whose protos we bundle and generate classes from, ship NOTICE files. Apache 2.0 section 4 asks that what we distribute carries them. NOTICE holds both, and goes into META-INF of the main, sources and javadoc jars with LICENSE. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01LjfJneYfZvPVJht93FjFQW --- NOTICE | 16 ++++++++++++++++ README.md | 4 ++++ build.gradle | 4 ++++ 3 files changed, 24 insertions(+) create mode 100644 NOTICE diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..6063d3b --- /dev/null +++ b/NOTICE @@ -0,0 +1,16 @@ +envoy-api: Java classes generated from the Envoy API and the protos it depends on. + +This product includes the Envoy API (https://github.com/envoyproxy/envoy): + + Envoy + Copyright The Envoy Project Authors + + Licensed under Apache License 2.0. See LICENSE for terms. + +This product includes the Prometheus data model (https://github.com/prometheus/client_model): + + Data model artifacts for Prometheus. + Copyright 2012-2015 The Prometheus Authors + + This product includes software developed at + SoundCloud Ltd. (http://soundcloud.com/). diff --git a/README.md b/README.md index 2308ab5..bfea8a8 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ proto dependencies (xds, udpa, protoc-gen-validate, googleapis, cel, OpenTelemet This needs the [`buf` CLI](https://buf.build/docs/cli/installation/) on your `PATH`. +Envoy and its proto dependencies are all Apache 2.0, like this project. `NOTICE` carries the notices of those that +have one (Envoy, Prometheus client_model), and goes into every jar with `LICENSE`. Check it when Envoy adds a +dependency to `api/buf.yaml`. + `google/api/annotations.proto`, `google/api/http.proto` and `google/rpc/status.proto` are not bundled: they come from `com.google.api.grpc:proto-google-common-protos`, which gRPC already depends on, so the classes aren't duplicated. diff --git a/build.gradle b/build.gradle index 627cf8f..dea472a 100644 --- a/build.gradle +++ b/build.gradle @@ -34,6 +34,10 @@ java { tasks.withType(Jar).configureEach { duplicatesStrategy = DuplicatesStrategy.EXCLUDE + // Apache 2.0 section 4: what we distribute carries the licence and the upstream NOTICEs. + metaInf { + from(rootProject.file("LICENSE"), rootProject.file("NOTICE")) + } } tasks.withType(Javadoc).configureEach {