Skip to content

Commit 4b103d5

Browse files
authored
Merge pull request #1084 from wordpress-mobile/build/dependency-analysis-android-gradle-plugin
[Dependency Analysis] Add Android Gradle Plugin
2 parents 9cd15d3 + ff060e7 commit 4b103d5

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
4+
# Nodes with values to reuse in the pipeline.
5+
common_params:
6+
# Common plugin settings to use with the `plugins` key.
7+
- &common_plugins
8+
- automattic/a8c-ci-toolkit#2.14.0
9+
10+
# Run everything on the `android` queue
11+
agents:
12+
queue: android
13+
14+
steps:
15+
- label: "dependency analysis"
16+
command: |
17+
echo "--- 📊 Analyzing"
18+
./gradlew buildHealth
19+
plugins: *common_plugins
20+
artifact_paths:
21+
- "build/reports/dependency-analysis/build-health-report.*"
22+
notify:
23+
- slack: "#android-core-notifs"
24+
if: build.state == "failed"

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ plugins {
1313
id "com.android.application" apply false
1414
id "org.jetbrains.kotlin.android" apply false
1515
id "com.automattic.android.publish-to-s3" apply false
16+
id "com.autonomousapps.dependency-analysis"
1617
}
1718

1819
allprojects {

gradle.properties

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

2424
android.nonTransitiveRClass=true
25+
26+
# Dependency Analysis Plugin
27+
dependency.analysis.android.ignored.variants=release

settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ pluginManagement {
22
gradle.ext.kotlinVersion = '1.9.24'
33
gradle.ext.agpVersion = '8.1.0'
44
gradle.ext.automatticPublishToS3Version = '0.8.0'
5+
gradle.ext.dependencyAnalysisVersion = '1.28.0'
56

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

0 commit comments

Comments
 (0)