Move SdkExtensions/proto to packages/modules/common.
The proto definitions may be needed at build time to generate appropriate configs for the modules. Unbundled ART branches do not include packages/modules/SdkExtenstion in their manifest; so put the proto in a project that should be visible to all unbundled modules. Move any relevant tools to packages/modules/common/tools as well. Bug: 180105615 Test: m nothing Change-Id: I4efa4300553af6b321f46adb29b8cc90e4556955
This commit is contained in:
19
tools/gen_sdkinfo.py
Normal file
19
tools/gen_sdkinfo.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import sdk_pb2
|
||||
import sys
|
||||
|
||||
if __name__ == '__main__':
|
||||
argv = sys.argv[1:]
|
||||
if not len(argv) == 4 or sorted([argv[0], argv[2]]) != ['-o', '-v']:
|
||||
print('usage: gen_sdkinfo -v <version> -o <output-file>')
|
||||
sys.exit(1)
|
||||
|
||||
for i in range(len(argv)):
|
||||
if sys.argv[i] == '-o':
|
||||
filename = sys.argv[i+1]
|
||||
if sys.argv[i] == '-v':
|
||||
version = int(sys.argv[i+1])
|
||||
|
||||
proto = sdk_pb2.SdkVersion()
|
||||
proto.version = version
|
||||
with open(filename, 'wb') as f:
|
||||
f.write(proto.SerializeToString())
|
||||
Reference in New Issue
Block a user