Skip to content

Commit

Permalink
Merge branch 'master' into add-instruction-to-readme
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md

change README
  • Loading branch information
Yaroslav Sudnik committed Aug 28, 2019
2 parents 7543e49 + c19ed63 commit 39c206d
Show file tree
Hide file tree
Showing 145 changed files with 3,661 additions and 2,339 deletions.
169 changes: 134 additions & 35 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,151 @@
version: 2
jobs:
build:
working_directory: ~/code
references:

cache_key: &cache_key
key: cache-v1-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
restore_cache: &restore_cache
restore_cache:
<<: *cache_key
save_cache: &save_cache
save_cache:
<<: *cache_key
paths:
- ~/.gradle
- ~/.m2

workspace: &workspace
~/workspace
attach_release_workspace: &attach_release_workspace
attach_workspace:
at: *workspace
persist_release_workspace: &persist_release_workspace
persist_to_workspace:
root: *workspace
paths:
- .

decrypt: &decrypt
run:
name: Decrypting secret keys
command: |
sh secrets/decrypt-keys.sh
android_config: &android_config
working_directory: *workspace
docker:
- image: circleci/android:api-26-alpha
- image: circleci/android:api-28
dependencies:
pre:
- echo y | android update sdk --no-ui --all --filter "tools"
- echo y | android update sdk --no-ui --all --filter "build-tools-23.0.2"
environment:
JVM_OPTS: -Xms512m -Xmx1024m
ADB_INSTALL_TIMEOUT: 5000
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"
TERM: dumb
_JAVA_OPTIONS: "-Xmx2048m -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m"'

jobs:
build:
<<: *android_config
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}

- run:
name: Android SDK
command: |
if [ ! -d "/usr/local/android-sdk-linux/platforms/android-26" ]; then echo y | android update sdk --no-ui --all --filter "android-25"; fi
if [ ! -d "/usr/local/android-sdk-linux/build-tools/26.0.2" ]; then echo y | android update sdk --no-ui --all --filter "build-tools-26.0.2"; fi
if [ ! -d "/usr/local/android-sdk-linux/extras/android/m2repository/com/android/support/design/27.0.1" ]; then echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"; fi
- *decrypt
- *restore_cache
- run:
name: Download Dependencies
name: Download dependencies
command: ./gradlew androidDependencies

- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}

- *save_cache
- run:
name: Checkstyle
command: ./gradlew checkstyle
name: Gradle build (release)
command: ./gradlew assembleRelease
- *persist_release_workspace
- store_artifacts:
path: app/build/outputs/apk/
destination: /apk/
- store_artifacts:
path: app/build/outputs/mapping/
destination: /mapping/

linter:
<<: *android_config
steps:
- *attach_release_workspace
- *restore_cache
- run:
name: Linter
command: ./gradlew lintProductionRelease
name: Run linter
command: ./gradlew lintRelease
- store_artifacts:
path: app/build/reports/lint/
destination: /reports/

test_unit:
<<: *android_config
steps:
- *attach_release_workspace
- *restore_cache
- run:
name: UnitTest
command: ./gradlew testProductionReleaseUnitTest testProductionDebugUnitTest

name: Run unit tests
command: ./gradlew testReleaseUnitTest
- store_artifacts:
path: app/build/reports
destination: reports
path: app/build/reports/tests/
destination: /reports/
- store_test_results:
path: app/build/test-results/
destination: /test-results/

detekt:
<<: *android_config
steps:
- *attach_release_workspace
- *restore_cache
- run:
name: Kotlin checkstyle
command: ./gradlew detekt
- store_artifacts:
path: app/build/outputs/apk/
destination: apks/
path: build/reports/detekt/
destination: /reports/

deploy:
<<: *android_config
steps:
- *attach_release_workspace
- *restore_cache
- run:
name: Deploy to Fabric Beta
command: ./gradlew crashlyticsUploadDistributionRelease

workflows:
version: 2
workflow:
jobs:
- build:
filters:
tags:
only: /^.*/
- linter:
requires:
- build
filters:
tags:
only: /^.*/
- test_unit:
requires:
- build
filters:
tags:
only: /^.*/
- detekt:
requires:
- build
filters:
tags:
only: /^.*/
- deploy:
filters:
tags:
only: /^v{0,1}\d+[.]\d+[.]\d+$/
branches:
ignore: /^.*/
requires:
- linter
- detekt
- test_unit
72 changes: 61 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,63 @@
.gradle
/local.properties
/.idea/workspace.xml
.DS_Store
.idea/
*.iml
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/
.gradletasknamecache

crashlytics.properties
crashlytics-build.properties
com_crashlytics_export_strings.xml
dagger-proguard-keepnames.cfg
# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
.idea/

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Google Services (e.g. APIs or Firebase)
google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

# Secret keys
secrets/keys.properties
app/fabric.properties
Loading

0 comments on commit 39c206d

Please sign in to comment.