Skip to content

Add MIT dual licensing (Apache-2.0 OR MIT)#386

Merged
DichenZhang1 merged 4 commits into
google:mainfrom
adamsilverstein:add-mit-dual-licensing
May 8, 2026
Merged

Add MIT dual licensing (Apache-2.0 OR MIT)#386
DichenZhang1 merged 4 commits into
google:mainfrom
adamsilverstein:add-mit-dual-licensing

Conversation

@adamsilverstein

Copy link
Copy Markdown
Contributor

Summary

Add MIT as a dual license option alongside Apache 2.0, enabling GPLv2 compatibility. This follows the exact pattern used by other Google dual-licensed projects (e.g. google/aarch64-paging).

  • Add LICENSE-MIT and LICENSE-APACHE standalone license files
  • Update combined LICENSE file with dual-license preamble and both full license texts
  • Update source file headers across all project-owned files to reference dual licensing
  • Add License section to README.md

Third-party code (third_party/), test data licenses (tests/data/LICENSE), and machine-generated JNI headers are intentionally left unchanged.

Resolves #380

Add MIT as a dual license option alongside Apache 2.0 to enable
GPLv2 compatibility, following the pattern used by other Google
dual-licensed projects (e.g. google/aarch64-paging).

Changes:
- Add LICENSE-MIT with standalone MIT license text
- Add LICENSE-APACHE with standalone Apache 2.0 license text
- Update LICENSE to combined format with both license texts
- Update source file headers to reference dual licensing
- Add License section to README.md

Resolves google#380
@google-cla

google-cla Bot commented Mar 27, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@temcguir temcguir left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR! And sorry for taking so long to get the required permissions to review. I just have a few nit-picks. The first applies to all of the files with modified headers:

Google's official open-source releasing guidelines for dual licenses (specifically Apache 2.0 and MIT) require a specific, detailed file header rather than the short notice you proposed.

You have correctly retained the original copyright notices. Please update the license statement below them in all modified source files to use the required detailed boilerplate. The resulting header should look like this:

Copyright {{YYYY}} The Android Open Source Project

Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
option. This file may not be copied, modified, or distributed
except according to those terms.

(Ensuring {{YYYY}} still matches the original year in each file.)

Comment thread README.md Outdated
Comment thread LICENSE Outdated
Replace the short dual-license notice with the detailed boilerplate
required by Google's open-source releasing guidelines for Apache 2.0
and MIT. Original copyright lines (and years) are preserved.

Addresses review feedback on PR google#386.
@adamsilverstein

Copy link
Copy Markdown
Contributor Author

Thanks for the review @temcguir! I've updated all 65 modified source files to use Google's official dual-license boilerplate while preserving the original copyright lines and years. Pushed in 8f59c2e.

Use the wording requested in PR google#386 review:
"This software is distributed under the terms of both the MIT license
and the Apache License (Version 2.0)."
Per PR google#386 review feedback, point to the unified LICENSE file rather
than the individual LICENSE-APACHE and LICENSE-MIT files.
@adamsilverstein

adamsilverstein commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

@temcguir Thanks for the review. I have addressed your feedback and this is ready for another review!

@adamsilverstein adamsilverstein requested a review from temcguir May 6, 2026 20:38

@temcguir temcguir left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick updates! LGTM.

@DichenZhang1 DichenZhang1 merged commit 82b4f6d into google:main May 8, 2026
22 of 26 checks passed
DichenZhang1 pushed a commit that referenced this pull request May 8, 2026
Replace the short dual-license notice with the detailed boilerplate
required by Google's open-source releasing guidelines for Apache 2.0
and MIT. Original copyright lines (and years) are preserved.

Addresses review feedback on PR #386.
DichenZhang1 pushed a commit that referenced this pull request May 8, 2026
Use the wording requested in PR #386 review:
"This software is distributed under the terms of both the MIT license
and the Apache License (Version 2.0)."
kleisauke added a commit to kleisauke/wasm-vips that referenced this pull request May 8, 2026
kleisauke added a commit to libvips/build-win64-mxe that referenced this pull request May 8, 2026
lovell pushed a commit to lovell/sharp-libvips that referenced this pull request May 14, 2026
* Docs: standardize "Licence" to "License" (American English)

Matching the LICENSE file.

* Docs: update licensing info for libultrahdr

See: google/libultrahdr#386

* Docs: update licensing info for Highway

Highway is used under the terms of the BSD 3-Clause license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request: consider dual licensing for GPLv2 compatibility

3 participants