2019-05-16 22:16:29 +02:00
|
|
|
python_binary_host {
|
|
|
|
name: "manifest_fixer",
|
|
|
|
main: "manifest_fixer.py",
|
|
|
|
srcs: [
|
|
|
|
"manifest_fixer.py",
|
|
|
|
],
|
|
|
|
version: {
|
|
|
|
py2: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
|
|
|
py3: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
},
|
2020-02-20 06:16:31 +01:00
|
|
|
libs: [
|
|
|
|
"manifest_utils",
|
|
|
|
],
|
2019-05-16 22:16:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
python_test_host {
|
|
|
|
name: "manifest_fixer_test",
|
|
|
|
main: "manifest_fixer_test.py",
|
|
|
|
srcs: [
|
|
|
|
"manifest_fixer_test.py",
|
|
|
|
"manifest_fixer.py",
|
2019-05-20 22:14:18 +02:00
|
|
|
],
|
|
|
|
version: {
|
|
|
|
py2: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
|
|
|
py3: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
},
|
2020-02-20 06:16:31 +01:00
|
|
|
libs: [
|
|
|
|
"manifest_utils",
|
|
|
|
],
|
2019-05-20 22:14:18 +02:00
|
|
|
test_suites: ["general-tests"],
|
|
|
|
}
|
|
|
|
|
2020-02-20 06:16:31 +01:00
|
|
|
python_library_host {
|
|
|
|
name: "manifest_utils",
|
|
|
|
srcs: [
|
|
|
|
"manifest.py",
|
|
|
|
],
|
|
|
|
version: {
|
|
|
|
py2: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
|
|
|
py3: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2019-05-20 22:14:18 +02:00
|
|
|
python_binary_host {
|
|
|
|
name: "manifest_check",
|
|
|
|
main: "manifest_check.py",
|
|
|
|
srcs: [
|
|
|
|
"manifest_check.py",
|
|
|
|
],
|
|
|
|
version: {
|
|
|
|
py2: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
|
|
|
py3: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
},
|
2020-02-20 06:16:31 +01:00
|
|
|
libs: [
|
|
|
|
"manifest_utils",
|
|
|
|
],
|
2019-05-20 22:14:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
python_test_host {
|
|
|
|
name: "manifest_check_test",
|
|
|
|
main: "manifest_check_test.py",
|
|
|
|
srcs: [
|
|
|
|
"manifest_check_test.py",
|
|
|
|
"manifest_check.py",
|
2019-05-16 22:16:29 +02:00
|
|
|
],
|
|
|
|
version: {
|
|
|
|
py2: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
|
|
|
py3: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
},
|
2020-02-20 06:16:31 +01:00
|
|
|
libs: [
|
|
|
|
"manifest_utils",
|
|
|
|
],
|
2019-05-16 22:16:29 +02:00
|
|
|
test_suites: ["general-tests"],
|
|
|
|
}
|
Add jsonmodify tool
This tool is used to modify apex_manifest.json when building apex
module.
Here's the usage:
usage: jsonmodify [-h] [-o output] [-v path value] [-s path value]
[-r path] [-a path [value ...]]
[input]
positional arguments:
input JSON file
optional arguments:
-h, --help show this help message and exit
-o output, --out output
write result to a file. If omitted, print to stdout
-v path value, --value path value
set value of the key specified by path. If path
doesn't exist, creates new one.
-s path value, --replace path value
replace value of the key specified by path. If path
doesn't exist, no op.
-r path, --remove path
remove the key specified by path. If path doesn't
exist, no op.
-a path [value ...], --append_list path [value ...]
append values to the list specified by path. If path
doesn't exist, creates new list for it.
Bug: 138695532
Test: m jsonmodify
Test: echo {} | jsonmodify -v name hello -a list.nested a b c
{
"name": "hello",
"list": {
"nested": [
"a",
"b",
"c"
]
}
}
Change-Id: I2cd043c614b3ad2306a0c27ccee302633c6d2525
2019-08-01 16:35:08 +02:00
|
|
|
|
|
|
|
python_binary_host {
|
|
|
|
name: "jsonmodify",
|
|
|
|
main: "jsonmodify.py",
|
|
|
|
srcs: [
|
|
|
|
"jsonmodify.py",
|
|
|
|
],
|
|
|
|
version: {
|
|
|
|
py2: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
|
|
|
py3: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
2019-11-22 23:34:55 +01:00
|
|
|
|
|
|
|
python_binary_host {
|
|
|
|
name: "test_config_fixer",
|
|
|
|
main: "test_config_fixer.py",
|
|
|
|
srcs: [
|
|
|
|
"test_config_fixer.py",
|
|
|
|
],
|
|
|
|
version: {
|
|
|
|
py2: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
|
|
|
py3: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
},
|
2020-02-20 06:16:31 +01:00
|
|
|
libs: [
|
|
|
|
"manifest_utils",
|
|
|
|
],
|
2019-11-22 23:34:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
python_test_host {
|
|
|
|
name: "test_config_fixer_test",
|
|
|
|
main: "test_config_fixer_test.py",
|
|
|
|
srcs: [
|
|
|
|
"test_config_fixer_test.py",
|
|
|
|
"test_config_fixer.py",
|
|
|
|
],
|
|
|
|
version: {
|
|
|
|
py2: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
|
|
|
py3: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
|
|
|
},
|
2020-02-20 06:16:31 +01:00
|
|
|
libs: [
|
|
|
|
"manifest_utils",
|
|
|
|
],
|
2019-11-22 23:34:55 +01:00
|
|
|
test_suites: ["general-tests"],
|
2020-02-20 06:16:31 +01:00
|
|
|
}
|