Add a density axis to tapas.
It allows overriding the density the app is built for. Currently only used in the GMS core APK's gradle file. Change-Id: I3606df313a3110208cd8e6acade5f558261c921f (cherry picked from commit 7e3d2341570681e566872216796dc4f79c8695ef)
This commit is contained in:
committed by
Jeff Hamilton
parent
60e80ef6e7
commit
5069bd6bfa
@@ -570,7 +570,8 @@ function tapas()
|
|||||||
{
|
{
|
||||||
local arch="$(echo $* | xargs -n 1 echo | \grep -E '^(arm|x86|mips|armv5|arm64|x86_64|mips64)$' | xargs)"
|
local arch="$(echo $* | xargs -n 1 echo | \grep -E '^(arm|x86|mips|armv5|arm64|x86_64|mips64)$' | xargs)"
|
||||||
local variant="$(echo $* | xargs -n 1 echo | \grep -E '^(user|userdebug|eng)$' | xargs)"
|
local variant="$(echo $* | xargs -n 1 echo | \grep -E '^(user|userdebug|eng)$' | xargs)"
|
||||||
local apps="$(echo $* | xargs -n 1 echo | \grep -E -v '^(user|userdebug|eng|arm|x86|mips|armv5|arm64|x86_64|mips64)$' | xargs)"
|
local density="$(echo $* | xargs -n 1 echo | \grep -E '^(ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi)$' | xargs)"
|
||||||
|
local apps="$(echo $* | xargs -n 1 echo | \grep -E -v '^(user|userdebug|eng|arm|x86|mips|armv5|arm64|x86_64|mips64|ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi)$' | xargs)"
|
||||||
|
|
||||||
if [ $(echo $arch | wc -w) -gt 1 ]; then
|
if [ $(echo $arch | wc -w) -gt 1 ]; then
|
||||||
echo "tapas: Error: Multiple build archs supplied: $arch"
|
echo "tapas: Error: Multiple build archs supplied: $arch"
|
||||||
@@ -580,6 +581,10 @@ function tapas()
|
|||||||
echo "tapas: Error: Multiple build variants supplied: $variant"
|
echo "tapas: Error: Multiple build variants supplied: $variant"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
if [ $(echo $density | wc -w) -gt 1 ]; then
|
||||||
|
echo "tapas: Error: Multiple densities supplied: $density"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
local product=full
|
local product=full
|
||||||
case $arch in
|
case $arch in
|
||||||
@@ -599,6 +604,7 @@ function tapas()
|
|||||||
|
|
||||||
export TARGET_PRODUCT=$product
|
export TARGET_PRODUCT=$product
|
||||||
export TARGET_BUILD_VARIANT=$variant
|
export TARGET_BUILD_VARIANT=$variant
|
||||||
|
export TARGET_BUILD_DENSITY=$density
|
||||||
export TARGET_BUILD_TYPE=release
|
export TARGET_BUILD_TYPE=release
|
||||||
export TARGET_BUILD_APPS=$apps
|
export TARGET_BUILD_APPS=$apps
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user