diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 64f948db3973b1..87079eee23e86c 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -62,13 +62,13 @@ jobs: - name: Build Android CHIPTool and CHIPTest (ARM) run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm-chip-*' build" + "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm-*' build" - name: Clean out build output run: rm -rf ./out - name: Build Android CHIPTool and CHIPTest (ARM64) run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm64-chip-*' build" + "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm64-*' build" - name: Run Android build rule tests run: | ./scripts/run_in_build_env.sh \ diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index cc43e37e3989ee..6e8417b70c2b47 100644 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -447,12 +447,12 @@ def AndroidTargets(): yield target.Extend('androidstudio-arm64-chip-tool', board=AndroidBoard.AndroidStudio_ARM64, app=AndroidApp.CHIP_TOOL) yield target.Extend('androidstudio-x86-chip-tool', board=AndroidBoard.AndroidStudio_X86, app=AndroidApp.CHIP_TOOL) yield target.Extend('androidstudio-x64-chip-tool', board=AndroidBoard.AndroidStudio_X64, app=AndroidApp.CHIP_TOOL) - yield target.Extend('arm64-chip-tvserver', board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TVServer) - yield target.Extend('arm-chip-tvserver', board=AndroidBoard.ARM, app=AndroidApp.CHIP_TVServer) - yield target.Extend('x86-chip-tvserver', board=AndroidBoard.X86, app=AndroidApp.CHIP_TVServer) - yield target.Extend('x64-chip-tvserver', board=AndroidBoard.X64, app=AndroidApp.CHIP_TVServer) - yield target.Extend('arm64-chip-tv-casting-app', board=AndroidBoard.ARM64, app=AndroidApp.CHIP_TV_CASTING_APP) - yield target.Extend('arm-chip-tv-casting-app', board=AndroidBoard.ARM, app=AndroidApp.CHIP_TV_CASTING_APP) + yield target.Extend('arm64-tv-server', board=AndroidBoard.ARM64, app=AndroidApp.TV_SERVER) + yield target.Extend('arm-tv-server', board=AndroidBoard.ARM, app=AndroidApp.TV_SERVER) + yield target.Extend('x86-tv-server', board=AndroidBoard.X86, app=AndroidApp.TV_SERVER) + yield target.Extend('x64-tv-server', board=AndroidBoard.X64, app=AndroidApp.TV_SERVER) + yield target.Extend('arm64-tv-casting-app', board=AndroidBoard.ARM64, app=AndroidApp.TV_SERVER) + yield target.Extend('arm-tv-casting-app', board=AndroidBoard.ARM, app=AndroidApp.TV_SERVER) def MbedTargets(): diff --git a/scripts/build/builders/android.py b/scripts/build/builders/android.py index de5d469af4d66e..809ac066c66884 100644 --- a/scripts/build/builders/android.py +++ b/scripts/build/builders/android.py @@ -31,31 +31,35 @@ class AndroidBoard(Enum): def TargetCpuName(self): if self == AndroidBoard.ARM or self == AndroidBoard.AndroidStudio_ARM: - return 'arm' + return "arm" elif self == AndroidBoard.ARM64 or self == AndroidBoard.AndroidStudio_ARM64: - return 'arm64' + return "arm64" elif self == AndroidBoard.X64 or self == AndroidBoard.AndroidStudio_X64: - return 'x64' + return "x64" elif self == AndroidBoard.X86 or self == AndroidBoard.AndroidStudio_X86: - return 'x86' + return "x86" else: - raise Exception('Unknown board type: %r' % self) + raise Exception("Unknown board type: %r" % self) def AbiName(self): - if self.TargetCpuName() == 'arm': - return 'armeabi-v7a' - elif self.TargetCpuName() == 'arm64': - return 'arm64-v8a' - elif self.TargetCpuName() == 'x64': - return 'x86_64' - elif self.TargetCpuName() == 'x86': - return 'x86' + if self.TargetCpuName() == "arm": + return "armeabi-v7a" + elif self.TargetCpuName() == "arm64": + return "arm64-v8a" + elif self.TargetCpuName() == "x64": + return "x86_64" + elif self.TargetCpuName() == "x86": + return "x86" else: - raise Exception('Unknown board type: %r' % self) + raise Exception("Unknown board type: %r" % self) def IsIde(self): - if (self == AndroidBoard.AndroidStudio_ARM or self == AndroidBoard.AndroidStudio_ARM64 - or self == AndroidBoard.AndroidStudio_X64 or self == AndroidBoard.AndroidStudio_X86): + if ( + self == AndroidBoard.AndroidStudio_ARM + or self == AndroidBoard.AndroidStudio_ARM64 + or self == AndroidBoard.AndroidStudio_X64 + or self == AndroidBoard.AndroidStudio_X86 + ): return True else: return False @@ -64,84 +68,93 @@ def IsIde(self): class AndroidApp(Enum): CHIP_TOOL = auto() CHIP_TEST = auto() - CHIP_TVServer = auto() - CHIP_TV_CASTING_APP = auto() + TV_SERVER = auto() + TV_CASTING_APP = auto() def AppName(self): if self == AndroidApp.CHIP_TOOL: return "CHIPTool" elif self == AndroidApp.CHIP_TEST: return "CHIPTest" - elif self == AndroidApp.CHIP_TVServer: - return "CHIPTVServer" - elif self == AndroidApp.CHIP_TV_CASTING_APP: - return "CHIPTVCastingApp" + elif self == AndroidApp.TV_SERVER: + return "tv-server" + elif self == AndroidApp.TV_CASTING_APP: + return "tv-casting" else: - raise Exception('Unknown app type: %r' % self) + raise Exception("Unknown app type: %r" % self) def AppGnArgs(self): gn_args = {} - if self == AndroidApp.CHIP_TVServer: - gn_args['chip_config_network_layer_ble'] = False - elif self == AndroidApp.CHIP_TV_CASTING_APP: - gn_args['chip_config_network_layer_ble'] = False + if self == AndroidApp.TV_SERVER: + gn_args["chip_config_network_layer_ble"] = False + elif self == AndroidApp.TV_CASTING_APP: + gn_args["chip_config_network_layer_ble"] = False return gn_args def ExampleName(self): - if self == AndroidApp.CHIP_TVServer: + if self == AndroidApp.TV_SERVER: return "tv-app" - elif self == AndroidApp.CHIP_TV_CASTING_APP: + elif self == AndroidApp.TV_CASTING_APP: return "tv-casting-app" else: return None def Modules(self): - if self == AndroidApp.CHIP_TVServer: + if self == AndroidApp.TV_SERVER: return ["platform-app", "content-app"] else: return None class AndroidBuilder(Builder): - def __init__(self, root, runner, board: AndroidBoard, app: AndroidApp): super(AndroidBuilder, self).__init__(root, runner) self.board = board self.app = app def validate_build_environment(self): - for k in ['ANDROID_NDK_HOME', 'ANDROID_HOME']: + for k in ["ANDROID_NDK_HOME", "ANDROID_HOME"]: if k not in os.environ: raise Exception( - 'Environment %s missing, cannot build android libraries' % k) + "Environment %s missing, cannot build android libraries" % k + ) # SDK manager must be runnable to 'accept licenses' - sdk_manager = os.path.join(os.environ['ANDROID_HOME'], 'tools', 'bin', - 'sdkmanager') + sdk_manager = os.path.join( + os.environ["ANDROID_HOME"], "tools", "bin", "sdkmanager" + ) # New SDK manager at cmdline-tools/latest/bin/ - new_sdk_manager = os.path.join(os.environ['ANDROID_HOME'], 'cmdline-tools', 'latest', - 'bin', 'sdkmanager') - if (not (os.path.isfile(sdk_manager) and os.access(sdk_manager, os.X_OK)) and - not (os.path.isfile(new_sdk_manager) and os.access(new_sdk_manager, os.X_OK))): - raise Exception("'%s' and '%s' is not executable by the current user" % - (sdk_manager, new_sdk_manager)) + new_sdk_manager = os.path.join( + os.environ["ANDROID_HOME"], "cmdline-tools", "latest", "bin", "sdkmanager" + ) + if not ( + os.path.isfile(sdk_manager) and os.access(sdk_manager, os.X_OK) + ) and not ( + os.path.isfile(new_sdk_manager) and os.access(new_sdk_manager, os.X_OK) + ): + raise Exception( + "'%s' and '%s' is not executable by the current user" + % (sdk_manager, new_sdk_manager) + ) # In order to accept a license, the licenses folder is updated with the hash of the # accepted license - android_home = os.environ['ANDROID_HOME'] - licenses = os.path.join(android_home, 'licenses') + android_home = os.environ["ANDROID_HOME"] + licenses = os.path.join(android_home, "licenses") if not os.path.exists(licenses): # Initial install may not have licenses at all if not os.access(android_home, os.W_OK): raise Exception( "'%s' is NOT writable by the current user (needed to create licenses folder for accept)" - % android_home) + % android_home + ) elif not os.access(licenses, os.W_OK): raise Exception( "'%s' is NOT writable by the current user (needed to accept licenses)" - % licenses) + % licenses + ) def copyToSrcAndroid(self): # JNILibs will be copied as long as they reside in src/main/jniLibs/ABI: @@ -151,11 +164,18 @@ def copyToSrcAndroid(self): # We do NOT use python builtins for copy, so that the 'execution commands' are available # when using dry run. jnilibs_dir = os.path.join( - self.root, 'src/android/', self.app.AppName(), 'app/libs/jniLibs', self.board.AbiName()) + self.root, + "src/android/", + self.app.AppName(), + "app/libs/jniLibs", + self.board.AbiName(), + ) libs_dir = os.path.join( - self.root, 'src/android/', self.app.AppName(), 'app/libs') - self._Execute(['mkdir', '-p', jnilibs_dir], - title='Prepare Native libs ' + self.identifier) + self.root, "src/android/", self.app.AppName(), "app/libs" + ) + self._Execute( + ["mkdir", "-p", jnilibs_dir], title="Prepare Native libs " + self.identifier + ) # TODO: Runtime dependencies should be computed by the build system rather than hardcoded # GN supports getting these dependencies like: @@ -166,97 +186,141 @@ def copyToSrcAndroid(self): # # If we unify the JNI libraries, libc++_shared.so may not be needed anymore, which could # be another path of resolving this inconsistency. - for libName in ['libSetupPayloadParser.so', 'libCHIPController.so', 'libc++_shared.so']: - self._Execute(['cp', os.path.join(self.output_dir, 'lib', 'jni', self.board.AbiName( - ), libName), os.path.join(jnilibs_dir, libName)]) + for libName in [ + "libSetupPayloadParser.so", + "libCHIPController.so", + "libc++_shared.so", + ]: + self._Execute( + [ + "cp", + os.path.join( + self.output_dir, "lib", "jni", self.board.AbiName(), libName + ), + os.path.join(jnilibs_dir, libName), + ] + ) jars = { - 'CHIPController.jar': 'src/controller/java/CHIPController.jar', - 'SetupPayloadParser.jar': 'src/setup_payload/java/SetupPayloadParser.jar', - 'AndroidPlatform.jar': 'src/platform/android/AndroidPlatform.jar', + "CHIPController.jar": "src/controller/java/CHIPController.jar", + "SetupPayloadParser.jar": "src/setup_payload/java/SetupPayloadParser.jar", + "AndroidPlatform.jar": "src/platform/android/AndroidPlatform.jar", } for jarName in jars.keys(): - self._Execute(['cp', os.path.join( - self.output_dir, 'lib', jars[jarName]), os.path.join(libs_dir, jarName)]) + self._Execute( + [ + "cp", + os.path.join(self.output_dir, "lib", jars[jarName]), + os.path.join(libs_dir, jarName), + ] + ) def copyToExampleAndroid(self): jnilibs_dir = os.path.join( - self.root, 'examples', self.app.ExampleName(), 'android/App/app/libs/jniLibs', self.board.AbiName()) + self.root, + "examples", + self.app.ExampleName(), + "android/App/app/libs/jniLibs", + self.board.AbiName(), + ) libs_dir = os.path.join( - self.root, 'examples', self.app.ExampleName(), 'android/App/app/libs') - self._Execute(['mkdir', '-p', jnilibs_dir], - title='Prepare Native libs ' + self.identifier) - - if self.app.ExampleName() == 'tv-casting-app': - libs = ['libc++_shared.so', 'libTvCastingApp.so'] + self.root, "examples", self.app.ExampleName(), "android/App/app/libs" + ) + self._Execute( + ["mkdir", "-p", jnilibs_dir], title="Prepare Native libs " + self.identifier + ) + + if self.app.ExampleName() == "tv-casting-app": + libs = ["libc++_shared.so", "libTvCastingApp.so"] else: - libs = ['libSetupPayloadParser.so', - 'libc++_shared.so', 'libTvApp.so'] + libs = ["libSetupPayloadParser.so", "libc++_shared.so", "libTvApp.so"] for libName in libs: - self._Execute(['cp', os.path.join(self.output_dir, 'lib', 'jni', self.board.AbiName( - ), libName), os.path.join(jnilibs_dir, libName)]) - - if self.app.ExampleName() == 'tv-casting-app': + self._Execute( + [ + "cp", + os.path.join( + self.output_dir, "lib", "jni", self.board.AbiName(), libName + ), + os.path.join(jnilibs_dir, libName), + ] + ) + + if self.app.ExampleName() == "tv-casting-app": jars = { - 'AndroidPlatform.jar': 'third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar', - 'CHIPAppServer.jar': 'third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar', - 'TvCastingApp.jar': 'TvCastingApp.jar', + "AndroidPlatform.jar": "third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar", + "CHIPAppServer.jar": "third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar", + "TvCastingApp.jar": "TvCastingApp.jar", } else: jars = { - 'SetupPayloadParser.jar': 'third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar', - 'AndroidPlatform.jar': 'third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar', - 'CHIPAppServer.jar': 'third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar', - 'TvApp.jar': 'TvApp.jar', + "SetupPayloadParser.jar": "third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar", + "AndroidPlatform.jar": "third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar", + "CHIPAppServer.jar": "third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar", + "TvApp.jar": "TvApp.jar", } for jarName in jars.keys(): - self._Execute(['cp', os.path.join( - self.output_dir, 'lib', jars[jarName]), os.path.join(libs_dir, jarName)]) + self._Execute( + [ + "cp", + os.path.join(self.output_dir, "lib", jars[jarName]), + os.path.join(libs_dir, jarName), + ] + ) def gradlewBuildSrcAndroid(self): # App compilation - self._Execute([ - '%s/src/android/%s/gradlew' % (self.root, - self.app.AppName()), '-p', - '%s/src/android/%s' % (self.root, - self.app.AppName()), - '-PmatterBuildSrcDir=%s' % self.output_dir, - '-PmatterSdkSourceBuild=false', - '-PbuildDir=%s' % self.output_dir, 'assembleDebug' - ], - title='Building APP ' + self.identifier) + self._Execute( + [ + "%s/src/android/%s/gradlew" % (self.root, self.app.AppName()), + "-p", + "%s/src/android/%s" % (self.root, self.app.AppName()), + "-PmatterBuildSrcDir=%s" % self.output_dir, + "-PmatterSdkSourceBuild=false", + "-PbuildDir=%s" % self.output_dir, + "assembleDebug", + ], + title="Building APP " + self.identifier, + ) def gradlewBuildExampleAndroid(self): # Example compilation if self.app.Modules(): for module in self.app.Modules(): - self._Execute([ - '%s/examples/%s/android/App/gradlew' % (self.root, - self.app.ExampleName()), '-p', - '%s/examples/%s/android/App/' % (self.root, - self.app.ExampleName()), - '-PmatterBuildSrcDir=%s' % self.output_dir, - '-PmatterSdkSourceBuild=false', - '-PbuildDir=%s/%s' % (self.output_dir, module), ':%s:assembleDebug' % module - ], - title='Building Example %s, module %s' % (self.identifier, module)) + self._Execute( + [ + "%s/examples/%s/android/App/gradlew" + % (self.root, self.app.ExampleName()), + "-p", + "%s/examples/%s/android/App/" + % (self.root, self.app.ExampleName()), + "-PmatterBuildSrcDir=%s" % self.output_dir, + "-PmatterSdkSourceBuild=false", + "-PbuildDir=%s/%s" % (self.output_dir, module), + ":%s:assembleDebug" % module, + ], + title="Building Example %s, module %s" % (self.identifier, module), + ) else: - self._Execute([ - '%s/examples/%s/android/App/gradlew' % (self.root, - self.app.ExampleName()), '-p', - '%s/examples/%s/android/App/' % (self.root, - self.app.ExampleName()), - '-PmatterBuildSrcDir=%s' % self.output_dir, - '-PmatterSdkSourceBuild=false', - '-PbuildDir=%s' % self.output_dir, 'assembleDebug' - ], - title='Building Example ' + self.identifier) + self._Execute( + [ + "%s/examples/%s/android/App/gradlew" + % (self.root, self.app.ExampleName()), + "-p", + "%s/examples/%s/android/App/" % (self.root, self.app.ExampleName()), + "-PmatterBuildSrcDir=%s" % self.output_dir, + "-PmatterSdkSourceBuild=false", + "-PbuildDir=%s" % self.output_dir, + "assembleDebug", + ], + title="Building Example " + self.identifier, + ) def generate(self): - self._Execute([ - 'python3', 'third_party/android_deps/set_up_android_deps.py' - ], title='Setting up Android deps through Gradle') + self._Execute( + ["python3", "third_party/android_deps/set_up_android_deps.py"], + title="Setting up Android deps through Gradle", + ) if not os.path.exists(self.output_dir): # NRF does a in-place update of SDK tools @@ -264,74 +328,86 @@ def generate(self): self.validate_build_environment() gn_args = {} - gn_args['target_os'] = 'android' - gn_args['target_cpu'] = self.board.TargetCpuName() - gn_args['android_ndk_root'] = os.environ['ANDROID_NDK_HOME'] - gn_args['android_sdk_root'] = os.environ['ANDROID_HOME'] + gn_args["target_os"] = "android" + gn_args["target_cpu"] = self.board.TargetCpuName() + gn_args["android_ndk_root"] = os.environ["ANDROID_NDK_HOME"] + gn_args["android_sdk_root"] = os.environ["ANDROID_HOME"] gn_args.update(self.app.AppGnArgs()) args_str = "" for key, value in gn_args.items(): if type(value) == bool: if value: - args_str += '%s=true ' % (key) + args_str += "%s=true " % (key) else: - args_str += '%s=false ' % (key) + args_str += "%s=false " % (key) else: args_str += '%s="%s" ' % (key, shlex.quote(value)) - args = '--args=%s' % (args_str) + args = "--args=%s" % (args_str) gn_gen = [ - 'gn', 'gen', '--check', '--fail-on-unused-args', self.output_dir, args, + "gn", + "gen", + "--check", + "--fail-on-unused-args", + self.output_dir, + args, ] exampleName = self.app.ExampleName() if exampleName is not None: - gn_gen += ['--root=%s/examples/%s/android/' % - (self.root, exampleName)] + gn_gen += ["--root=%s/examples/%s/android/" % (self.root, exampleName)] if self.board.IsIde(): - gn_gen += ['--ide=json', - '--json-ide-script=//scripts/examples/gn_to_cmakelists.py'] - - self._Execute(gn_gen, title='Generating ' + self.identifier) - - new_sdk_manager = os.path.join(os.environ['ANDROID_HOME'], 'cmdline-tools', 'latest', - 'bin', 'sdkmanager') - if (os.path.isfile(new_sdk_manager) and os.access(new_sdk_manager, os.X_OK)): - self._Execute([ - 'bash', '-c', - 'yes | %s --licenses >/dev/null' % - new_sdk_manager - ], - title='Accepting NDK licenses @ cmdline-tools') + gn_gen += [ + "--ide=json", + "--json-ide-script=//scripts/examples/gn_to_cmakelists.py", + ] + + self._Execute(gn_gen, title="Generating " + self.identifier) + + new_sdk_manager = os.path.join( + os.environ["ANDROID_HOME"], + "cmdline-tools", + "latest", + "bin", + "sdkmanager", + ) + if os.path.isfile(new_sdk_manager) and os.access(new_sdk_manager, os.X_OK): + self._Execute( + ["bash", "-c", "yes | %s --licenses >/dev/null" % new_sdk_manager], + title="Accepting NDK licenses @ cmdline-tools", + ) else: - sdk_manager = os.path.join(os.environ['ANDROID_HOME'], 'tools', 'bin', - 'sdkmanager') - self._Execute([ - 'bash', '-c', - 'yes | %s --licenses >/dev/null' % - sdk_manager - ], - title='Accepting NDK licenses @ tools') + sdk_manager = os.path.join( + os.environ["ANDROID_HOME"], "tools", "bin", "sdkmanager" + ) + self._Execute( + ["bash", "-c", "yes | %s --licenses >/dev/null" % sdk_manager], + title="Accepting NDK licenses @ tools", + ) def _build(self): if self.board.IsIde(): # App compilation IDE # TODO: Android Gradle with module and -PbuildDir= will caused issue, remove -PbuildDir= - self._Execute([ - '%s/src/android/%s/gradlew' % (self.root, - self.app.AppName()), '-p', - '%s/src/android/%s' % (self.root, self.app.AppName()), - '-PmatterBuildSrcDir=%s' % self.output_dir, - '-PmatterSdkSourceBuild=true', - '-PmatterSourceBuildAbiFilters=%s' % self.board.AbiName(), - 'assembleDebug' - ], - title='Building APP ' + self.identifier) + self._Execute( + [ + "%s/src/android/%s/gradlew" % (self.root, self.app.AppName()), + "-p", + "%s/src/android/%s" % (self.root, self.app.AppName()), + "-PmatterBuildSrcDir=%s" % self.output_dir, + "-PmatterSdkSourceBuild=true", + "-PmatterSourceBuildAbiFilters=%s" % self.board.AbiName(), + "assembleDebug", + ], + title="Building APP " + self.identifier, + ) else: - self._Execute(['ninja', '-C', self.output_dir], - title='Building JNI ' + self.identifier) + self._Execute( + ["ninja", "-C", self.output_dir], + title="Building JNI " + self.identifier, + ) exampleName = self.app.ExampleName() if exampleName is None: @@ -344,40 +420,72 @@ def _build(self): def build_outputs(self): if self.board.IsIde(): outputs = { - self.app.AppName() + '-debug.apk': - os.path.join(self.root, "src/android", self.app.AppName(), - 'app/build/outputs/apk/debug/app-debug.apk') + self.app.AppName() + + "-debug.apk": os.path.join( + self.root, + "src/android", + self.app.AppName(), + "app/build/outputs/apk/debug/app-debug.apk", + ) } elif self.app.ExampleName() is not None: - outputs = { - self.app.AppName() + 'app-debug.apk': - os.path.join(self.output_dir, 'outputs', 'apk', 'debug', - 'app-debug.apk') - } + if self.app == AndroidApp.TV_SERVER: + outputs = { + "tv-sever-platform-app-debug.apk": os.path.join( + self.output_dir, "platform-app", "outputs", "apk", "debug", "platform-app-debug.apk" + ), + "tv-sever-content-app-debug.apk": os.path.join( + self.output_dir, "content-app", "outputs", "apk", "debug", "content-app-debug.apk" + ) + } + else: + outputs = { + self.app.AppName() + + "app-debug.apk": os.path.join( + self.output_dir, "outputs", "apk", "debug", "app-debug.apk" + ) + } else: outputs = { - self.app.AppName() + 'app-debug.apk': - os.path.join(self.output_dir, 'outputs', 'apk', 'debug', - 'app-debug.apk'), - 'CHIPController.jar': - os.path.join(self.output_dir, 'lib', - 'src/controller/java/CHIPController.jar'), - 'AndroidPlatform.jar': - os.path.join(self.output_dir, 'lib', - 'src/platform/android/AndroidPlatform.jar'), - 'SetupPayloadParser.jar': - os.path.join(self.output_dir, 'lib', - 'src/setup_payload/java/SetupPayloadParser.jar'), - - 'jni/%s/libSetupPayloadParser.so' % self.board.AbiName(): - os.path.join(self.output_dir, 'lib', 'jni', - self.board.AbiName(), 'libSetupPayloadParser.so'), - 'jni/%s/libCHIPController.so' % self.board.AbiName(): - os.path.join(self.output_dir, 'lib', 'jni', - self.board.AbiName(), 'libCHIPController.so'), - 'jni/%s/libc++_shared.so' % self.board.AbiName(): - os.path.join(self.output_dir, 'lib', 'jni', - self.board.AbiName(), 'libc++_shared.so'), + self.app.AppName() + + "app-debug.apk": os.path.join( + self.output_dir, "outputs", "apk", "debug", "app-debug.apk" + ), + "CHIPController.jar": os.path.join( + self.output_dir, "lib", "src/controller/java/CHIPController.jar" + ), + "AndroidPlatform.jar": os.path.join( + self.output_dir, "lib", "src/platform/android/AndroidPlatform.jar" + ), + "SetupPayloadParser.jar": os.path.join( + self.output_dir, + "lib", + "src/setup_payload/java/SetupPayloadParser.jar", + ), + "jni/%s/libSetupPayloadParser.so" + % self.board.AbiName(): os.path.join( + self.output_dir, + "lib", + "jni", + self.board.AbiName(), + "libSetupPayloadParser.so", + ), + "jni/%s/libCHIPController.so" + % self.board.AbiName(): os.path.join( + self.output_dir, + "lib", + "jni", + self.board.AbiName(), + "libCHIPController.so", + ), + "jni/%s/libc++_shared.so" + % self.board.AbiName(): os.path.join( + self.output_dir, + "lib", + "jni", + self.board.AbiName(), + "libc++_shared.so", + ), } return outputs diff --git a/scripts/build/testdata/all_targets_except_host.txt b/scripts/build/testdata/all_targets_except_host.txt index 082430b019ac39..d93353f984c0e9 100644 --- a/scripts/build/testdata/all_targets_except_host.txt +++ b/scripts/build/testdata/all_targets_except_host.txt @@ -7,16 +7,16 @@ android-androidstudio-arm64-chip-tool android-androidstudio-x64-chip-tool android-androidstudio-x86-chip-tool android-arm-chip-tool -android-arm-chip-tv-casting-app -android-arm-chip-tvserver +android-arm-tv-casting-app +android-arm-tv-server android-arm64-chip-test android-arm64-chip-tool -android-arm64-chip-tv-casting-app -android-arm64-chip-tvserver +android-arm64-tv-casting-app +android-arm64-tv-server android-x64-chip-tool -android-x64-chip-tvserver +android-x64-tv-server android-x86-chip-tool -android-x86-chip-tvserver +android-x86-tv-server bl602-light cc13x2x7_26x2x7-all-clusters cc13x2x7_26x2x7-all-clusters-minimal diff --git a/scripts/build/testdata/build_all_except_host.txt b/scripts/build/testdata/build_all_except_host.txt index 321dd96d45721a..13aae9971f029b 100644 --- a/scripts/build/testdata/build_all_except_host.txt +++ b/scripts/build/testdata/build_all_except_host.txt @@ -61,8 +61,8 @@ bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' # Setting up Android deps through Gradle python3 third_party/android_deps/set_up_android_deps.py -# Generating android-arm-chip-tv-casting-app -gn gen --check --fail-on-unused-args {out}/android-arm-chip-tv-casting-app '--args=target_os="android" target_cpu="arm" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-casting-app/android/ +# Generating android-arm-tv-casting-app +gn gen --check --fail-on-unused-args {out}/android-arm-tv-casting-app '--args=target_os="android" target_cpu="arm" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/ # Accepting NDK licenses @ tools bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' @@ -70,8 +70,8 @@ bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' # Setting up Android deps through Gradle python3 third_party/android_deps/set_up_android_deps.py -# Generating android-arm-chip-tvserver -gn gen --check --fail-on-unused-args {out}/android-arm-chip-tvserver '--args=target_os="android" target_cpu="arm" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/ +# Generating android-arm-tv-server +gn gen --check --fail-on-unused-args {out}/android-arm-tv-server '--args=target_os="android" target_cpu="arm" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/ # Accepting NDK licenses @ tools bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' @@ -97,8 +97,8 @@ bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' # Setting up Android deps through Gradle python3 third_party/android_deps/set_up_android_deps.py -# Generating android-arm64-chip-tv-casting-app -gn gen --check --fail-on-unused-args {out}/android-arm64-chip-tv-casting-app '--args=target_os="android" target_cpu="arm64" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-casting-app/android/ +# Generating android-arm64-tv-casting-app +gn gen --check --fail-on-unused-args {out}/android-arm64-tv-casting-app '--args=target_os="android" target_cpu="arm64" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/ # Accepting NDK licenses @ tools bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' @@ -106,8 +106,8 @@ bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' # Setting up Android deps through Gradle python3 third_party/android_deps/set_up_android_deps.py -# Generating android-arm64-chip-tvserver -gn gen --check --fail-on-unused-args {out}/android-arm64-chip-tvserver '--args=target_os="android" target_cpu="arm64" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/ +# Generating android-arm64-tv-server +gn gen --check --fail-on-unused-args {out}/android-arm64-tv-server '--args=target_os="android" target_cpu="arm64" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/ # Accepting NDK licenses @ tools bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' @@ -124,8 +124,8 @@ bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' # Setting up Android deps through Gradle python3 third_party/android_deps/set_up_android_deps.py -# Generating android-x64-chip-tvserver -gn gen --check --fail-on-unused-args {out}/android-x64-chip-tvserver '--args=target_os="android" target_cpu="x64" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/ +# Generating android-x64-tv-server +gn gen --check --fail-on-unused-args {out}/android-x64-tv-server '--args=target_os="android" target_cpu="x64" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/ # Accepting NDK licenses @ tools bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' @@ -142,8 +142,8 @@ bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' # Setting up Android deps through Gradle python3 third_party/android_deps/set_up_android_deps.py -# Generating android-x86-chip-tvserver -gn gen --check --fail-on-unused-args {out}/android-x86-chip-tvserver '--args=target_os="android" target_cpu="x86" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/ +# Generating android-x86-tv-server +gn gen --check --fail-on-unused-args {out}/android-x86-tv-server '--args=target_os="android" target_cpu="x86" android_ndk_root="TEST_ANDROID_NDK_HOME" android_sdk_root="TEST_ANDROID_HOME" chip_config_network_layer_ble=false ' --root={root}/examples/tv-app/android/ # Accepting NDK licenses @ tools bash -c 'yes | TEST_ANDROID_HOME/tools/bin/sdkmanager --licenses >/dev/null' @@ -1207,50 +1207,57 @@ cp {out}/android-arm-chip-tool/lib/src/platform/android/AndroidPlatform.jar {roo # Building APP android-arm-chip-tool {root}/src/android/CHIPTool/gradlew -p {root}/src/android/CHIPTool -PmatterBuildSrcDir={out}/android-arm-chip-tool -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm-chip-tool assembleDebug -# Building JNI android-arm-chip-tv-casting-app -ninja -C {out}/android-arm-chip-tv-casting-app +# Building JNI android-arm-tv-casting-app +ninja -C {out}/android-arm-tv-casting-app -# Prepare Native libs android-arm-chip-tv-casting-app -mkdir -p {root}/examples/tv-casting-app/android/App/app/libs/jniLibs/armeabi-v7a +# Prepare Native libs android-arm-tv-casting-app +mkdir -p {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a + +cp {out}/android-arm-tv-casting-app/lib/jni/armeabi-v7a/libSetupPayloadParser.so {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a/libSetupPayloadParser.so + +cp {out}/android-arm-tv-casting-app/lib/jni/armeabi-v7a/libc++_shared.so {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a/libc++_shared.so + +cp {out}/android-arm-tv-casting-app/lib/jni/armeabi-v7a/libTvApp.so {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a/libTvApp.so -cp {out}/android-arm-chip-tv-casting-app/lib/jni/armeabi-v7a/libc++_shared.so {root}/examples/tv-casting-app/android/App/app/libs/jniLibs/armeabi-v7a/libc++_shared.so +cp {out}/android-arm-tv-casting-app/lib/third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar {root}/examples/tv-app/android/App/app/libs/SetupPayloadParser.jar -cp {out}/android-arm-chip-tv-casting-app/lib/jni/armeabi-v7a/libTvCastingApp.so {root}/examples/tv-casting-app/android/App/app/libs/jniLibs/armeabi-v7a/libTvCastingApp.so +cp {out}/android-arm-tv-casting-app/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-app/android/App/app/libs/AndroidPlatform.jar -cp {out}/android-arm-chip-tv-casting-app/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-casting-app/android/App/app/libs/AndroidPlatform.jar +cp {out}/android-arm-tv-casting-app/lib/third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar {root}/examples/tv-app/android/App/app/libs/CHIPAppServer.jar -cp {out}/android-arm-chip-tv-casting-app/lib/third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar {root}/examples/tv-casting-app/android/App/app/libs/CHIPAppServer.jar +cp {out}/android-arm-tv-casting-app/lib/TvApp.jar {root}/examples/tv-app/android/App/app/libs/TvApp.jar -cp {out}/android-arm-chip-tv-casting-app/lib/TvCastingApp.jar {root}/examples/tv-casting-app/android/App/app/libs/TvCastingApp.jar +# Building Example android-arm-tv-casting-app, module platform-app +{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-arm-tv-casting-app -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm-tv-casting-app/platform-app :platform-app:assembleDebug -# Building Example android-arm-chip-tv-casting-app -{root}/examples/tv-casting-app/android/App/gradlew -p {root}/examples/tv-casting-app/android/App/ -PmatterBuildSrcDir={out}/android-arm-chip-tv-casting-app -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm-chip-tv-casting-app assembleDebug +# Building Example android-arm-tv-casting-app, module content-app +{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-arm-tv-casting-app -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm-tv-casting-app/content-app :content-app:assembleDebug -# Building JNI android-arm-chip-tvserver -ninja -C {out}/android-arm-chip-tvserver +# Building JNI android-arm-tv-server +ninja -C {out}/android-arm-tv-server -# Prepare Native libs android-arm-chip-tvserver +# Prepare Native libs android-arm-tv-server mkdir -p {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a -cp {out}/android-arm-chip-tvserver/lib/jni/armeabi-v7a/libSetupPayloadParser.so {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a/libSetupPayloadParser.so +cp {out}/android-arm-tv-server/lib/jni/armeabi-v7a/libSetupPayloadParser.so {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a/libSetupPayloadParser.so -cp {out}/android-arm-chip-tvserver/lib/jni/armeabi-v7a/libc++_shared.so {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a/libc++_shared.so +cp {out}/android-arm-tv-server/lib/jni/armeabi-v7a/libc++_shared.so {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a/libc++_shared.so -cp {out}/android-arm-chip-tvserver/lib/jni/armeabi-v7a/libTvApp.so {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a/libTvApp.so +cp {out}/android-arm-tv-server/lib/jni/armeabi-v7a/libTvApp.so {root}/examples/tv-app/android/App/app/libs/jniLibs/armeabi-v7a/libTvApp.so -cp {out}/android-arm-chip-tvserver/lib/third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar {root}/examples/tv-app/android/App/app/libs/SetupPayloadParser.jar +cp {out}/android-arm-tv-server/lib/third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar {root}/examples/tv-app/android/App/app/libs/SetupPayloadParser.jar -cp {out}/android-arm-chip-tvserver/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-app/android/App/app/libs/AndroidPlatform.jar +cp {out}/android-arm-tv-server/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-app/android/App/app/libs/AndroidPlatform.jar -cp {out}/android-arm-chip-tvserver/lib/third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar {root}/examples/tv-app/android/App/app/libs/CHIPAppServer.jar +cp {out}/android-arm-tv-server/lib/third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar {root}/examples/tv-app/android/App/app/libs/CHIPAppServer.jar -cp {out}/android-arm-chip-tvserver/lib/TvApp.jar {root}/examples/tv-app/android/App/app/libs/TvApp.jar +cp {out}/android-arm-tv-server/lib/TvApp.jar {root}/examples/tv-app/android/App/app/libs/TvApp.jar -# Building Example android-arm-chip-tvserver, module platform-app -{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-arm-chip-tvserver -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm-chip-tvserver/platform-app :platform-app:assembleDebug +# Building Example android-arm-tv-server, module platform-app +{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-arm-tv-server -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm-tv-server/platform-app :platform-app:assembleDebug -# Building Example android-arm-chip-tvserver, module content-app -{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-arm-chip-tvserver -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm-chip-tvserver/content-app :content-app:assembleDebug +# Building Example android-arm-tv-server, module content-app +{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-arm-tv-server -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm-tv-server/content-app :content-app:assembleDebug # Building JNI android-arm64-chip-test ninja -C {out}/android-arm64-chip-test @@ -1294,50 +1301,57 @@ cp {out}/android-arm64-chip-tool/lib/src/platform/android/AndroidPlatform.jar {r # Building APP android-arm64-chip-tool {root}/src/android/CHIPTool/gradlew -p {root}/src/android/CHIPTool -PmatterBuildSrcDir={out}/android-arm64-chip-tool -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm64-chip-tool assembleDebug -# Building JNI android-arm64-chip-tv-casting-app -ninja -C {out}/android-arm64-chip-tv-casting-app +# Building JNI android-arm64-tv-casting-app +ninja -C {out}/android-arm64-tv-casting-app + +# Prepare Native libs android-arm64-tv-casting-app +mkdir -p {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a + +cp {out}/android-arm64-tv-casting-app/lib/jni/arm64-v8a/libSetupPayloadParser.so {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a/libSetupPayloadParser.so + +cp {out}/android-arm64-tv-casting-app/lib/jni/arm64-v8a/libc++_shared.so {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a/libc++_shared.so -# Prepare Native libs android-arm64-chip-tv-casting-app -mkdir -p {root}/examples/tv-casting-app/android/App/app/libs/jniLibs/arm64-v8a +cp {out}/android-arm64-tv-casting-app/lib/jni/arm64-v8a/libTvApp.so {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a/libTvApp.so -cp {out}/android-arm64-chip-tv-casting-app/lib/jni/arm64-v8a/libc++_shared.so {root}/examples/tv-casting-app/android/App/app/libs/jniLibs/arm64-v8a/libc++_shared.so +cp {out}/android-arm64-tv-casting-app/lib/third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar {root}/examples/tv-app/android/App/app/libs/SetupPayloadParser.jar -cp {out}/android-arm64-chip-tv-casting-app/lib/jni/arm64-v8a/libTvCastingApp.so {root}/examples/tv-casting-app/android/App/app/libs/jniLibs/arm64-v8a/libTvCastingApp.so +cp {out}/android-arm64-tv-casting-app/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-app/android/App/app/libs/AndroidPlatform.jar -cp {out}/android-arm64-chip-tv-casting-app/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-casting-app/android/App/app/libs/AndroidPlatform.jar +cp {out}/android-arm64-tv-casting-app/lib/third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar {root}/examples/tv-app/android/App/app/libs/CHIPAppServer.jar -cp {out}/android-arm64-chip-tv-casting-app/lib/third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar {root}/examples/tv-casting-app/android/App/app/libs/CHIPAppServer.jar +cp {out}/android-arm64-tv-casting-app/lib/TvApp.jar {root}/examples/tv-app/android/App/app/libs/TvApp.jar -cp {out}/android-arm64-chip-tv-casting-app/lib/TvCastingApp.jar {root}/examples/tv-casting-app/android/App/app/libs/TvCastingApp.jar +# Building Example android-arm64-tv-casting-app, module platform-app +{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-arm64-tv-casting-app -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm64-tv-casting-app/platform-app :platform-app:assembleDebug -# Building Example android-arm64-chip-tv-casting-app -{root}/examples/tv-casting-app/android/App/gradlew -p {root}/examples/tv-casting-app/android/App/ -PmatterBuildSrcDir={out}/android-arm64-chip-tv-casting-app -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm64-chip-tv-casting-app assembleDebug +# Building Example android-arm64-tv-casting-app, module content-app +{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-arm64-tv-casting-app -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm64-tv-casting-app/content-app :content-app:assembleDebug -# Building JNI android-arm64-chip-tvserver -ninja -C {out}/android-arm64-chip-tvserver +# Building JNI android-arm64-tv-server +ninja -C {out}/android-arm64-tv-server -# Prepare Native libs android-arm64-chip-tvserver +# Prepare Native libs android-arm64-tv-server mkdir -p {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a -cp {out}/android-arm64-chip-tvserver/lib/jni/arm64-v8a/libSetupPayloadParser.so {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a/libSetupPayloadParser.so +cp {out}/android-arm64-tv-server/lib/jni/arm64-v8a/libSetupPayloadParser.so {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a/libSetupPayloadParser.so -cp {out}/android-arm64-chip-tvserver/lib/jni/arm64-v8a/libc++_shared.so {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a/libc++_shared.so +cp {out}/android-arm64-tv-server/lib/jni/arm64-v8a/libc++_shared.so {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a/libc++_shared.so -cp {out}/android-arm64-chip-tvserver/lib/jni/arm64-v8a/libTvApp.so {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a/libTvApp.so +cp {out}/android-arm64-tv-server/lib/jni/arm64-v8a/libTvApp.so {root}/examples/tv-app/android/App/app/libs/jniLibs/arm64-v8a/libTvApp.so -cp {out}/android-arm64-chip-tvserver/lib/third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar {root}/examples/tv-app/android/App/app/libs/SetupPayloadParser.jar +cp {out}/android-arm64-tv-server/lib/third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar {root}/examples/tv-app/android/App/app/libs/SetupPayloadParser.jar -cp {out}/android-arm64-chip-tvserver/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-app/android/App/app/libs/AndroidPlatform.jar +cp {out}/android-arm64-tv-server/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-app/android/App/app/libs/AndroidPlatform.jar -cp {out}/android-arm64-chip-tvserver/lib/third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar {root}/examples/tv-app/android/App/app/libs/CHIPAppServer.jar +cp {out}/android-arm64-tv-server/lib/third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar {root}/examples/tv-app/android/App/app/libs/CHIPAppServer.jar -cp {out}/android-arm64-chip-tvserver/lib/TvApp.jar {root}/examples/tv-app/android/App/app/libs/TvApp.jar +cp {out}/android-arm64-tv-server/lib/TvApp.jar {root}/examples/tv-app/android/App/app/libs/TvApp.jar -# Building Example android-arm64-chip-tvserver, module platform-app -{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-arm64-chip-tvserver -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm64-chip-tvserver/platform-app :platform-app:assembleDebug +# Building Example android-arm64-tv-server, module platform-app +{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-arm64-tv-server -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm64-tv-server/platform-app :platform-app:assembleDebug -# Building Example android-arm64-chip-tvserver, module content-app -{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-arm64-chip-tvserver -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm64-chip-tvserver/content-app :content-app:assembleDebug +# Building Example android-arm64-tv-server, module content-app +{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-arm64-tv-server -PmatterSdkSourceBuild=false -PbuildDir={out}/android-arm64-tv-server/content-app :content-app:assembleDebug # Building JNI android-x64-chip-tool ninja -C {out}/android-x64-chip-tool @@ -1360,31 +1374,31 @@ cp {out}/android-x64-chip-tool/lib/src/platform/android/AndroidPlatform.jar {roo # Building APP android-x64-chip-tool {root}/src/android/CHIPTool/gradlew -p {root}/src/android/CHIPTool -PmatterBuildSrcDir={out}/android-x64-chip-tool -PmatterSdkSourceBuild=false -PbuildDir={out}/android-x64-chip-tool assembleDebug -# Building JNI android-x64-chip-tvserver -ninja -C {out}/android-x64-chip-tvserver +# Building JNI android-x64-tv-server +ninja -C {out}/android-x64-tv-server -# Prepare Native libs android-x64-chip-tvserver +# Prepare Native libs android-x64-tv-server mkdir -p {root}/examples/tv-app/android/App/app/libs/jniLibs/x86_64 -cp {out}/android-x64-chip-tvserver/lib/jni/x86_64/libSetupPayloadParser.so {root}/examples/tv-app/android/App/app/libs/jniLibs/x86_64/libSetupPayloadParser.so +cp {out}/android-x64-tv-server/lib/jni/x86_64/libSetupPayloadParser.so {root}/examples/tv-app/android/App/app/libs/jniLibs/x86_64/libSetupPayloadParser.so -cp {out}/android-x64-chip-tvserver/lib/jni/x86_64/libc++_shared.so {root}/examples/tv-app/android/App/app/libs/jniLibs/x86_64/libc++_shared.so +cp {out}/android-x64-tv-server/lib/jni/x86_64/libc++_shared.so {root}/examples/tv-app/android/App/app/libs/jniLibs/x86_64/libc++_shared.so -cp {out}/android-x64-chip-tvserver/lib/jni/x86_64/libTvApp.so {root}/examples/tv-app/android/App/app/libs/jniLibs/x86_64/libTvApp.so +cp {out}/android-x64-tv-server/lib/jni/x86_64/libTvApp.so {root}/examples/tv-app/android/App/app/libs/jniLibs/x86_64/libTvApp.so -cp {out}/android-x64-chip-tvserver/lib/third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar {root}/examples/tv-app/android/App/app/libs/SetupPayloadParser.jar +cp {out}/android-x64-tv-server/lib/third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar {root}/examples/tv-app/android/App/app/libs/SetupPayloadParser.jar -cp {out}/android-x64-chip-tvserver/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-app/android/App/app/libs/AndroidPlatform.jar +cp {out}/android-x64-tv-server/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-app/android/App/app/libs/AndroidPlatform.jar -cp {out}/android-x64-chip-tvserver/lib/third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar {root}/examples/tv-app/android/App/app/libs/CHIPAppServer.jar +cp {out}/android-x64-tv-server/lib/third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar {root}/examples/tv-app/android/App/app/libs/CHIPAppServer.jar -cp {out}/android-x64-chip-tvserver/lib/TvApp.jar {root}/examples/tv-app/android/App/app/libs/TvApp.jar +cp {out}/android-x64-tv-server/lib/TvApp.jar {root}/examples/tv-app/android/App/app/libs/TvApp.jar -# Building Example android-x64-chip-tvserver, module platform-app -{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-x64-chip-tvserver -PmatterSdkSourceBuild=false -PbuildDir={out}/android-x64-chip-tvserver/platform-app :platform-app:assembleDebug +# Building Example android-x64-tv-server, module platform-app +{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-x64-tv-server -PmatterSdkSourceBuild=false -PbuildDir={out}/android-x64-tv-server/platform-app :platform-app:assembleDebug -# Building Example android-x64-chip-tvserver, module content-app -{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-x64-chip-tvserver -PmatterSdkSourceBuild=false -PbuildDir={out}/android-x64-chip-tvserver/content-app :content-app:assembleDebug +# Building Example android-x64-tv-server, module content-app +{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-x64-tv-server -PmatterSdkSourceBuild=false -PbuildDir={out}/android-x64-tv-server/content-app :content-app:assembleDebug # Building JNI android-x86-chip-tool ninja -C {out}/android-x86-chip-tool @@ -1407,31 +1421,31 @@ cp {out}/android-x86-chip-tool/lib/src/platform/android/AndroidPlatform.jar {roo # Building APP android-x86-chip-tool {root}/src/android/CHIPTool/gradlew -p {root}/src/android/CHIPTool -PmatterBuildSrcDir={out}/android-x86-chip-tool -PmatterSdkSourceBuild=false -PbuildDir={out}/android-x86-chip-tool assembleDebug -# Building JNI android-x86-chip-tvserver -ninja -C {out}/android-x86-chip-tvserver +# Building JNI android-x86-tv-server +ninja -C {out}/android-x86-tv-server -# Prepare Native libs android-x86-chip-tvserver +# Prepare Native libs android-x86-tv-server mkdir -p {root}/examples/tv-app/android/App/app/libs/jniLibs/x86 -cp {out}/android-x86-chip-tvserver/lib/jni/x86/libSetupPayloadParser.so {root}/examples/tv-app/android/App/app/libs/jniLibs/x86/libSetupPayloadParser.so +cp {out}/android-x86-tv-server/lib/jni/x86/libSetupPayloadParser.so {root}/examples/tv-app/android/App/app/libs/jniLibs/x86/libSetupPayloadParser.so -cp {out}/android-x86-chip-tvserver/lib/jni/x86/libc++_shared.so {root}/examples/tv-app/android/App/app/libs/jniLibs/x86/libc++_shared.so +cp {out}/android-x86-tv-server/lib/jni/x86/libc++_shared.so {root}/examples/tv-app/android/App/app/libs/jniLibs/x86/libc++_shared.so -cp {out}/android-x86-chip-tvserver/lib/jni/x86/libTvApp.so {root}/examples/tv-app/android/App/app/libs/jniLibs/x86/libTvApp.so +cp {out}/android-x86-tv-server/lib/jni/x86/libTvApp.so {root}/examples/tv-app/android/App/app/libs/jniLibs/x86/libTvApp.so -cp {out}/android-x86-chip-tvserver/lib/third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar {root}/examples/tv-app/android/App/app/libs/SetupPayloadParser.jar +cp {out}/android-x86-tv-server/lib/third_party/connectedhomeip/src/setup_payload/java/SetupPayloadParser.jar {root}/examples/tv-app/android/App/app/libs/SetupPayloadParser.jar -cp {out}/android-x86-chip-tvserver/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-app/android/App/app/libs/AndroidPlatform.jar +cp {out}/android-x86-tv-server/lib/third_party/connectedhomeip/src/platform/android/AndroidPlatform.jar {root}/examples/tv-app/android/App/app/libs/AndroidPlatform.jar -cp {out}/android-x86-chip-tvserver/lib/third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar {root}/examples/tv-app/android/App/app/libs/CHIPAppServer.jar +cp {out}/android-x86-tv-server/lib/third_party/connectedhomeip/src/app/server/java/CHIPAppServer.jar {root}/examples/tv-app/android/App/app/libs/CHIPAppServer.jar -cp {out}/android-x86-chip-tvserver/lib/TvApp.jar {root}/examples/tv-app/android/App/app/libs/TvApp.jar +cp {out}/android-x86-tv-server/lib/TvApp.jar {root}/examples/tv-app/android/App/app/libs/TvApp.jar -# Building Example android-x86-chip-tvserver, module platform-app -{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-x86-chip-tvserver -PmatterSdkSourceBuild=false -PbuildDir={out}/android-x86-chip-tvserver/platform-app :platform-app:assembleDebug +# Building Example android-x86-tv-server, module platform-app +{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-x86-tv-server -PmatterSdkSourceBuild=false -PbuildDir={out}/android-x86-tv-server/platform-app :platform-app:assembleDebug -# Building Example android-x86-chip-tvserver, module content-app -{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-x86-chip-tvserver -PmatterSdkSourceBuild=false -PbuildDir={out}/android-x86-chip-tvserver/content-app :content-app:assembleDebug +# Building Example android-x86-tv-server, module content-app +{root}/examples/tv-app/android/App/gradlew -p {root}/examples/tv-app/android/App/ -PmatterBuildSrcDir={out}/android-x86-tv-server -PmatterSdkSourceBuild=false -PbuildDir={out}/android-x86-tv-server/content-app :content-app:assembleDebug # Building bl602-light ninja -C {out}/bl602-light diff --git a/scripts/build/testdata/glob_star_targets_except_host.txt b/scripts/build/testdata/glob_star_targets_except_host.txt index e8bcb0bf1568d2..af7c10978059c8 100644 --- a/scripts/build/testdata/glob_star_targets_except_host.txt +++ b/scripts/build/testdata/glob_star_targets_except_host.txt @@ -7,16 +7,16 @@ android-androidstudio-arm64-chip-tool android-androidstudio-x64-chip-tool android-androidstudio-x86-chip-tool android-arm-chip-tool -android-arm-chip-tv-casting-app -android-arm-chip-tvserver +android-arm-tv-casting-app +android-arm-tv-server android-arm64-chip-test android-arm64-chip-tool -android-arm64-chip-tv-casting-app -android-arm64-chip-tvserver +android-arm64-tv-casting-app +android-arm64-tv-server android-x64-chip-tool -android-x64-chip-tvserver +android-x64-tv-server android-x86-chip-tool -android-x86-chip-tvserver +android-x86-tv-server bl602-light cc13x2x7_26x2x7-all-clusters cc13x2x7_26x2x7-all-clusters-minimal