From 4a0d7c3695f620e0cd7b6808eef0e5db0aabda95 Mon Sep 17 00:00:00 2001 From: Sean Mac Gillicuddy Date: Wed, 29 May 2019 16:08:57 +0100 Subject: [PATCH] #1175 revert leakcanary resolution - add in commented out code for emulator on travis - add dummy files to allow local builds of release --- .travis.yml | 24 ++++-- app/build.gradle | 22 ++++-- google.json | 174 +++++++++++++++++++++++++++++++++++++++++ kiwix-android.keystore | Bin 0 -> 2175 bytes 4 files changed, 209 insertions(+), 11 deletions(-) create mode 100644 google.json create mode 100644 kiwix-android.keystore diff --git a/.travis.yml b/.travis.yml index 90b45be166..a47b6699da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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: diff --git a/app/build.gradle b/app/build.gradle index 0a8f0c658e..966976a604 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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' @@ -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" } } diff --git a/google.json b/google.json new file mode 100644 index 0000000000..de8174e081 --- /dev/null +++ b/google.json @@ -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" +} \ No newline at end of file diff --git a/kiwix-android.keystore b/kiwix-android.keystore new file mode 100644 index 0000000000000000000000000000000000000000..0e06aad3968c86c705ad2dc52da142df89e5c876 GIT binary patch literal 2175 zcmb`H=|2<-AH`?2k3HLvEhWT^HKNEa+t`;PnaR>bb{ei}hM^2)Tsx5^d)!iXT_R+i zn0N+diNY9+u8E|_y`SgB{R5sC=gs%c`TWlBe9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