autonomousapps / autonomousapps/gradle-best-practices-plugin

Extend usages to any project

Open
#12 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
Kotlin
Stars
197
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Hi, I was trying to figure out https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/issues/630 with this plugin, but I noticed that this plugin starts with:

pluginManager.withPlugin("java-gradle-plugin") {

which means I can't just apply it to my project to scan all build.gradle/build.gradle.kts files too.

Would it be possible to extend the scanning to those files? It's great for authoring plugins, but for discovering issues in potentially huge projects, where multiple third party plugins are applied (which don't use this plugin), it cannot be used :(

I ended up applying to includeBuild("gradle/plugins") as a fallback, at least that covers the majority of the Gradle scripts. I have a feeling this should be called out in the README.md too.

Also in a similar vein it would be nice to be able to analyze all the buildEnvironment for these. It only recognized usages in my own .class files, but I suspect there are others from third party plugins too that I'm not knowing about.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the pluginManager.withPlugin("java-gradle-plugin") entry point and review how scanning is limited to plugin projects. Compare that behavior with the requested build.gradle/build.gradle.kts and third-party buildEnvironment coverage, then inspect README.md for the current documented scope. Done means the requested project-wide usage is supported or its scope is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.