Commit da46f063 authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 1747754 - Move --with-android-min-sdk to python configure....

Bug 1747754 - Move --with-android-min-sdk to python configure. r=firefox-build-system-reviewers,geckoview-reviewers,mhentges,calu

And remove --with-android-max-sdk, which hasn't been used since the
removal of Fennec.

Differential Revision: https://phabricator.services.mozilla.com/D134734
parent f48dc2db
Loading
Loading
Loading
Loading
+0 −31
Original line number Diff line number Diff line
@@ -80,34 +80,3 @@ fi
AC_SUBST_LIST([STLPORT_LIBS])

])


dnl Configure an Android SDK.
AC_DEFUN([MOZ_ANDROID_SDK],
[

MOZ_ARG_WITH_STRING(android-min-sdk,
[  --with-android-min-sdk=[VER]     Impose a minimum Firefox for Android SDK version],
[ MOZ_ANDROID_MIN_SDK_VERSION=$withval ])

MOZ_ARG_WITH_STRING(android-max-sdk,
[  --with-android-max-sdk=[VER]     Impose a maximum Firefox for Android SDK version],
[ MOZ_ANDROID_MAX_SDK_VERSION=$withval ])

if test -n "$MOZ_ANDROID_MIN_SDK_VERSION"; then
    if test -n "$MOZ_ANDROID_MAX_SDK_VERSION"; then
        if test $MOZ_ANDROID_MAX_SDK_VERSION -lt $MOZ_ANDROID_MIN_SDK_VERSION ; then
            AC_MSG_ERROR([--with-android-max-sdk must be at least the value of --with-android-min-sdk.])
        fi
    fi

    if test $MOZ_ANDROID_MIN_SDK_VERSION -gt $ANDROID_TARGET_SDK ; then
        AC_MSG_ERROR([--with-android-min-sdk is expected to be less than $ANDROID_TARGET_SDK])
    fi

    AC_SUBST(MOZ_ANDROID_MIN_SDK_VERSION)
fi

AC_SUBST(MOZ_ANDROID_MAX_SDK_VERSION)

])
+43 −6
Original line number Diff line number Diff line
@@ -46,9 +46,49 @@ def android_sdk_root(value):
    )


@dependable
def android_sdk_version():
    return namespace(build_tools_version="30.0.2", target_sdk_version="30")
@depends("--enable-geckoview-lite")
def android_sdk_version(geckoview_lite):
    # We support Android SDK version 21 and up by default (16 in lite mode).
    # See the --enable-android-min-sdk option below.
    #
    # Warning: Before increasing the with-android-min-sdk value, please note several places in
    # and out of tree have to be changed. Otherwise, places like Treeherder or archive.mozilla.org
    # will advertise a bad API level. This may confuse people. As an example, please look at
    # bug 1384482.
    # If you think you can't handle the whole set of changes, please reach out to the Release
    # Engineering team.
    return namespace(
        build_tools_version="30.0.2",
        target_sdk_version="30",
        min_sdk_version="16" if geckoview_lite else "21",
    )


option(
    "--with-android-min-sdk",
    default=android_sdk_version.min_sdk_version,
    help="Impose a minimum Firefox for Android SDK version",
)


@depends("--with-android-min-sdk", android_sdk_version.target_sdk_version)
@imports(_from="__builtin__", _import="ValueError")
def valid_android_min_sdk(min_sdk_version, target_sdk_version):
    if not min_sdk_version:
        die("--without-android-min-sdk is not a valid option")
    try:
        if int(min_sdk_version[0]) > int(target_sdk_version):
            die(
                "--with-android-min-sdk is expected to be less than {}".format(
                    target_sdk_version
                )
            )
    except ValueError:
        die("--with-android-min-sdk takes a numerical value")
    return min_sdk_version[0]


set_config("MOZ_ANDROID_MIN_SDK_VERSION", valid_android_min_sdk)


@depends(android_sdk_root, android_sdk_version)
@@ -127,6 +167,3 @@ set_config("ANDROID_TOOLS", android_tools)

set_config("ANDROID_BUILD_TOOLS_VERSION", android_sdk_version.build_tools_version)
set_config("ANDROID_TARGET_SDK", android_sdk_version.target_sdk_version)
add_old_configure_assignment(
    "ANDROID_TARGET_SDK", android_sdk_version.target_sdk_version
)
+0 −2
Original line number Diff line number Diff line
@@ -99,8 +99,6 @@ def old_configure_options(*options):
    "--includedir",
    "--libdir",
    "--prefix",
    "--with-android-max-sdk",
    "--with-android-min-sdk",
    "--with-branding",
    "--with-distribution-id",
    "--with-macbundlename-prefix",
+0 −14
Original line number Diff line number Diff line
@@ -12,20 +12,6 @@ MOZ_BRANDING_DIRECTORY=mobile/android/branding/unofficial
MOZ_OFFICIAL_BRANDING_DIRECTORY=mobile/android/branding/official
# MOZ_APP_DISPLAYNAME is set by branding/configure.sh

# We support Android SDK version 21 and up by default (16 in lite mode).
# See the --enable-android-min-sdk and --enable-android-max-sdk arguments in configure.in.
# 
# Warning: Before increasing the with-android-min-sdk value, please note several places in and out
# of tree have to be changed. Otherwise, places like Treeherder or archive.mozilla.org will
# advertise a bad API level. This may confuse people. As an example, please look at bug 1384482.
# If you think you can't handle the whole set of changes, please reach out to the Release
# Engineering team.
if test "$MOZ_ANDROID_GECKOVIEW_LITE"; then
  MOZ_ANDROID_MIN_SDK_VERSION=16
else
  MOZ_ANDROID_MIN_SDK_VERSION=21
fi

MOZ_NO_SMART_CARDS=1

MOZ_RAW=1
+0 −3
Original line number Diff line number Diff line
@@ -56,9 +56,6 @@ option(
)

set_config("MOZ_ANDROID_GECKOVIEW_LITE", True, when="--enable-geckoview-lite")
add_old_configure_assignment(
    "MOZ_ANDROID_GECKOVIEW_LITE", True, when="--enable-geckoview-lite"
)

imply_option("MOZ_NORMANDY", False)
imply_option("MOZ_SERVICES_HEALTHREPORT", True)
Loading