Merge pull request #31 from chirayudesai/prebuilt
Android.mk: use prebuilt apk
This commit is contained in:
commit
726cea0a09
5 changed files with 27 additions and 15 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -46,4 +46,7 @@ gradle-app.setting
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
## Android
|
## Android
|
||||||
gen/
|
gen/
|
||||||
|
|
||||||
|
## Prebuilt
|
||||||
|
Backup.apk
|
||||||
|
|
|
@ -17,19 +17,14 @@ LOCAL_SRC_FILES := $(LOCAL_MODULE)
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE_TAGS := optional
|
|
||||||
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
|
|
||||||
commons-io:../../libs/commons-io-2.6.jar
|
|
||||||
include $(BUILD_MULTI_PREBUILT)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
backup_root := $(LOCAL_PATH)
|
||||||
LOCAL_PACKAGE_NAME := Backup
|
|
||||||
LOCAL_MODULE_TAGS := optional
|
$(backup_root)/Backup.apk:
|
||||||
LOCAL_REQUIRED_MODULES := permissions_com.stevesoltys.backup.xml whitelist_com.stevesoltys.backup.xml
|
cd $(backup_root) && ./download.sh
|
||||||
LOCAL_PRIVILEGED_MODULE := true
|
|
||||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
LOCAL_MODULE := Backup
|
||||||
|
LOCAL_SRC_FILES := Backup.apk
|
||||||
LOCAL_CERTIFICATE := platform
|
LOCAL_CERTIFICATE := platform
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := commons-io
|
LOCAL_MODULE_CLASS := APPS
|
||||||
LOCAL_SRC_FILES := $(call all-java-files-under, java)
|
include $(BUILD_PREBUILT)
|
||||||
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
|
|
||||||
include $(BUILD_PACKAGE)
|
|
14
download.sh
Executable file
14
download.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Script to download apk from github releases
|
||||||
|
|
||||||
|
BASE_URL="https://github.com/stevesoltys/backup/releases"
|
||||||
|
APK="app-release-unsigned.apk"
|
||||||
|
VERSION="latest/download"
|
||||||
|
TAG=$(git tag -l --points-at HEAD)
|
||||||
|
|
||||||
|
if [ ! -z ${TAG} ]; then
|
||||||
|
VERSION="download/${TAG}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl -L ${BASE_URL}/${VERSION}/${APK} > Backup.apk
|
Loading…
Reference in a new issue