diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 01c267c..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference -version: 2.1 -# Use a package of configuration called an orb. -orbs: - # Declare a dependency on the welcome-orb - welcome: circleci/welcome-orb@0.4.1 -# Orchestrate or schedule a set of jobs -workflows: - # Name the workflow "welcome" - welcome: - # Run the welcome/run job in its own container - jobs: - - welcome/run \ No newline at end of file diff --git a/.editorconfig b/.editorconfig index 0861e13..f5578ef 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,4 +2,26 @@ # Comma-separated list of rules to disable (Since 0.34.0) # Note that rules in any ruleset other than the standard ruleset will need to be prefixed # by the ruleset identifier. -disabled_rules=import-ordering,experimental:annotation +disabled_rules=no-wildcard-imports,import-ordering,experimental:annotation +ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL + +ij_kotlin_line_comment_at_first_column = false +ij_kotlin_line_comment_add_space = true + +# These options can keep to use single name import +ij_kotlin_name_count_to_use_star_import = 2147483647 +ij_kotlin_name_count_to_use_star_import_for_members = 2147483647 + +ij_kotlin_keep_blank_lines_in_declarations = 1 +ij_kotlin_keep_blank_lines_in_code = 1 +ij_kotlin_keep_blank_lines_before_right_brace = 0 + +# optional but recommended +ij_kotlin_align_multiline_parameters = false + +# optional but recommended +ij_continuation_indent_size = 4 + +# Android specific rules +ij_kotlin_import_nested_classes = false +ij_kotlin_imports_layout = *,^ diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml new file mode 100644 index 0000000..87c89b5 --- /dev/null +++ b/.github/workflows/cicd.yml @@ -0,0 +1,83 @@ +name: Continuous Integration + +on: + push: + pull_request: + +env: + LANG: en_US.UTF-8 + # Notifications + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_URL }} + SLACK_CHANNEL: '#dev-builds' + +jobs: + + ci: + runs-on: ubuntu-latest + timeout-minutes: 45 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install Fastlane and required plugins + run: | + sudo gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)" + bundle install --path vendor/bundle + # Runs build with Gradle + - name: Build with Fastlane + run: bundle exec fastlane debug + - name: Send notification of build result + uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + text: '${{github.repository}} Dev build status is ${{ job.status }}' + fields: repo,message,commit,author,action,eventName,ref,workflow,job,took + if: always() + + + release: + if: ${{ github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' }} + runs-on: ubuntu-latest + timeout-minutes: 45 + env: + # S3 + FOLDER: android-base + AWS_REGION: us-east-1 + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + KEYS_BUCKET: ${{ secrets.AWS_S3_KEYS_BUCKET }} + # Android Release + JSON_KEYFILE: google-api.json + RELEASE_STORE_FILE: key.keystore + RELEASE_STORE_PASSWORD: ${{ secrets.ANDROID_RELEASE_STORE_PASSWORD }} + RELEASE_KEY_ALIAS: debug + RELEASE_KEY_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEY_PASSWORD }} + # Notifications + SLACK_URL: ${{ secrets.SLACK_URL }} + SLACK_CHANNEL: '#dev-builds' + steps: + - name: Checkout + uses: actions/checkout@v2 + # Downloads certificate, private key and Firebase file + - name: Download code signing items + run: | + aws s3 cp s3://$KEYS_BUCKET/$FOLDER/ . --recursive + mv ./android/$RELEASE_STORE_FILE ./app/$RELEASE_STORE_FILE + - name: Install Fastlane and required plugins + run: | + sudo gem install bundler + bundle install --path vendor/bundle + # Build with Gradle and submit to Play Store + - name: Submit Development build with Fastlane + if: ${{ github.ref == 'refs/heads/develop' }} + run: bundle exec fastlane deploy_dev + - name: Submit Staging build with Fastlane + if: ${{ github.ref == 'refs/heads/master' }} + run: bundle exec fastlane deploy_staging + - name: Send notification of build result + uses: 8398a7/action-slack@v3 + with: + status: ${{ job.status }} + text: '${{github.repository}} ${{github.ref}} build submission status is ${{ job.status }}' + fields: repo,message,commit,author,action,eventName,ref,workflow,job,took + if: always() + diff --git a/.gitignore b/.gitignore index 5707080..83d8a4c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,10 +10,14 @@ /.idea/assetWizardSettings.xml /.idea/gradle.xml /.idea/* -/secure/* /app/prod/release/* /fastlane/report.xml .DS_Store /build /captures .externalNativeBuild +.gitsecret/keys/random_seed +fastlane/report.xml +!*.secret +/secure/key.keystore +/secure/google-api.json \ No newline at end of file diff --git a/.gitsecret/keys/pubring.kbx b/.gitsecret/keys/pubring.kbx new file mode 100644 index 0000000..49632e7 Binary files /dev/null and b/.gitsecret/keys/pubring.kbx differ diff --git a/.gitsecret/keys/pubring.kbx~ b/.gitsecret/keys/pubring.kbx~ new file mode 100644 index 0000000..0236b0a Binary files /dev/null and b/.gitsecret/keys/pubring.kbx~ differ diff --git a/.gitsecret/keys/trustdb.gpg b/.gitsecret/keys/trustdb.gpg new file mode 100644 index 0000000..06d3c55 Binary files /dev/null and b/.gitsecret/keys/trustdb.gpg differ diff --git a/.gitsecret/paths/mapping.cfg b/.gitsecret/paths/mapping.cfg new file mode 100644 index 0000000..08f0ea8 --- /dev/null +++ b/.gitsecret/paths/mapping.cfg @@ -0,0 +1,3 @@ +secure/google-api.json:e494b2376306f39ea643ebe13156e4b885cddb64755a3a3fe4dd5f2807cb9a70 +secure/key.keystore:6c70718b97803ac753020362b214a40762dc4ed95c4665648f86758c20ddbae9 +gradle.properties:2a428ac440037c87d1001976c703d0ea412dee852aae78d9827f1307c4604545 diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 674414f..30de1d6 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,14 +4,18 @@