1010# with this name, it will be used.
1111#
1212# The convention here is tailscale-android-build-amd64-<date>
13- DOCKER_IMAGE := tailscale-android-build-amd64-070325-1
13+ DOCKER_IMAGE := tailscale-android-build-amd64-072226-2
1414
1515# The integration test image contains the Android emulator, system image, SDK,
1616# build-tools, NDK, adb, and helper tools needed to run the emulator-backed Go
@@ -27,6 +27,15 @@ export TS_USE_TOOLCHAIN=1
2727# affordances for debugging it.
2828GOMOBILE_BUILD_TAGS := ts_omit_cachenetmap
2929
30+ # Pull androidApiLevel from gradle.properties.
31+ ANDROID_API_LEVEL := $(shell grep '^androidApiLevel=' android/gradle.properties | cut -d'=' -f2)
32+
33+ ifeq ($(ANDROID_API_LEVEL ) ,)
34+ $(error androidApiLevel missing from android/gradle.properties)
35+ endif
36+
37+ ANDROID_BUILD_TOOLS_VERSION := $(shell grep '^androidBuildToolsVersion=' android/gradle.properties | cut -d'=' -f2)
38+
3039DEBUG_APK := tailscale-debug.apk
3140RELEASE_AAB := tailscale-release.aab
3241RELEASE_TV_AAB := tailscale-tv-release.aab
4756 ANDROID_TOOLS_URL := "https://dl.google.com/android/repository/commandlinetools-mac-9477386_latest.zip"
4857 ANDROID_TOOLS_SUM := "2072ffce4f54cdc0e6d2074d2f381e7e579b7d63e915c220b96a7db95b2900ee commandlinetools-mac-9477386_latest.zip"
4958endif
50- ANDROID_SDK_PACKAGES := 'platforms;android-34 ' 'extras;android;m2repository' 'ndk;23.1.7779620' 'platform-tools' 'build-tools;34.0.0 '
59+ ANDROID_SDK_PACKAGES := 'platforms;android-$( ANDROID_API_LEVEL ) ' 'extras;android;m2repository' 'ndk;23.1.7779620' 'platform-tools' 'build-tools;$( ANDROID_BUILD_TOOLS_VERSION ) '
5160
5261# Attempt to find an ANDROID_SDK_ROOT / ANDROID_HOME based either from
5362# preexisting environment or common locations.
91100 export PATH := $(JAVA_HOME ) /bin:$(PATH )
92101endif
93102
94- AVD_BASE_IMAGE := " system-images;android-33 ;google_apis;"
103+ AVD_BASE_IMAGE := ' system-images;android-$( ANDROID_API_LEVEL ) ;google_apis;'
95104export HOST_ARCH := $(shell uname -m)
96105ifeq ($(HOST_ARCH ) ,aarch64)
97106 AVD_IMAGE := "$(AVD_BASE_IMAGE ) arm64-v8a"
0 commit comments