Let Travis build the gallery and push to TestFlight / Play Store (#14408)
* iOS works * Works on Android * Take in commit number in iOS also. Get rid of image upload for Android. It's just a waste of bandwidth * Tweak to fix on Travis
This commit is contained in:
@@ -11,6 +11,14 @@ if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersion = file("$flutterRoot/version").text
|
||||
def flutterVersionComponents = flutterVersion.split(/[^0-9]+/)
|
||||
// Let the integer version code of xx.yy.zz-pre.nnn be xxyyzznnn.
|
||||
int flutterVersionCode = Math.min(flutterVersionComponents[0].toInteger(), 20) * 100000000
|
||||
flutterVersionCode += Math.min(flutterVersionComponents[1].toInteger(), 99) * 1000000
|
||||
flutterVersionCode += Math.min(flutterVersionComponents[2].toInteger(), 999) * 1000
|
||||
flutterVersionCode += Math.min(flutterVersionComponents[3]?.toInteger() ?: 0, 999)
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
@@ -25,8 +33,9 @@ android {
|
||||
applicationId "io.flutter.demo.gallery"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 27
|
||||
versionCode 1
|
||||
versionName "0.0.1"
|
||||
// The Gallery app's version is defined by the Flutter framework's version.
|
||||
versionCode flutterVersionCode
|
||||
versionName "$flutterVersion"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
||||
@@ -7,13 +7,14 @@ default_platform(:android)
|
||||
# flutter build apk --release
|
||||
# to build the app using the Flutter toolchain.
|
||||
platform :android do
|
||||
desc 'Push the built release APK to alpha'
|
||||
lane :deploy_play_store_alpha do
|
||||
desc 'Push the built release APK to alpha or beta depending on current branch'
|
||||
lane :deploy_play_store do
|
||||
upload_to_play_store(
|
||||
track: 'alpha',
|
||||
track: ENV['TRAVIS_BRANCH'] == 'beta' ? 'beta' : 'alpha',
|
||||
apk: '../build/app/outputs/apk/release/app-release.apk',
|
||||
json_key_data: ENV['GOOGLE_DEVELOPER_SERVICE_ACCOUNT_ACTOR_FASTLANE'],
|
||||
skip_upload_screenshots: true
|
||||
skip_upload_screenshots: true,
|
||||
skip_upload_images: true
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.3 KiB |
Reference in New Issue
Block a user