From 662dadd57662400c3a59edfa5347e1cf917053aa Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Mon, 20 Jun 2016 17:27:28 +0000 Subject: Add license types to the documentation Fixes #642. -- MOS_MIGRATED_REVID=125351602 --- .../build/docgen/templates/be/functions.vm | 23 +++++++++++++--------- .../build/lib/packages/PackageFactory.java | 16 +-------------- 2 files changed, 15 insertions(+), 24 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm b/src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm index 19784a3564..3bea6a4c26 100644 --- a/src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm +++ b/src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm @@ -308,15 +308,20 @@ package_group(

-

Examples

- -

The following example specifies a single license type of - "notice". Third-party software licenses that do not require - publishing of source code changes but require some sort of copyright or - other public notice are included in this license type. -

- -
+

Legal license types include:

+
+
restricted
Requires mandatory source distribution.
+
reciprocal
Allows usage of software freely in +unmodified form. Any modifications must be made freely available.
+
notice
Original or modified third-party software may be +shipped without danger nor encumbering other sources. All of the licenses in this +category do, however, have an \"original Copyright notice\" or +\"advertising clause\", wherein any external distributions must include the notice +or clause specified in the license.
+
permissive
Code that is under a license but does not +require a notice.
+
unencumbered
Public domain, free for any use.
+
licenses(["notice"]) # MIT license diff --git a/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java b/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java index 972f7486bf..85a3adbccf 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java +++ b/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java @@ -759,21 +759,7 @@ public final class PackageFactory { * TODO(bazel-team): Remove in favor of package.licenses. */ @SkylarkSignature(name = "licenses", returnType = Runtime.NoneType.class, - doc = "Declare the license(s) for the code in the current package. Legal license types " - + "include:\n" - + "
" - + "
restricted
Requires mandatory source distribution.
" - + "
reciprocal
Allows usage of software freely in " - + "unmodified form. Any modifications must be made freely available.
" - + "
notice
Original or modified third-party software may be " - + "shipped without danger nor encumbering other sources. All of the licenses in this " - + "category do, however, have an \"original Copyright notice\" or " - + "\"advertising clause\", wherein any external distributions must include the notice " - + "or clause specified in the license.
" - + "
permissive
Code that is under a license but does not " - + "require a notice.
" - + "
unencumbered
Public domain, free for any use.
" - + "
", + doc = "Declare the license(s) for the code in the current package.", parameters = { @Param(name = "license_strings", type = SkylarkList.class, generic1 = String.class, doc = "A list of strings, the names of the licenses used.")}, -- cgit v1.2.3