diff options
-rw-r--r-- | scripts/repackage-common.sh | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/scripts/repackage-common.sh b/scripts/repackage-common.sh index a11fa5c..5f1e058 100644 --- a/scripts/repackage-common.sh +++ b/scripts/repackage-common.sh @@ -96,18 +96,17 @@ set -e CLASSPATH=${ANDROID_HOST_OUT}/framework/currysrc.jar CHANGE_LOG=$(mktemp --suffix srcgen-change.log) +function get_uncommitted_repackaged_files() { + git -C "${PROJECT_DIR}" status -s | cut -c4- | grep "^repackaged/" +} + cd ${ANDROID_BUILD_TOP} build/soong/soong_ui.bash --make-mode currysrc -if [[ -z "${SRCGEN_DIR}" ]]; then - SRCGEN_DIR=${PROJECT_DIR}/srcgen -fi - -DEFAULT_CONSTRUCTORS_FILE=${SRCGEN_DIR}/default-constructors.txt -CORE_PLATFORM_API_FILE=${SRCGEN_DIR}/core-platform-api.txt -STABLE_CORE_PLATFORM_API_FILE=${SRCGEN_DIR}/stable-core-platform-api.txt -INTRA_CORE_API_FILE=${SRCGEN_DIR}/intra-core-api.txt -UNSUPPORTED_APP_USAGE_FILE=${SRCGEN_DIR}/unsupported-app-usage.json +DEFAULT_CONSTRUCTORS_FILE=${PROJECT_DIR}/srcgen/default-constructors.txt +CORE_PLATFORM_API_FILE=${PROJECT_DIR}/srcgen/core-platform-api.txt +INTRA_CORE_API_FILE=${PROJECT_DIR}/srcgen/intra-core-api.txt +UNSUPPORTED_APP_USAGE_FILE=${PROJECT_DIR}/srcgen/unsupported-app-usage.json TAB_SIZE=${TAB_SIZE-4} @@ -131,12 +130,6 @@ if [[ -f "${CORE_PLATFORM_API_FILE}" ]]; then SEP=" " fi -if [[ -f "${STABLE_CORE_PLATFORM_API_FILE}" ]]; then - echo "Adding CorePlatformApi(status=STABLE) annotations from ${STABLE_CORE_PLATFORM_API_FILE}" - REPACKAGE_ARGS="${REPACKAGE_ARGS}${SEP}--stable-core-platform-api-file ${STABLE_CORE_PLATFORM_API_FILE}" - SEP=" " -fi - if [[ -f "${INTRA_CORE_API_FILE}" ]]; then echo "Adding IntraCoreApi annotations from ${INTRA_CORE_API_FILE}" REPACKAGE_ARGS="${REPACKAGE_ARGS}${SEP}--intra-core-api-file ${INTRA_CORE_API_FILE}" @@ -175,10 +168,7 @@ function do_transform() { (cd $SRC_OUT_DIR; git checkout HEAD $(git status --short | grep -E "^ D .*/TEST_MAPPING$" | cut -c4-)) } -if [[ -z "${REPACKAGED_DIR}" ]]; then - REPACKAGED_DIR=${PROJECT_DIR}/repackaged -fi - +REPACKAGED_DIR=${PROJECT_DIR}/repackaged for i in ${MODULE_DIRS} do MODULE_DIR=${PROJECT_DIR}/${i} @@ -227,12 +217,6 @@ if [[ -f "${CORE_PLATFORM_API_FILE}" ]]; then "CorePlatformApi annotations were not added at the following locations from ${CORE_PLATFORM_API_FILE}:" fi -if [[ -f "${STABLE_CORE_PLATFORM_API_FILE}" ]]; then - # Check to ensure that all the requested annotations were added. - checkChangeLog <(sort -u "${STABLE_CORE_PLATFORM_API_FILE}" | grep -v '^#') "@libcore.api.CorePlatformApi" \ - "CorePlatformApi annotations were not added at the following locations from ${STABLE_CORE_PLATFORM_API_FILE}:" -fi - if [[ -f "${INTRA_CORE_API_FILE}" ]]; then # Check to ensure that all the requested annotations were added. checkChangeLog <(sort -u "${INTRA_CORE_API_FILE}" | grep -v '^#') "@libcore.api.IntraCoreApi" \ |