Question

In Android source code, we see files like MODULE_LICENSE_APACHE2, MODULE_LICENSE_BSD_LIKE, MODULE_LICENSE_W3C. An outside observer would think that these specify the intended license that applies to the source code tree where this file resides.

Take the JSON module, for instance. It has an empty file MODULE_LICENSE_BSD_LIKE, which might indicate that the JSON module is licensed under one of BSD licenses. However, sources themselves say that they are licensed under Apache License 2.0, as seen in JSON.java.

Packagers of this library for Fedora, as well as other operating systems like Debian, consider the library to be licensed as Apache License 2.0. This seems reasonable, as an empty file bears no legal weight.

However, MODULE_LICENSE_BSD_LIKE is apparently there for a purpose. What is that purpose?

Était-ce utile?

La solution

DejaCode* appears to have wondered this same question. This is what they found:

Empty marker files named MODULE_LICENSE_xxx (where xxx is a license "key") are stored in the codebase side-by-side or close to the code they document.
Typically, the presence of such a file indicates that the code in a current directory has a given license identified by xxx in the MODULE_LICENSE_xxx file name

As to why this is being done, this is what they said:

The Android Open Source Project re-uses a large number of third-party software components under several different licenses (typically Open Source Initiative-approved licenses). ... Internally, the Android team uses specific conventions and techniques to document the origin and license of third-party components within the codebase itself.

So the empty files are there to help the android development team keep track of the original license of the code that they incorporated into the project.

The rest of the DejaCode article is worth reading as it describes the use of the NOTICE and property (.prop) files.


* The DejaCode website does not exist anymore. Archived version.

Licencié sous: CC-BY-SA avec attribution
scroll top