Skip to content

Commit

Permalink
#1175 revert leakcanary resolution - add in commented out code for em…
Browse files Browse the repository at this point in the history
…ulator on travis - add dummy files to allow local builds of release
  • Loading branch information
macgills committed May 29, 2019
1 parent 9ce9558 commit 4a0d7c3
Show file tree
Hide file tree
Showing 4 changed files with 209 additions and 11 deletions.
24 changes: 19 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ jdk: oraclejdk8

sudo: required

env:
global:
# - ANDROID_TARGET=android-24
# - ANDROID_ABI=arm64-v8a

before_install:
- openssl aes-256-cbc -K $encrypted_82adfa9c3806_key -iv $encrypted_82adfa9c3806_iv -in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
Expand Down Expand Up @@ -34,17 +39,26 @@ android:
- build-tools-28.0.3
- android-27
- extra-android-m2repository
# - $ANDROID_TARGET
# - sys-img-${ANDROID_ABI}-${ANDROID_TARGET}

licenses:
- ".+"

script:
- ./gradlew lintKiwixDebug jacocoTestKiwixDebugUnitTestReport assembleKiwixRelease
- if [$TRAVIS_PULL_REQUEST == “false” ] && [ $TRAVIS_BRANCH == “release” ]; then
./gradlew publishKiwixRelease;
- ./gradlew lintKiwixDebug jacocoTestKiwixDebugUnitTestReport
# - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 100M
# - emulator -avd test -no-window &
# - android-wait-for-emulator
# - adb shell setprop dalvik.vm.dexopt-flags v=n,o=v
# - adb shell input keyevent 82 & # unlock screen by pressing menu button
# - adb -e logcat *:D > logcat.log &
# - ./gradlew createKiwixDebugCoverageReport
- if [ $TRAVIS_TAG ] && [$TRAVIS_PULL_REQUEST == “false” ] && [ $TRAVIS_BRANCH == “release” ]; then
./gradlew publish;
fi
- if [$TRAVIS_TAG != “” ] && [$TRAVIS_PULL_REQUEST == “false” ] && [ $TRAVIS_BRANCH == “master” ]; then
./gradlew publishKiwixRelease;
- if [ $TRAVIS_TAG ] && [$TRAVIS_PULL_REQUEST == “false” ] && [ $TRAVIS_BRANCH == “master” ]; then
./gradlew publish;
fi

after_success:
Expand Down
22 changes: 16 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,19 @@ dependencies {
androidTestImplementation "org.mockito:mockito-android:2.24.5"

// Leak canary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.3'
androidTestImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
implementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3'
// Only enable leak canary in debug builds
configurations.all { config ->
if (config.name.contains('debug') || config.name.contains("Debug")) {
config.resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.squareup.leakcanary' &&
details.requested.name == 'leakcanary-android-no-op') {
details.useTarget(group: details.requested.group, name: 'leakcanary-android',
version: details.requested.version)
}
}
}
}

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
Expand Down Expand Up @@ -231,9 +241,9 @@ android {
signingConfigs {
release {
storeFile file("../kiwix-android.keystore")
storePassword System.getenv("KEY_STORE_PASSWORD")
keyAlias System.getenv("KEY_ALIAS")
keyPassword System.getenv("KEY_PASSWORD")
storePassword System.getenv("KEY_STORE_PASSWORD") ?: "000000"
keyAlias System.getenv("KEY_ALIAS") ?: "keystore"
keyPassword System.getenv("KEY_PASSWORD") ?: "000000"
}
}

Expand Down
174 changes: 174 additions & 0 deletions google.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
{
"project_info": {
"project_number": "529266483286",
"firebase_url": "https://dummy-robot-scouter-for-travis.firebaseio.com",
"project_id": "dummy-robot-scouter-for-travis",
"storage_bucket": "dummy-robot-scouter-for-travis.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:529266483286:android:3fe88d30d9c76f79",
"android_client_info": {
"package_name": "com.supercilex.robotscouter.debug"
}
},
"oauth_client": [
{
"client_id": "529266483286-43pcoiq9hfu81rakcpa3o8pung09o52a.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCWZh_3qAXEn9zzyRMZ0Yp2wCCkXkWbyc4"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:529266483286:android:fa7f0f2977f5f001",
"android_client_info": {
"package_name": "com.supercilex.robotscouter"
}
},
"oauth_client": [
{
"client_id": "529266483286-6vo1cbbrsvdl80mqdomk3i3m425mv07b.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.supercilex.robotscouter",
"certificate_hash": "0c7b6732a540434aca7e4bdea13aa3ed3209242f"
}
},
{
"client_id": "529266483286-43pcoiq9hfu81rakcpa3o8pung09o52a.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCWZh_3qAXEn9zzyRMZ0Yp2wCCkXkWbyc4"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "529266483286-43pcoiq9hfu81rakcpa3o8pung09o52a.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:529266483286:android:91eecf4730fc920b",
"android_client_info": {
"package_name": "com.firebase.uidemo"
}
},
"oauth_client": [
{
"client_id": "529266483286-qid6ms49u1kq7q3e0guv8fuvsqhthi4r.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.firebase.uidemo",
"certificate_hash": "0c7b6732a540434aca7e4bdea13aa3ed3209242f"
}
},
{
"client_id": "529266483286-43pcoiq9hfu81rakcpa3o8pung09o52a.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCWZh_3qAXEn9zzyRMZ0Yp2wCCkXkWbyc4"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "529266483286-43pcoiq9hfu81rakcpa3o8pung09o52a.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:529266483286:android:31fef6725a92125b",
"android_client_info": {
"package_name": "com.supercilex.test"
}
},
"oauth_client": [
{
"client_id": "529266483286-tmk00dnjnsbqo0j6ha30rmul2u3aqppf.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.supercilex.test",
"certificate_hash": "0c7b6732a540434aca7e4bdea13aa3ed3209242f"
}
},
{
"client_id": "529266483286-43pcoiq9hfu81rakcpa3o8pung09o52a.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCWZh_3qAXEn9zzyRMZ0Yp2wCCkXkWbyc4"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "529266483286-43pcoiq9hfu81rakcpa3o8pung09o52a.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}
Binary file added kiwix-android.keystore
Binary file not shown.

0 comments on commit 4a0d7c3

Please sign in to comment.