-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into chore/speed_up_the_build
# Conflicts: # gradle.properties
- Loading branch information
Showing
22 changed files
with
247 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Disables the use of the Gradle daemon, which is a background process for speeding up Gradle commands. | ||
# With this set to false, a new Gradle process will be started for each build. | ||
org.gradle.daemon=false | ||
|
||
# Enables the parallel execution of tasks that do not depend on each other. This can speed up the overall build process. | ||
org.gradle.parallel=true | ||
|
||
# Sets the maximum number of worker processes that Gradle can use for executing tasks (e.g., compilation). | ||
# Here, it is limited to 2 worker processes. | ||
org.gradle.workers.max=2 | ||
|
||
# Disables the incremental compilation feature of Kotlin. With incremental compilation, only the changed source files get recompiled. | ||
kotlin.incremental=false | ||
|
||
# Determines how the Kotlin compiler runs. 'in-process' means the compiler runs inside the Gradle process, not as a separate process. | ||
kotlin.compiler.execution.strategy=in-process | ||
|
||
# Controls whether warnings in Kotlin code should be treated as errors during the compilation process. | ||
# This setting is useful for CI environments where you might not want a build to fail just because of warnings. | ||
# Set to true if you want to treat warnings as errors in your local setup. | ||
warningsAsErrors=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
concurrency: | ||
group: build-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 90 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Copy CI gradle.properties | ||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Build all build type and flavor permutations | ||
run: ./gradlew assemble | ||
|
||
- name: Upload build outputs (APKs) | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: APKs | ||
path: '**/build/outputs/apk/**/*.apk' | ||
|
||
- name: Run local tests | ||
run: ./gradlew test | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
timeout-minutes: 60 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Copy CI gradle.properties | ||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
# Run local tests after screenshot tests to avoid wrong UP-TO-DATE. TODO: Ignore screenshots. | ||
- name: Run local tests | ||
if: always() | ||
run: ./gradlew test | ||
|
||
- name: Upload test results (XML) | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-results | ||
path: '**/build/test-results/test*UnitTest/**.xml' | ||
|
||
androidTest: | ||
needs: build | ||
runs-on: macOS-latest # enables hardware acceleration in the virtual machine | ||
timeout-minutes: 55 | ||
strategy: | ||
matrix: | ||
api-level: [26, 30] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Copy CI gradle.properties | ||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Build AndroidTest apps | ||
run: ./gradlew packageDebug packageDebugAndroidTest --daemon | ||
|
||
- name: Run instrumentation tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: ${{ matrix.api-level }} | ||
arch: x86_64 | ||
disable-animations: true | ||
disk-size: 6000M | ||
heap-size: 600M | ||
script: ./gradlew connectedDebugAndroidTest --daemon | ||
|
||
- name: Upload test reports | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-reports-${{ matrix.api-level }} | ||
path: '**/build/reports/androidTests' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="generic_hello">Hello</string> | ||
<string name="greeting_with_name">Hello, %s!</string> | ||
<string name="greeting_with_name_and_weather">Hello, %s! It\'s a %s day today.</string> | ||
<string name="generic_hello" translatable="false">Hello</string> | ||
<string name="greeting_with_name" translatable="false">Hello, %s!</string> | ||
<string name="greeting_with_name_and_weather" translatable="false">Hello, %1$s! It\'s a %2$s day today.</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.