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?

  • 4
    This question appears to be off-topic because it is about a question that can only be answered by the library maintainers themselves. – Bart van Ingen Schenau Mar 28 '14 at 9:06
  • @Bart: While true, Android is such a widely adopted project that the topic might be of interest to others, too. – asaveljevs Mar 28 '14 at 9:38
  • 2
    It might be of interest, but that doesn't mean others can actually answer the question. – Bart van Ingen Schenau Mar 28 '14 at 9:53

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.