Skip to content

Commit 04d0d5e

Browse files
committed
Use changelog to get dev version
1 parent 6f6d8bf commit 04d0d5e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,12 @@ plugins {
4444
}
4545

4646
var flutterPluginVersion = providers.gradleProperty("flutterPluginVersion").get()
47-
if (project.hasProperty("dev-version")) {
47+
if (project.hasProperty("dev")) {
48+
val latestVersion = changelog.getLatest().version
49+
val majorVersion = latestVersion.substringBefore('.').toInt()
50+
val nextMajorVersion = majorVersion + 1
4851
val datestamp = DateTimeFormatter.ofPattern("yyyyMMdd").format(LocalDate.now())
49-
flutterPluginVersion = project.property("dev-version").toString() + "-dev." + datestamp
52+
flutterPluginVersion = "$nextMajorVersion.0-dev.$datestamp"
5053
}
5154
val ideaVersion = providers.gradleProperty("ideaVersion").get()
5255
val dartPluginVersion = providers.gradleProperty("dartPluginVersion").get()

tool/kokoro/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ echo "kokoro test finished"
2020

2121
echo "kokoro build start"
2222

23-
./gradlew buildPlugin -Pdev-version=88.0
23+
./gradlew buildPlugin -Pdev
2424

2525
echo "kokoro build finished"
2626

0 commit comments

Comments
 (0)