Skip to content

Commit

Permalink
refactor(pub): Add a constant for the default Flutter version
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Nonnenmacher <[email protected]>
  • Loading branch information
mnonnenmacher committed Jun 7, 2024
1 parent 2ffb557 commit 53a7b8f
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 @@ -76,6 +76,7 @@ import org.ossreviewtoolkit.utils.ort.showStackTrace
import org.semver4j.RangesList
import org.semver4j.RangesListFactory

private const val DEFAULT_FLUTTER_VERSION = "3.19.3-stable"
private const val DEFAULT_GRADLE_VERSION = "7.3"
private const val PUBSPEC_YAML = "pubspec.yaml"
private const val PUB_LOCK_FILE = "pubspec.lock"
Expand Down Expand Up @@ -120,7 +121,7 @@ class Pub(
) = Pub(type, analysisRoot, analyzerConfig, repoConfig)
}

private val flutterVersion = options[OPTION_FLUTTER_VERSION] ?: Os.env["FLUTTER_VERSION"] ?: "3.19.3-stable"
private val flutterVersion = options[OPTION_FLUTTER_VERSION] ?: Os.env["FLUTTER_VERSION"] ?: DEFAULT_FLUTTER_VERSION
private val flutterInstallDir = ortToolsDirectory.resolve("flutter-$flutterVersion")

private val flutterHome by lazy {
Expand Down

0 comments on commit 53a7b8f

Please sign in to comment.