Skip to content

Commit

Permalink
QoL tweaks to Android SDK cmdline-tools version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
rmartin16 committed Aug 7, 2023
1 parent 9af3b8b commit 2d0603c
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/briefcase/integrations/android_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class AndroidSDK(ManagedTool):
full_name = "Android SDK"

# Latest version for Command-Line Tools download as of August 2023
# **Be sure the android.rst docs stay in sync with version updates here**
SDK_MANAGER_DOWNLOAD_VER = "9477386"
SDK_MANAGER_VER = "9.0"

Expand Down Expand Up @@ -275,7 +276,6 @@ def verify_install(
"""
)
else:
sdk = None
tools.logger.warning(
f"""
*************************************************************************
Expand All @@ -292,7 +292,7 @@ def verify_install(
If {sdk_source_env} is an Android SDK, ensure it is the root directory
of the Android SDK instance such that
${sdk_source_env}/cmdline-tools/{cls.SDK_MANAGER_VER}/bin/sdkmanager
${sdk_source_env}{os.sep}{sdk.sdkmanager_path.relative_to(sdk.root_path)}
is a valid filepath.
Expand All @@ -301,6 +301,7 @@ def verify_install(
*************************************************************************
"""
)
sdk = None

# Verify Briefcase-managed Android SDK
if sdk is None:
Expand All @@ -313,16 +314,17 @@ def verify_install(

sdk.delete_legacy_sdk_tools()

tools.logger.info(
"Upgrading Android SDK..."
if sdk.cmdline_tools_path.parent.exists()
else "The Android SDK was not found; downloading and installing...",
prefix=cls.name,
)
tools.logger.info(
"To use an existing Android SDK instance, specify its root "
"directory path in the ANDROID_HOME environment variable."
)
if sdk.cmdline_tools_path.parent.exists():
tools.logger.info("Upgrading Android SDK...", prefix=cls.name)
else:
tools.logger.info(
"The Android SDK was not found; downloading and installing...",
prefix=cls.name,
)
tools.logger.info(
"To use an existing Android SDK instance, specify its root "
"directory path in the ANDROID_HOME environment variable."
)
tools.logger.info()
sdk.install()

Expand Down

0 comments on commit 2d0603c

Please sign in to comment.