Skip to content

extra scopes inside .kts dependencies blocks break parsing #204

Closed

Description

@RBusarow

Given this dependencies block in build.gradle.kts:

dependencies {
 
  implementation("com.foo:bar:1.2.3") {
    exclude(group = "androidx.appcompat")
  } 

  implementation(project(path = ":something:unused"))
}

If :something:unused is unused, ModuleCheck will report it as unused but will be unable to auto-fix. ModuleCheck can't find the declaration in the dependencies { ... } block. If the :something:unused dependency is above com.foo:bar's configuration block, then it's parsed without issue.

I haven't dug around yet, but either the KotlinDependencyBlockParser is escaping out early because it sees another block statement, or the DependenciesBlock is failing to match the statements correctly.

Activity

  1. added
    bug
    on Oct 10, 2021
  2. added 2 commits that reference this issue on Oct 10, 2021
    fff9882
    72c1399
  3. added a commit that references this issue on Oct 11, 2021
    4b7abb5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions