This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Dimension(unit = Dimension.DP) | |
fun Number.pxToDp(): Float { | |
return toFloat() / Resources.getSystem().displayMetrics.density | |
} | |
@Dimension(unit = Dimension.SP) | |
fun Number.pxToSp(): Float { | |
return toFloat() / Resources.getSystem().displayMetrics.scaledDensity | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
BUILD_ID=$1 | |
TEST_DIR=$2 | |
test_apk() { | |
RESULTS_DIR=$1_${BUILD_ID} | |
gcloud firebase test android run \ | |
--type instrumentation \ | |
--app $2 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$GCLOUD_SERVICE_KEY" = "" ]; then | |
echo "GCLOUD_SERVICE_KEY env variable is empty. Exiting." | |
exit 1 | |
fi | |
# Export to secrets file | |
echo $GCLOUD_SERVICE_KEY | base64 -di > gcloud-service-key.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ENCRYPT_KEY=$1 | |
# Decrypt Release key | |
openssl aes-256-cbc -md sha256 -d -in signing/app-release.aes -out signing/app-release.jks -k $ENCRYPT_KEY | |
# Decrypt Google Services key | |
openssl aes-256-cbc -md sha256 -d -in signing/google-services.aes -out app/google-services.json -k $ENCRYPT_KEY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Encrypt Release key | |
openssl enc -aes-256-cbc -md sha256 -in app-release.jks -out app-release.aes -pass pass:yourPassword | |
# Encrypt Google Services key | |
openssl enc -aes-256-cbc -md sha256 -in google-services.json -out google-services.aes -pass pass:yourPassword | |
# Encrypt Play publishing key | |
openssl enc -aes-256-cbc -md sha256 -in play-publish-account.json -out play-publish-account.aes -pass pass:yourPassword |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is placed in buildSrc module | |
@file:Suppress("MayBeConstant") | |
package buildsrc | |
@Suppress("unused") | |
object BuildConfig { | |
val buildTools = "28.0.3" | |
val minSdk = 17 |