Merge "Use patch instead of git apply." am: 0d2d11bc00
am: 251eac36ab
Original change: https://android-review.googlesource.com/c/platform/build/+/2627735 Change-Id: I8d3d026100c25303bfa196efcbcafd4860e26e5c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
c3afc51e86
2 changed files with 5 additions and 5 deletions
|
@ -5,14 +5,14 @@ set -ex
|
|||
function apply_droidstubs_hack() {
|
||||
if ! grep -q 'STOPSHIP: RESTORE THIS LOGIC WHEN DECLARING "REL" BUILD' "$top/build/soong/java/droidstubs.go" ; then
|
||||
local build_soong_git_root="$(readlink -f $top/build/soong)"
|
||||
git -C "$build_soong_git_root" apply --allow-empty ../../build/make/tools/finalization/build_soong_java_droidstubs.go.apply_hack.diff
|
||||
patch --strip=1 --no-backup-if-mismatch --directory="$build_soong_git_root" --input=../../build/make/tools/finalization/build_soong_java_droidstubs.go.apply_hack.diff
|
||||
fi
|
||||
}
|
||||
|
||||
function apply_resources_sdk_int_fix() {
|
||||
if ! grep -q 'public static final int RESOURCES_SDK_INT = SDK_INT;' "$top/frameworks/base/core/java/android/os/Build.java" ; then
|
||||
local base_git_root="$(readlink -f $top/frameworks/base)"
|
||||
git -C "$base_git_root" apply --allow-empty ../../build/make/tools/finalization/frameworks_base.apply_resource_sdk_int.diff
|
||||
patch --strip=1 --no-backup-if-mismatch --directory="$base_git_root" --input=../../build/make/tools/finalization/frameworks_base.apply_resource_sdk_int.diff
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -4,19 +4,19 @@ set -ex
|
|||
|
||||
function revert_droidstubs_hack() {
|
||||
if grep -q 'STOPSHIP: RESTORE THIS LOGIC WHEN DECLARING "REL" BUILD' "$top/build/soong/java/droidstubs.go" ; then
|
||||
git -C "$top/build/soong" apply --allow-empty ../../build/make/tools/finalization/build_soong_java_droidstubs.go.revert_hack.diff
|
||||
patch --strip=1 --no-backup-if-mismatch --directory="$top/build/soong" --input=../../build/make/tools/finalization/build_soong_java_droidstubs.go.revert_hack.diff
|
||||
fi
|
||||
}
|
||||
|
||||
function revert_resources_sdk_int_fix() {
|
||||
if grep -q 'public static final int RESOURCES_SDK_INT = SDK_INT;' "$top/frameworks/base/core/java/android/os/Build.java" ; then
|
||||
git -C "$top/frameworks/base" apply --allow-empty ../../build/make/tools/finalization/frameworks_base.revert_resource_sdk_int.diff
|
||||
patch --strip=1 --no-backup-if-mismatch --directory="$top/frameworks/base" --input=../../build/make/tools/finalization/frameworks_base.revert_resource_sdk_int.diff
|
||||
fi
|
||||
}
|
||||
|
||||
function apply_prerelease_sdk_hack() {
|
||||
if ! grep -q 'STOPSHIP: hack for the pre-release SDK' "$top/frameworks/base/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java" ; then
|
||||
git -C "$top/frameworks/base" apply --allow-empty ../../build/make/tools/finalization/frameworks_base.apply_hack.diff
|
||||
patch --strip=1 --no-backup-if-mismatch --directory="$top/frameworks/base" --input=../../build/make/tools/finalization/frameworks_base.apply_hack.diff
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue