GradleHelper class

Shared helpers for audits that need to parse the Android app-level build.gradle (Groovy or Kotlin DSL).

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

extractBlock(String content, String blockName) → String?
Extracts the content between the first top-level <blockName> { and its matching closing brace, tracking nested braces so unrelated {} pairs inside the block (conditionals, nested blocks) don't truncate the match early. Returns null if the block isn't found.
findAppBuildGradle(ProjectContext context) → File?
Returns the app-level build.gradle file, preferring the Groovy DSL (build.gradle) over the Kotlin DSL (build.gradle.kts) when both exist. Returns null if neither is present.