Ejemplo n.º 1
0
def run(app_name: str, android_tools_path: str, app_main_canonical_path: str):
    command = "adb" if platform.system() == "Windows" else "./adb"
    styled_name = bash.style(f"[{app_name}]", True, app_color)
    os.system(f"echo \"=> Executando o aplicativo {styled_name}\"")
    os.chdir(android_tools_path)
    os.system(
        f"{command} shell am start -n \"{app_main_canonical_path}\" -a android.intent.action.MAIN"
    )
Ejemplo n.º 2
0
def install(app_name: str, android_tools_path: str, build_path: str):
    command = "adb" if platform.system() == "Windows" else "./adb"
    styled_name = bash.style(f"[{app_name}]", True, app_color)
    os.system(f"echo \"=> Instalando o aplicativo {styled_name}\"")
    os.chdir(android_tools_path)
    os.system(
        f"{command} install -r -t {os.path.join(os.path.dirname(__file__), build_path)}"
    )
Ejemplo n.º 3
0
def build(app_name: str, app_path: str):
    command = "gradlew" if platform.system() == "Windows" else "./gradlew"
    styled_name = bash.style(f"[{app_name}]", True, app_color)
    os.system(f"echo \"=> Build do Aplicativo {styled_name}\"")
    os.chdir(os.path.join(os.path.dirname(__file__), app_path))
    os.system(f"{command} assembleDebug")
Ejemplo n.º 4
0
def build(module_name: str, module_path: str):
    command = "gradlew" if platform.system() == "Windows" else "./gradlew"
    styled_name = bash.style(f"[{module_name}]", True, "cyan")
    os.system(f"echo \"=> Build do Módulo {styled_name}\"")
    os.chdir(os.path.join(os.path.dirname(__file__), module_path))
    os.system(f"{command} assembleDebug")
Ejemplo n.º 5
0
def copy(module_name:str, build_path: str, destination_path: str):
    styled_name = bash.style(f"[{module_name}]", True, "cyan")
    os.system(f"echo \"=> Copiando o Módulo {styled_name}\"")
    current_build_path = os.path.join(os.path.dirname(__file__), build_path)
    destination_full_path = os.path.join(os.path.dirname(__file__), destination_path)
    shutil.copyfile(current_build_path, destination_full_path)