diff --git a/.bettercodehub.yml b/.bettercodehub.yml index d7be5169..349f7675 100644 --- a/.bettercodehub.yml +++ b/.bettercodehub.yml @@ -1,3 +1,3 @@ -component_depth: 10 +component_depth: 8 languages: - kotlin diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index d744bdd1..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,142 +0,0 @@ -name: Test and deploy - -on: - push: - branches: [ develop ] - tags: [ '*' ] - pull_request: - branches: [ develop ] - - workflow_dispatch: - -jobs: - build: - name: Pre-build - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: fkirc/skip-duplicate-actions@master - - uses: actions/checkout@v2 - - uses: gradle/wrapper-validation-action@v1 - - uses: actions/setup-java@v1 - with: - java-version: 11 - - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} - - name: Build - run: ./gradlew --build-cache compileFdroidDebugUnitTestKotlin preFdroidDebugAndroidTestBuild dexBuilderFdroidDebugAndroidTest packageFdroidDebug packageFdroidDebugAndroidTest - - name: Prepare build cache - run: tar -cf prebuild.tar .build-cache .gradle app/build - - uses: actions/upload-artifact@v2 - with: - name: prebuild.tar - path: prebuild.tar - - unit-tests: - name: Unit tests - runs-on: ubuntu-latest - timeout-minutes: 10 - needs: [ build ] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 11 - - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} - - uses: actions/download-artifact@v2 - with: - name: prebuild.tar - - name: Extract build cache - run: tar -xf prebuild.tar - - name: Unit tests - run: | - ./gradlew --build-cache -Pcoverage testFdroidDebugUnitTest --stacktrace - ./gradlew --build-cache -Pcoverage jacocoTestReport --stacktrace - - uses: codecov/codecov-action@v1 - with: - flags: unit - - instrumentation-tests: - name: Instrumentation tests - runs-on: macOS-latest - timeout-minutes: 15 - needs: [ build ] - strategy: - fail-fast: true - matrix: - api-level: [21, 29] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 11 - - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} - - uses: actions/download-artifact@v2 - with: - name: prebuild.tar - - name: Extract build cache - run: tar -xf prebuild.tar - - name: Instrumentation tests - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - arch: x86 - script: | - ./gradlew --build-cache -Pcoverage connectedFdroidDebugAndroidTest --stacktrace - ./gradlew --build-cache -Pcoverage jacocoTestReport --stacktrace - - uses: codecov/codecov-action@v1 - with: - flags: instrumented,api-${{ matrix.api-level }} - - deploy-google-play: - name: Deploy to google play - runs-on: ubuntu-latest - timeout-minutes: 10 - environment: google-play - needs: [ build, unit-tests, instrumentation-tests ] - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 11 - - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} - - uses: actions/download-artifact@v2 - with: - name: prebuild.tar - - name: Extract build cache - run: tar -xf prebuild.tar - - name: Decrypt keys - env: - ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }} - SERVICES_ENCRYPT_KEY: ${{ secrets.SERVICES_ENCRYPT_KEY }} - run: | - gpg --yes --batch --passphrase=$SERVICES_ENCRYPT_KEY ./app/src/release/google-services.json.gpg - gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/key.p12.gpg - gpg --yes --batch --passphrase=$ENCRYPT_KEY ./app/upload-key.jks.gpg - - name: Upload apk to google play - env: - PLAY_KEY_ALIAS: ${{ secrets.PLAY_KEY_ALIAS }} - PLAY_KEY_PASSWORD: ${{ secrets.PLAY_KEY_PASSWORD }} - PLAY_SERVICE_ACCOUNT_EMAIL: ${{ secrets.PLAY_SERVICE_ACCOUNT_EMAIL }} - PLAY_STORE_PASSWORD: ${{ secrets.PLAY_STORE_PASSWORD }} - run: ./gradlew publishPlayRelease -PenableFirebase --stacktrace; diff --git a/.gitignore b/.gitignore index 5d3321e3..d3fb6e4e 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,6 @@ out/ # Gradle files .gradle/ build/ -.build-cache # Local configuration file (sdk path, etc) local.properties @@ -114,6 +113,3 @@ Thumbs.db !/gradle/wrapper/gradle-wrapper.jar .idea/jarRepositories.xml - - -app/src/release/agconnect-services.json diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 0ac66f64..d66c3361 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -4,23 +4,23 @@ - + + -