Skip to content

Commit

Permalink
Merge pull request #8860 from element-hq/feature/bma/sdk34
Browse files Browse the repository at this point in the history
Bump compile and target SDK to 34
  • Loading branch information
bmarty authored Jul 17, 2024
2 parents b0158f1 + cf464af commit 96e05ba
Show file tree
Hide file tree
Showing 716 changed files with 4,883 additions and 4,300 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@ jobs:
group: ${{ github.ref == 'refs/heads/develop' && format('integration-tests-develop-{0}-{1}', matrix.target, github.sha) || format('build-debug-{0}-{1}', matrix.target, github.ref) }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# https://github.com/actions/checkout/issues/881
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- name: Use JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Configure gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
- name: Assemble ${{ matrix.target }} debug apk
Expand All @@ -48,12 +53,17 @@ jobs:
group: ${{ github.ref == 'refs/head/main' && format('build-release-apk-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('build-release-apk-develop-{0}', github.sha) || format('build-debug-{0}', github.ref) }}
cancel-in-progress: ${{ github.ref != 'refs/head/main' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# https://github.com/actions/checkout/issues/881
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }}
- name: Use JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Configure gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
- name: Assemble GPlay unsigned apk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/danger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
name: Danger
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
npm install --save-dev @babel/plugin-transform-flow-strip-types
- name: Danger
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build docs
run: ./gradlew dokkaHtml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ jobs:
runs-on: ubuntu-latest
# No concurrency required, this is a prerequisite to other actions and should run every time.
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1
9 changes: 7 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ jobs:
name: Build and publish nightly Gplay APK to Firebase
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Use JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Configure gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
- name: Install towncrier
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/post-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,18 @@ jobs:
api-level: [ 28 ]
# No concurrency required, runs every time on a schedule.
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- uses: actions/setup-java@v3
- name: Use JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Configure gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
- name: Start synapse server
Expand Down
37 changes: 32 additions & 5 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:

# Enrich gradle.properties for CI/CD
env:
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -XX:MaxPermSize=512m -Dkotlin.daemon.jvm.options="-Xmx2g" -Dkotlin.incremental=false
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:MaxMetaspaceSize=1g" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon

jobs:
check:
name: Project Check Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run code quality check suite
run: ./tools/check/check_code_quality.sh

Expand All @@ -24,7 +24,16 @@ jobs:
name: Knit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Configure gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
- name: Run knit
run: |
./gradlew knitCheck $CI_GRADLE_ARG_PROPERTIES
Expand All @@ -38,7 +47,16 @@ jobs:
group: ${{ github.ref == 'refs/heads/main' && format('lint-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('lint-develop-{0}', github.sha) || format('lint-{0}', github.ref) }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Configure gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
- name: Run ktlint
run: |
./gradlew ktlintCheck $CI_GRADLE_ARG_PROPERTIES --continue
Expand Down Expand Up @@ -83,7 +101,16 @@ jobs:
group: ${{ github.ref == 'refs/heads/main' && format('dep-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('dep-develop-{0}', github.sha) || format('dep-{0}', github.ref) }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Configure gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
- name: Dependency analysis
run: ./gradlew dependencyCheckAnalyze $CI_GRADLE_ARG_PROPERTIES
- name: Upload dependency analysis
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sync-from-external-sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'element-hq/element-android'
# No concurrency required, runs every time on a schedule.
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
Expand All @@ -39,7 +39,7 @@ jobs:
if: github.repository == 'element-hq/element-android'
# No concurrency required, runs every time on a schedule.
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ jobs:
group: ${{ github.ref == 'refs/heads/main' && format('unit-tests-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('unit-tests-develop-{0}', github.sha) || format('unit-tests-{0}', github.ref) }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
- uses: actions/setup-java@v3
- name: Use JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- uses: gradle/gradle-build-action@v2
- name: Configure gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
gradle-home-cache-cleanup: ${{ github.ref == 'refs/heads/develop' }}
Expand Down Expand Up @@ -136,13 +138,14 @@ jobs:
# group: ${{ github.ref == 'refs/heads/main' && format('unit-tests-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('unit-tests-develop-{0}', github.sha) || format('build-android-tests-{0}', github.ref) }}
# cancel-in-progress: true
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-java@v3
# - uses: actions/checkout@v4
# - name: Use JDK 17
# uses: actions/setup-java@v4
# with:
# distribution: 'adopt'
# java-version: 11
# distribution: 'temurin' # See 'Supported distributions' for available options
# java-version: '17'
# - name: Configure gradle
# uses: gradle/gradle-build-action@v2
# uses: gradle/actions/setup-gradle@v3
# with:
# cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
# - name: Build Android Tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-gradle-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Update Gradle Wrapper
uses: gradle-update/update-gradle-wrapper-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-lfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
name: Validate
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
lfs: 'true'

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ buildscript {
classpath 'com.google.gms:google-services:4.3.15'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.0.0.2929'
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.6'
classpath "com.likethesalad.android:stem-plugin:2.4.1"
classpath "com.likethesalad.android:stem-plugin:2.9.0"
classpath 'org.owasp:dependency-check-gradle:8.2.1'
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.8.10"
classpath "org.jetbrains.kotlinx:kotlinx-knit:0.4.0"
Expand All @@ -45,7 +45,7 @@ plugins {
// Detekt
id "io.gitlab.arturbosch.detekt" version "1.22.0"
// Ksp
id "com.google.devtools.ksp" version "1.8.10-1.0.9"
id "com.google.devtools.ksp" version "1.9.24-1.0.20"

// Dependency Analysis
id 'com.autonomousapps.dependency-analysis' version "1.20.0"
Expand Down
6 changes: 3 additions & 3 deletions coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def initializeReport(report, projects, classExcludes) {
)
}
report.reports {
xml.enabled true
html.enabled true
csv.enabled false
xml.required = true
html.required = true
csv.required = false
}

gradle.projectsEvaluated {
Expand Down
54 changes: 27 additions & 27 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
ext.versions = [
'minSdk' : 21,
'compileSdk' : 33,
'targetSdk' : 33,
'sourceCompat' : JavaVersion.VERSION_11,
'targetCompat' : JavaVersion.VERSION_11,
'compileSdk' : 34,
'targetSdk' : 34,
'sourceCompat' : JavaVersion.VERSION_17,
'targetCompat' : JavaVersion.VERSION_17,
'jvmTarget' : "17",
]

def gradle = "7.4.2"
def gradle = "8.4.2"
// Ref: https://kotlinlang.org/releases.html
def kotlin = "1.8.10"
def kotlinCoroutines = "1.6.4"
def dagger = "2.45"
def firebaseBom = "32.0.0"
def kotlin = "1.9.24"
def kotlinCoroutines = "1.8.1"
def dagger = "2.51.1"
def firebaseBom = "33.1.1"
def appDistribution = "16.0.0-beta08"
def retrofit = "2.9.0"
def retrofit = "2.11.0"
def markwon = "4.6.2"
def moshi = "1.14.0"
def lifecycle = "2.5.1"
def moshi = "1.15.1"
def lifecycle = "2.8.3"
def flowBinding = "1.2.0"
def flipper = "0.190.0"
def epoxy = "5.0.0"
def mavericks = "3.0.7"
def glide = "4.15.1"
def mavericks = "3.0.9"
def glide = "4.16.0"
def bigImageViewer = "1.8.1"
def jjwt = "0.11.5"
def vanniktechEmoji = "0.16.0"
def sentry = "6.18.1"
// Use 1.6.0 alpha to fix issue with test
def fragment = "1.6.0-beta01"
def fragment = "1.8.1"
// Testing
def mockk = "1.12.3" // We need to use 1.12.3 to have mocking in androidTest until a new version is released: https://github.com/mockk/mockk/issues/819
def espresso = "3.5.1"
def androidxTest = "1.5.0"
def androidxOrchestrator = "1.4.2"
def paparazzi = "1.2.0"
def mockk = "1.13.11"
def espresso = "3.6.1"
def androidxTest = "1.6.1"
def androidxOrchestrator = "1.5.0"
def paparazzi = "1.3.4"

ext.libs = [
gradle : [
Expand All @@ -47,8 +47,8 @@ ext.libs = [
'coroutinesTest' : "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinCoroutines"
],
androidx : [
'activity' : "androidx.activity:activity-ktx:1.7.2",
'appCompat' : "androidx.appcompat:appcompat:1.6.1",
'activity' : "androidx.activity:activity-ktx:1.9.0",
'appCompat' : "androidx.appcompat:appcompat:1.7.0",
'biometric' : "androidx.biometric:biometric:1.1.0",
'core' : "androidx.core:core-ktx:1.10.1",
'recyclerview' : "androidx.recyclerview:recyclerview:1.3.0",
Expand Down Expand Up @@ -76,11 +76,11 @@ ext.libs = [
'espressoCore' : "androidx.test.espresso:espresso-core:$espresso",
'espressoContrib' : "androidx.test.espresso:espresso-contrib:$espresso",
'espressoIntents' : "androidx.test.espresso:espresso-intents:$espresso",
'viewpager2' : "androidx.viewpager2:viewpager2:1.0.0",
'transition' : "androidx.transition:transition:1.4.1",
'viewpager2' : "androidx.viewpager2:viewpager2:1.1.0",
'transition' : "androidx.transition:transition:1.5.0",
],
google : [
'material' : "com.google.android.material:material:1.9.0",
'material' : "com.google.android.material:material:1.12.0",
'firebaseBom' : "com.google.firebase:firebase-bom:$firebaseBom",
'messaging' : "com.google.firebase:firebase-messaging",
'appdistributionApi' : "com.google.firebase:firebase-appdistribution-api-ktx:$appDistribution",
Expand Down Expand Up @@ -172,7 +172,7 @@ ext.libs = [
'kluent' : "org.amshove.kluent:kluent-android:1.73",
'timberJunitRule' : "net.lachlanmckee:timber-junit-rule:1.0.1",
'junit' : "junit:junit:4.13.2",
'robolectric' : "org.robolectric:robolectric:4.9",
'robolectric' : "org.robolectric:robolectric:4.13",
]
]

Expand Down
Loading

0 comments on commit 96e05ba

Please sign in to comment.