This guide explains how to integrate and use the SDK in an Android project.
- Modern SDK and recommended api with
This guide explains how to integrate and use the SDK in an Android project.
| #!/bin/bash | |
| BUILD_TYPE=$1 | |
| usage() { | |
| echo "Copy app manifest to wiki directory" | |
| echo "Usage:" | |
| echo " update_wiki_manifests.sh {BUILD_TYPE}" | |
| echo " Example: update_wiki_manifests.sh debug" | |
| } |
| #!/bin/bash | |
| BUILD_TYPE=$1 | |
| manifest_diff_file="/manifest.diff" | |
| usage() { | |
| echo "Find a diff between baseline and a current manifest. Then post it to github" | |
| echo "Usage:" | |
| echo " post_manifest_diff.sh {BUILD_TYPE}" | |
| echo " Example: post_manifest_diff.sh release" |
| import os | |
| import subprocess | |
| import xml.etree.ElementTree as Tree | |
| from xml.etree.ElementTree import Element | |
| for var in ["TARGET_MANIFEST_PATH", "SORTED_MANIFEST_PATH"]: | |
| if var not in os.environ: | |
| raise EnvironmentError("Required env variable {} is not set.".format(var)) | |
| TARGET_MANIFEST_PATH = os.getenv('TARGET_MANIFEST_PATH') |
| #!/bin/bash | |
| set -euxo pipefail | |
| #to use this script first cd to the target directory with changes | |
| GIT_BRANCH="$1" | |
| echo "current dir = $PWD, git branch = $GIT_BRANCH" | |
| git config user.email "$GIT_USER_EMAIL" | |
| git config user.name "$GIT_USER_NAME" | |
| git stash clear |
| cd $WIKI_DIR || exit 1 | |
| ./push_changes_from_directory.sh |
| git clone "[email protected]:$GITHUB_PROJECT_USERNAME/$GITHUB_PROJECT_NAME.wiki.git" $WIKI_DIR |
| def extractMapping = tasks.create("extractMapping") { | |
| description "Copy mapping archive into outputs/artifacts folder." | |
| group 'circleci' | |
| } | |
| android.applicationVariants.all { variant -> | |
| if (variant.mappingFile != null) { | |
| def copyMapping = tasks.create(name: "copy${variant.name}Mapping", type: Copy) { | |
| from variant.mappingFile | |
| rename { "${archivesBaseName}-${variant.name}Mapping.txt" } |
| #!/bin/bash | |
| set -eo pipefail | |
| #extract_manifest.sh {TARGET_APP_NAME} {BUILD_TYPE} | |
| #launch example: ./ci/extract_manifest.sh app debug | |
| TARGET_APP_NAME=$1 | |
| BUILD_TYPE=$2 | |
| echo "extract manifest for $TARGET_APP_NAME" | |
| build_dir="$WORKSPACE/$TARGET_APP_NAME/build" |
| set -eo pipefail | |
| APK_TARGET_DIR=~/workspace/build/circleci/apk | |
| TEST_APK_TARGET_DIR=~/workspace/build/circleci/android-test | |
| mkdir -p $APK_TARGET_DIR | |
| mkdir -p $TEST_APK_TARGET_DIR | |
| find . -type f -name "*.aab" -exec cp {} $APK_TARGET_DIR \; | |
| find . -type f -name "*qa.apk" -exec cp {} $APK_TARGET_DIR \; |