Skip to content

Commit d8c8e04

Browse files
Merge branch 'trunk' into fix/eventbus_exception_invoking_subscriber_failed
2 parents 772e349 + 09ebdc1 commit d8c8e04

File tree

8 files changed

+48
-23
lines changed

8 files changed

+48
-23
lines changed

.buildkite/pipeline.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
common_params:
2-
# Common plugin settings to use with the `plugins` key.
3-
- &common_plugins
4-
- automattic/a8c-ci-toolkit#2.15.0
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
4+
agents:
5+
queue: "android"
56

67
steps:
78
- label: "Gradle Wrapper Validation"
89
command: |
910
validate_gradle_wrapper
10-
plugins: *common_plugins
11+
plugins: [$CI_TOOLKIT]
1112

1213
# Wait for Gradle Wrapper to be validated before running any other jobs
1314
- wait
1415

1516
- label: "Lint & Checkstyle"
1617
key: "lint_and_checkstyle"
17-
plugins: *common_plugins
18+
plugins: [$CI_TOOLKIT]
1819
command: |
1920
cp gradle.properties-example gradle.properties
2021
./gradlew lintRelease checkstyle
@@ -24,7 +25,7 @@ steps:
2425

2526
- label: "Test"
2627
key: "test"
27-
plugins: *common_plugins
28+
plugins: [$CI_TOOLKIT]
2829
command: |
2930
cp gradle.properties-example gradle.properties
3031
./gradlew testRelease
@@ -33,7 +34,7 @@ steps:
3334
depends_on:
3435
- "lint_and_checkstyle"
3536
- "test"
36-
plugins: *common_plugins
37+
plugins: [$CI_TOOLKIT]
3738
command: |
3839
cp gradle.properties-example gradle.properties
3940
./gradlew \
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
4+
agents:
5+
queue: "android"
6+
7+
steps:
8+
- label: "dependency analysis"
9+
command: |
10+
echo "--- 📊 Analyzing"
11+
cp gradle.properties-example gradle.properties
12+
./gradlew buildHealth
13+
plugins: [$CI_TOOLKIT]
14+
artifact_paths:
15+
- "build/reports/dependency-analysis/build-health-report.*"
16+
notify:
17+
- slack: "#android-core-notifs"
18+
if: build.state == "failed"

.buildkite/shared-pipeline-vars

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
# This file is `source`'d before calling `buildkite-agent pipeline upload`, and can be used
4+
# to set up some variables that will be interpolated in the `.yml` pipeline before uploading it.
5+
6+
export CI_TOOLKIT="automattic/a8c-ci-toolkit#3.4.2"

WordPressUtils/build.gradle

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ repositories {
1212

1313
dependencies {
1414
implementation "org.apache.commons:commons-text:$commonsTextVersion"
15-
implementation "com.android.volley:volley:$volleyVersion"
1615
implementation "com.google.android.material:material:$materialVersion"
1716
implementation "androidx.swiperefreshlayout:swiperefreshlayout:$androidxSwipeRefreshLayoutVersion"
1817
implementation "androidx.recyclerview:recyclerview:$androidxRecyclerViewVersion"
19-
implementation "org.greenrobot:eventbus:$eventBusVersion"
18+
implementation "org.greenrobot:eventbus-java:$eventBusVersion"
2019

21-
implementation "androidx.core:core-ktx:$androidxCoreVersion"
20+
implementation "androidx.core:core:$androidxCoreVersion"
2221

2322
testImplementation "junit:junit:$junitVersion"
2423
testImplementation "org.assertj:assertj-core:$assertjVersion"
@@ -28,8 +27,6 @@ dependencies {
2827
lintChecks "org.wordpress:lint:$wordpressLintVersion"
2928

3029
androidTestImplementation "androidx.test:runner:$androidxTestCoreVersion"
31-
androidTestImplementation "androidx.test:rules:$androidxTestCoreVersion"
32-
androidTestImplementation "androidx.test.ext:junit:$jUnitExtVersion"
3330
}
3431

3532
android {

WordPressUtils/src/main/java/org/wordpress/android/util/AppLog.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,18 +205,18 @@ public static void e(T tag, Throwable tr) {
205205
* Sends a ERROR log message
206206
* @param tag Used to identify the source of a log message. It usually identifies the class or activity where the
207207
* log call occurs.
208-
* @param volleyErrorMsg
208+
* @param errorMsg
209209
* @param statusCode
210210
*/
211-
public static void e(T tag, String volleyErrorMsg, int statusCode) {
212-
if (TextUtils.isEmpty(volleyErrorMsg)) {
211+
public static void e(T tag, String errorMsg, int statusCode) {
212+
if (TextUtils.isEmpty(errorMsg)) {
213213
return;
214214
}
215215
String logText;
216216
if (statusCode == -1) {
217-
logText = volleyErrorMsg;
217+
logText = errorMsg;
218218
} else {
219-
logText = volleyErrorMsg + ", status " + statusCode;
219+
logText = errorMsg + ", status " + statusCode;
220220
}
221221
Log.e(TAG + "-" + tag.toString(), logText);
222222
addEntry(tag, LogLevel.w, logText);

build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
33
plugins {
44
id "com.android.library" apply false
55
id "org.jetbrains.kotlin.android" apply false
6+
id "com.autonomousapps.dependency-analysis"
67
}
78

89
allprojects {
@@ -22,6 +23,7 @@ allprojects {
2223
}
2324
tasks.withType(KotlinCompile).all {
2425
kotlinOptions {
26+
jvmTarget = JavaVersion.VERSION_1_8
2527
allWarningsAsErrors = true
2628
}
2729
}
@@ -44,14 +46,10 @@ ext {
4446
commonsTextVersion = '1.10.0'
4547
eventBusVersion = '3.3.1'
4648
materialVersion = '1.2.1'
47-
volleyVersion = '1.2.0'
4849

4950
// test
5051
androidxTestCoreVersion = '1.4.0'
5152
assertjVersion = '3.11.1'
5253
junitVersion = '4.12'
5354
robolectricVersion = '4.9'
54-
55-
// android test
56-
jUnitExtVersion = '1.1.3'
5755
}

gradle.properties-example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ android.useAndroidX=true
44
android.enableJetifier=false
55

66
android.nonTransitiveRClass=true
7+
8+
# Dependency Analysis Plugin
9+
dependency.analysis.android.ignored.variants=release

settings.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
pluginManagement {
2-
gradle.ext.kotlinVersion = '1.6.10'
2+
gradle.ext.kotlinVersion = '1.9.24'
33
gradle.ext.agpVersion = '8.1.0'
44
gradle.ext.automatticPublishToS3Version = '0.9.0'
5+
gradle.ext.dependencyAnalysisVersion = '1.33.0'
56

67
plugins {
78
id "org.jetbrains.kotlin.android" version gradle.ext.kotlinVersion
89
id "com.android.library" version gradle.ext.agpVersion
910
id "com.automattic.android.publish-to-s3" version gradle.ext.automatticPublishToS3Version
11+
id "com.autonomousapps.dependency-analysis" version gradle.ext.dependencyAnalysisVersion
1012
}
1113
repositories {
1214
maven {

0 commit comments

Comments
 (0)