From 55e213f775f0284b4203fd94bc768b4d138912b6 Mon Sep 17 00:00:00 2001 From: Mugunthan <87799495+Micoder-dev@users.noreply.github.com> Date: Wed, 20 Jul 2022 21:32:02 -0700 Subject: [PATCH 1/6] Create BuildTest.yml --- .github/workflows/BuildTest.yml | 110 ++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 .github/workflows/BuildTest.yml diff --git a/.github/workflows/BuildTest.yml b/.github/workflows/BuildTest.yml new file mode 100644 index 0000000..a548666 --- /dev/null +++ b/.github/workflows/BuildTest.yml @@ -0,0 +1,110 @@ +name: Build and Test + +on: + + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + + workflow_dispatch: + +jobs: + + local_test_job: + name: Running Local Tests + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Print Java version + run: javac -version + - name: Change wrapper permissions + run: chmod +x ./gradlew + - name: Restore Cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Run Debug Tests + run: ./gradlew testDebugUnitTest --continue + - name: Upload Test Reports + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: test-reports + path: 'app/build/reports/tests/' + + android_test_job: + name: Android Tests + runs-on: macos-latest + continue-on-error: true + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Print Java version + run: javac -version + - name: Change wrapper permissions + run: chmod +x ./gradlew + - name: Restore Cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Instrumentation Tests + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 29 + script: ./gradlew connectedAndroidTest + + - name: Upload Android Test Reports + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: android-test-reports + path: 'app/build/reports/androidTests/' + + build_job: + name: Building the APK + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Restore Cache + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Change wrapper permissions + run: chmod +x ./gradlew + - name: Assemble Debug + run: ./gradlew assembleDebug + + - name: Upload APK + uses: actions/upload-artifact@v2 + with: + name: apk + path: app/build/outputs/apk/debug/**.apk From a1cb4234259616f2b94b0d9a8c8d84f09aa22a8a Mon Sep 17 00:00:00 2001 From: Micoder-dev Date: Thu, 21 Jul 2022 20:17:12 +0530 Subject: [PATCH 2/6] Gradle versions updated & now the project can be build with latest android studio Chipmunk | 2021.2.1 --- build.gradle | 5 ++++- gradle/wrapper/gradle-wrapper.properties | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 5f06e06..09bc8aa 100644 --- a/build.gradle +++ b/build.gradle @@ -3,9 +3,11 @@ buildscript { repositories { jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.3' + //classpath 'com.android.tools.build:gradle:2.3.3' + classpath 'com.android.tools.build:gradle:4.2.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -21,6 +23,7 @@ allprojects { maven { url "https://maven.google.com" } + google() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a220298..8f45486 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Mar 27 20:25:57 CST 2017 +#Thu Jul 21 20:07:04 IST 2022 distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +zipStoreBase=GRADLE_USER_HOME From 9ff90126f26d9fb1b0ea08b1e944753d593caba7 Mon Sep 17 00:00:00 2001 From: Mugunthan <87799495+Micoder-dev@users.noreply.github.com> Date: Thu, 21 Jul 2022 07:54:57 -0700 Subject: [PATCH 3/6] Update BuildTest.yml --- .github/workflows/BuildTest.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/BuildTest.yml b/.github/workflows/BuildTest.yml index a548666..39f5821 100644 --- a/.github/workflows/BuildTest.yml +++ b/.github/workflows/BuildTest.yml @@ -100,6 +100,14 @@ jobs: ${{ runner.os }}-gradle- - name: Change wrapper permissions run: chmod +x ./gradlew + + + - name: Touch local properties + run: touch local.properties + - name: Add Api Key + run: echo "apiKey=\"\"" >> local.properties + + - name: Assemble Debug run: ./gradlew assembleDebug From 377402390a527137c57571a9804ffafedc4b0c0e Mon Sep 17 00:00:00 2001 From: Mugunthan <87799495+Micoder-dev@users.noreply.github.com> Date: Thu, 21 Jul 2022 08:00:17 -0700 Subject: [PATCH 4/6] Update BuildTest.yml --- .github/workflows/BuildTest.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/BuildTest.yml b/.github/workflows/BuildTest.yml index 39f5821..eced2bf 100644 --- a/.github/workflows/BuildTest.yml +++ b/.github/workflows/BuildTest.yml @@ -35,6 +35,13 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} restore-keys: | ${{ runner.os }}-gradle- + + + - name: Touch local properties + run: touch local.properties + - name: Add Api Key + run: echo "apiKey=\"\"" >> local.properties + - name: Run Debug Tests run: ./gradlew testDebugUnitTest --continue @@ -69,11 +76,20 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} restore-keys: | ${{ runner.os }}-gradle- + + + - name: Touch local properties + run: touch local.properties + - name: Add Api Key + run: echo "apiKey=\"\"" >> local.properties + + - name: Instrumentation Tests uses: reactivecircus/android-emulator-runner@v2 with: api-level: 29 script: ./gradlew connectedAndroidTest + - name: Upload Android Test Reports if: ${{ always() }} From c010c95296a54c6d8b0d178642ec591f1dbf0839 Mon Sep 17 00:00:00 2001 From: Mugunthan <87799495+Micoder-dev@users.noreply.github.com> Date: Thu, 21 Jul 2022 08:09:11 -0700 Subject: [PATCH 5/6] Update BuildTest.yml --- .github/workflows/BuildTest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BuildTest.yml b/.github/workflows/BuildTest.yml index eced2bf..d895562 100644 --- a/.github/workflows/BuildTest.yml +++ b/.github/workflows/BuildTest.yml @@ -130,5 +130,5 @@ jobs: - name: Upload APK uses: actions/upload-artifact@v2 with: - name: apk + name: BoomMenu path: app/build/outputs/apk/debug/**.apk From 8c971d12d423100a089fbd83e144d3fed18b6f54 Mon Sep 17 00:00:00 2001 From: Mugunthan <87799495+Micoder-dev@users.noreply.github.com> Date: Thu, 21 Jul 2022 08:09:45 -0700 Subject: [PATCH 6/6] Update BuildTest.yml --- .github/workflows/BuildTest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BuildTest.yml b/.github/workflows/BuildTest.yml index d895562..cfffed0 100644 --- a/.github/workflows/BuildTest.yml +++ b/.github/workflows/BuildTest.yml @@ -130,5 +130,5 @@ jobs: - name: Upload APK uses: actions/upload-artifact@v2 with: - name: BoomMenu + name: BoomMenuAPK path: app/build/outputs/apk/debug/**.apk