Add ability to declare licenses in soong.

See: http://go/android-license-checking-in-soong-v2-design

Bug: 151953481
Bug: 151177513
Bug: 67772237

Change-Id: I97943de53b071cd9918679c17015ed3397c172e9
This commit is contained in:
Bob Badour
2020-08-07 19:45:11 -07:00
parent e6056153cf
commit 8a36d94714
12 changed files with 1770 additions and 1 deletions

View File

@@ -17,9 +17,11 @@ var packageTests = []struct {
package {
name: "package",
visibility: ["//visibility:private"],
licenses: ["license"],
}`),
},
expectedErrors: []string{
`top/Blueprints:5:14: unrecognized property "licenses"`,
`top/Blueprints:3:10: unrecognized property "name"`,
`top/Blueprints:4:16: unrecognized property "visibility"`,
},
@@ -44,9 +46,10 @@ var packageTests = []struct {
"top/Blueprints": []byte(`
package {
default_visibility: ["//visibility:private"],
default_applicable_licenses: ["license"],
}
package {
package {
}`),
},
expectedErrors: []string{