Skip to content

Commit

Permalink
Avoid reading the project version during gradle's configuration phase
Browse files Browse the repository at this point in the history
  • Loading branch information
saket committed Nov 13, 2024
1 parent 3077529 commit 85a803b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ class AndroidLibraryPublishingConventionPlugin : Plugin<Project> {

// Used on CI to prevent publishing of non-snapshot versions.
tasks.register("throwIfVersionIsNotSnapshot") {
val libraryVersion = properties["VERSION_NAME"] as String
check(libraryVersion.endsWith("SNAPSHOT")) {
"Project isn't using a snapshot version = $libraryVersion"
doLast {
val libraryVersion = properties["VERSION_NAME"] as String
check(libraryVersion.endsWith("SNAPSHOT")) {
"Project isn't using a snapshot version = $libraryVersion"
}
}
}

Expand Down

0 comments on commit 85a803b

Please sign in to comment.