Skip to content

Commit a8ae5e0

Browse files
authored
Read bin/cache/flutter.version.json instead of version for flutter_gallery (flutter#173797)
Towards flutter#171900.
1 parent d1e2019 commit a8ae5e0

File tree

1 file changed

+4
-1
lines changed
  • dev/integration_tests/flutter_gallery/android/app

1 file changed

+4
-1
lines changed

dev/integration_tests/flutter_gallery/android/app/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ if (flutterRoot == null) {
2121
}
2222

2323
// The Gallery app's version is defined by the Flutter framework's version.
24-
def flutterVersion = file("$flutterRoot/version").text
24+
def flutterVersionFile = file("$flutterRoot/bin/cache/flutter.version.json")
25+
def flutterVersionJson = new groovy.json.JsonSlurper().parse(flutterVersionFile)
26+
def flutterVersion = flutterVersionJson.frameworkVersion
2527
def flutterVersionComponents = flutterVersion.split(/[^0-9]+/)
28+
2629
// Let the integer version code of xx.yy.zz-pre.nnn be xxyyzznnn.
2730
int flutterVersionNumber = Math.min(flutterVersionComponents[0].toInteger(), 20) * 100000000
2831
flutterVersionNumber += Math.min(flutterVersionComponents[1].toInteger(), 99) * 1000000

0 commit comments

Comments
 (0)