Skip to content

Commit 5063601

Browse files
authored
Merge pull request #148 from wordpress-mobile/build/dependency-analysis-android-gradle-plugin
[Dependency Analysis] Add Android Gradle Plugin
2 parents ba2227b + 7cdd059 commit 5063601

File tree

4 files changed

+29
-0
lines changed

4 files changed

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

build.gradle

Lines changed: 1 addition & 0 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 {

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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ pluginManagement {
22
gradle.ext.kotlinVersion = '1.9.22'
33
gradle.ext.agpVersion = '8.1.0'
44
gradle.ext.automatticPublishToS3Version = '0.9.0'
5+
gradle.ext.dependencyAnalysisVersion = '1.28.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)