Skip to content

Commit

Permalink
Merge pull request #397 from LachlanMcKee/agp-8.2.2
Browse files Browse the repository at this point in the history
Updated to AGP 8.2.2
  • Loading branch information
LachlanMcKee authored Oct 1, 2024
2 parents 35e137c + eb4e810 commit 8d02459
Show file tree
Hide file tree
Showing 126 changed files with 387 additions and 2,585 deletions.
168 changes: 74 additions & 94 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,150 +9,130 @@ jobs:
name: Assemble
runs-on: ubuntu-latest
timeout-minutes: 25
env:
JAVA_TOOL_OPTIONS: -Xmx6g
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dkotlin.incremental=false -Dkotlin.compiler.execution.strategy=in-process
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/cache@v2
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: actions/setup-java@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Assemble
run: ./gradlew assemble
working-directory: .
- name: Cleanup Gradle Cache
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
detekt:
name: Detekt
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v1
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Detekt
run: ./gradlew detekt --stacktrace
working-directory: .
- name: Upload failure reports
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
path: '**/build/reports'

unit-tests:
name: Unit tests
runs-on: ubuntu-latest
timeout-minutes: 20
env:
JAVA_TOOL_OPTIONS: -Xmx4g
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dkotlin.incremental=false -Dkotlin.compiler.execution.strategy=in-process
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v1
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: actions/setup-java@v4
with:
java-version: 11
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Unit tests
run: ./gradlew testDebugUnitTest
working-directory: .
- name: Upload failure reports
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: unit-test-reports
path: '**/build/reports'
- name: Cleanup Gradle Cache
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties

instrumentation-tests:
runs-on: macOS-latest
timeout-minutes: 60
env:
JAVA_TOOL_OPTIONS: -Xmx4g
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2 -Dkotlin.incremental=false -Dkotlin.compiler.execution.strategy=in-process
strategy:
fail-fast: false
matrix:
api-level: [22,25,29]
name: Instrumentation tests [API=${{ matrix.api-level }}]
name: Instrumentation tests
runs-on: macos-13
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v1
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
- uses: actions/cache@v2
distribution: 'zulu'
java-version: '17'
- uses: gradle/wrapper-validation-action@v1
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Pre build sources before launching emulator
run: ./gradlew compileDebugAndroidTestSources
- name: AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
~/.android/avd/*
~/.android/adb*
key: avd-29-ribs
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
# Use API 29 https://github.com/ReactiveCircus/android-emulator-runner/issues/222
api-level: 29
arch: x86_64
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: x86
script: ./gradlew connectedCheck

- name: Upload failure reports
# Use API 29 https://github.com/ReactiveCircus/android-emulator-runner/issues/222
api-level: 29
arch: x86_64
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
adb logcat > logcat.out &
./gradlew connectedCheck
- name: Upload failed instrumentation artifacts
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: instrumentation-reports-api-${{ matrix.api-level }}
path: '**/build/reports'

- name: Cleanup Gradle Cache
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
name: instrumentation-failures
path: |
**/build/reports
logcat.out
verify-publication:
name: Verify publication
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/cache@v2
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: actions/setup-java@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Verify
run: ./gradlew publishToMavenLocal
working-directory: .
- name: Cleanup Gradle Cache
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
13 changes: 8 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

buildscript {
apply from: 'gradle/dependencies.gradle'

Expand All @@ -11,7 +14,6 @@ buildscript {
dependencies {
classpath deps.build.gradlePlugins.android
classpath deps.build.gradlePlugins.kotlin
classpath deps.build.gradlePlugins.mavenPublish
classpath deps.build.gradlePlugins.detekt
classpath deps.build.gradlePlugins.jacoco
}
Expand Down Expand Up @@ -40,13 +42,14 @@ subprojects {
maven { url "https://www.jitpack.io" }
}

configurations.all {
configurations.configureEach {
resolutionStrategy.eachDependency {
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.name
tasks.withType(KotlinCompile).configureEach {
compilerOptions {
jvmTarget = JvmTarget.JVM_11
freeCompilerArgs.add("-Xopt-in=com.badoo.ribs.annotation.ExperimentalApi")
}
}
}
Expand Down
1 change: 1 addition & 0 deletions detekt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ naming:
FunctionNaming:
active: true
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
ignoreAnnotated: [ 'Composable' ]
VariableNaming:
active: true
variablePattern: '^(_)?[a-z$][a-zA-Z$0-9]*$'
Expand Down
1 change: 0 additions & 1 deletion documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
- Demo apps
- [Tooling](extras/tooling.md)
- [Minimal reactive API](extras/minimal-reactive-api.md)
- Template plugin

## Experimental features

Expand Down
16 changes: 4 additions & 12 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,13 @@
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=512M
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
org.gradle.caching=true
org.gradle.parallel=true

GROUP=com.badoo.ribs
VERSION_NAME=0.40.2
POM_DESCRIPTION=Badoo RIBs is an evolution of Uber RIBs, with notable differences and additions
POM_URL=https://github.com/badoo/RIBs/
POM_SCM_URL=https://github.com/badoo/RIBs/
POM_SCM_CONNECTION=scm:git:git://github.com/badoo/RIBs.git
POM_SCM_DEV_CONNECTION=scm:git:ssh://[email protected]/badoo/RIBs.git
POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo
POM_DEVELOPER_ID=badoo
POM_DEVELOPER_NAME=Badoo Trading Limited

android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
14 changes: 1 addition & 13 deletions gradle/code-coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'jacoco'

jacoco {
toolVersion = deps.versions.jacoco
reportsDir = file("$buildDir/codeCoverageReports")
reportsDirectory = file("$buildDir/codeCoverageReports")
}

tasks.withType(Test) {
Expand Down Expand Up @@ -52,10 +52,6 @@ task debugCombinedCodeCoverageReport(type: JacocoReport, dependsOn: ['testDebugU
group = "Code coverage"
description = "Generate coverage reports that combine both Unit and UI tests for debug builds"

reports {
html.enabled = true
}

classDirectories.setFrom(files([javaClasses, kotlinClasses]))
sourceDirectories.setFrom(files([javaSourceDirectory, kotlinSourceDirectory]))
executionData(files([unitTestsData, androidTestsData]))
Expand All @@ -66,10 +62,6 @@ task debugUnitTestCodeCoverageReport(type: JacocoReport, dependsOn: ['testDebugU
group = "Code coverage"
description = "Generate coverage reports on Unit tests for debug builds"

reports {
html.enabled = true
}

classDirectories.setFrom(files([javaClasses, kotlinClasses]))
sourceDirectories.setFrom(files([javaSourceDirectory, kotlinSourceDirectory]))
executionData(files([unitTestsData]))
Expand All @@ -80,10 +72,6 @@ task debugUiTestCodeCoverageReport(type: JacocoReport, dependsOn: ['createDebugC
group = "Code coverage"
description = "Generate coverage reports on UI tests for debug builds"

reports {
html.enabled = true
}

classDirectories.setFrom(files([javaClasses, kotlinClasses]))
sourceDirectories.setFrom(files([javaSourceDirectory, kotlinSourceDirectory]))
executionData(files([androidTestsData]))
Expand Down
Loading

0 comments on commit 8d02459

Please sign in to comment.