Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dependency Analysis] Add Android Gradle Plugin #148

Merged
merged 5 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .buildkite/schedules/dependency-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
---

common_params:
# Common plugin settings to use with the `plugins` key.
- &common_plugins
- automattic/a8c-ci-toolkit#2.15.0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the newest version?

Suggested change
- automattic/a8c-ci-toolkit#2.15.0
- automattic/a8c-ci-toolkit#3.4.2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to do that @wzieba but I really don't want to make a change that can potentially block this PR (ie. failing CI, etc), me not knowing exactly what the diff between the 2 version are. 🤷

Can I maybe do that on a separate PR next week, and do that for all these 6 libraries I have been (Login, Media Picker) and will be touching next week (Aztec, About, Tracks)? 🙏

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What works best for you - the only breaking difference is related nvm installation, but if you prefer to do this in a separate PR, it's ok to me too 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, great, I've noted this down and will create separate PRs for each library I have been or will be touching next week. 🗒️

the only breaking difference is related nvm installation

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @wzieba that this is now done: #150


agents:
queue: "android"

steps:
- label: "dependency analysis"
command: |
echo "--- 📊 Analyzing"
cp gradle.properties-example gradle.properties
./gradlew buildHealth
plugins: *common_plugins
artifact_paths:
- "build/reports/dependency-analysis/build-health-report.*"
notify:
- slack: "#android-core-notifs"
if: build.state == "failed"
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id "com.android.library" apply false
id "org.jetbrains.kotlin.android" apply false
id "com.autonomousapps.dependency-analysis"
}

allprojects {
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties-example
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ android.useAndroidX=true
android.enableJetifier=false

android.nonTransitiveRClass=true

# Dependency Analysis Plugin
dependency.analysis.android.ignored.variants=release
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ pluginManagement {
gradle.ext.kotlinVersion = '1.9.22'
gradle.ext.agpVersion = '8.1.0'
gradle.ext.automatticPublishToS3Version = '0.9.0'
gradle.ext.dependencyAnalysisVersion = '1.28.0'

plugins {
id "org.jetbrains.kotlin.android" version gradle.ext.kotlinVersion
id "com.android.library" version gradle.ext.agpVersion
id "com.automattic.android.publish-to-s3" version gradle.ext.automatticPublishToS3Version
id "com.autonomousapps.dependency-analysis" version gradle.ext.dependencyAnalysisVersion
}
repositories {
maven {
Expand Down
Loading