Skip to content

Commit

Permalink
chore: Android fastlane setup (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan20 authored Jun 21, 2023
1 parent 0daa4a8 commit 22ee853
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ app.*.map.json

# FVM
.fvm/flutter_sdk

build/
5 changes: 5 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ GeneratedPluginRegistrant.java
key.properties
**/*.keystore
**/*.jks

fastlane/report.xml
fastlane/Appfile
fastlane/service_account.json
fastlane/README.md
17 changes: 14 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,23 @@ android {
versionName flutterVersionName
}

buildTypes {
signingConfigs {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
storeFile file('../fastlane/rhntnj-keystore.jks')
keyAlias 'fluttercon'
keyPassword project.findProperty('fluttercon-key-password') ?: ''
storePassword project.findProperty('keystore-password') ?: ''
}
}

buildTypes {
debug {
signingConfig signingConfigs.debug
}

release {
signingConfig signingConfigs.release
}
}
}

Expand Down
34 changes: 34 additions & 0 deletions android/fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
default_platform(:android)

APP_ID_PRODUCTION = "com.rohantaneja.fluttercon"

platform :android do

private_lane :cleanup do
sh "fvm flutter clean"
sh "fvm flutter packages get"
end

desc "Build App"
private_lane :build_app do
cleanup
gradle(task: "clean", print_command: true)
gradle(
task: "bundle",
build_type: "Release",
print_command: true
)
end

desc "Upload Production App to Google Play Store"
lane :upload_production do
build_app(app_id: APP_ID_PRODUCTION, should_build_app_bundle: true)
upload_to_play_store(
track: "internal",
package_name: APP_ID_PRODUCTION,
json_key: "./fastlane/service_account.json",
aab: "../build/app/outputs/bundle/Release/app-release.aab",
)
end

end

0 comments on commit 22ee853

Please sign in to comment.