Skip to content

Commit

Permalink
fix(pub): Use the correct option for the Gradle version
Browse files Browse the repository at this point in the history
Align the code with the documentation to use "gradleVersion" instead of
"Gradle" as the name of the option to configure the Gradle version.

Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.com>
  • Loading branch information
mnonnenmacher committed Jun 7, 2024
1 parent f2ced6d commit 1ba253a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/package-managers/pub/src/main/kotlin/Pub.kt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class Pub(
repoConfig: RepositoryConfiguration
) : PackageManager(name, analysisRoot, analyzerConfig, repoConfig), CommandLineTool {
companion object {
const val OPTION_GRADLE_VERSION = "gradleVersion"
const val OPTION_PUB_DEPENDENCIES_ONLY = "pubDependenciesOnly"
}

Expand Down Expand Up @@ -439,7 +440,7 @@ class Pub(
if (gradleFactory == null || !definitionFile.isFile) return emptyList()

return analyzerResultCacheAndroid.getOrPut(packageName) {
val pubGradleVersion = options[gradleFactory.type] ?: GRADLE_VERSION
val pubGradleVersion = options[OPTION_GRADLE_VERSION] ?: GRADLE_VERSION

logger.info {
"Analyzing Android dependencies for package '$packageName' using Gradle version $pubGradleVersion."
Expand Down

0 comments on commit 1ba253a

Please sign in to comment.