From 2c5cdf3b541a885425e271db54120ecab09cc1dc Mon Sep 17 00:00:00 2001 From: Tom Tresansky Date: Thu, 17 Oct 2024 09:24:13 -0400 Subject: [PATCH] Add support for linting confs added by AGP --- .../experimental/android/AbstractAndroidSoftwarePlugin.java | 2 ++ .../api/experimental/android/AndroidSoftwareDependencies.java | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/AbstractAndroidSoftwarePlugin.java b/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/AbstractAndroidSoftwarePlugin.java index 62d43cec..b79f159d 100644 --- a/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/AbstractAndroidSoftwarePlugin.java +++ b/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/AbstractAndroidSoftwarePlugin.java @@ -80,6 +80,8 @@ protected void linkCommonDependencies(AndroidSoftwareDependencies dependencies, configurations.getByName("implementation").fromDependencyCollector(dependencies.getImplementation()); configurations.getByName("compileOnly").fromDependencyCollector(dependencies.getCompileOnly()); configurations.getByName("runtimeOnly").fromDependencyCollector(dependencies.getRuntimeOnly()); + configurations.getByName("lintChecks").fromDependencyCollector(dependencies.getLintChecks()); + configurations.getByName("lintPublish").fromDependencyCollector(dependencies.getLintPublish()); } /** diff --git a/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/AndroidSoftwareDependencies.java b/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/AndroidSoftwareDependencies.java index b633ba5c..65d2c2f5 100644 --- a/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/AndroidSoftwareDependencies.java +++ b/unified-prototype/unified-plugin/plugin-android/src/main/java/org/gradle/api/experimental/android/AndroidSoftwareDependencies.java @@ -8,4 +8,8 @@ public interface AndroidSoftwareDependencies extends Dependencies { DependencyCollector getImplementation(); DependencyCollector getRuntimeOnly(); DependencyCollector getCompileOnly(); + + // Added by Android Gradle Plugin https://googlesamples.github.io/android-custom-lint-rules/api-guide/publishing.md.html + DependencyCollector getLintChecks(); + DependencyCollector getLintPublish(); }