@@ -21,6 +21,42 @@ PROTOTYPE_BUILD_DOMAIN = 'https://cdn.a8c-ci.services'
2121PROTOTYPE_BUILD_TYPE = 'release'
2222
2323platform :android do
24+
25+ # Builds a release app bundle .aab
26+ #
27+ lane :build_bundle do
28+ gradle ( task : 'clean' )
29+
30+ gradle (
31+ task : 'bundle' ,
32+ build_type : 'Release'
33+ )
34+ end
35+
36+ # Uploads the app bundle to the Google Play Store
37+ #
38+ # @param track [String] The track to upload to. One of: 'internal', 'alpha', 'beta', 'production'. Defaults to 'internal'
39+ # @param release_status [String] The release status. One of: 'completed', 'draft', 'halted', 'inProgress'. Defaults to 'completed'
40+ # @param rollout [String] The percentage of users who should get the update, as a string between '0' and '1'. Defaults to '1'
41+ # @env [String] PLAY_STORE_RAW_JSON_KEY The Google Play Store service account JSON key data
42+ #
43+ lane :upload_to_store do |track : 'internal' , release_status : 'completed' , rollout : '1' |
44+ require_env_vars! ( 'PLAY_STORE_RAW_JSON_KEY' )
45+
46+ upload_to_play_store (
47+ package_name : 'com.gravatar.app' ,
48+ aab : File . join ( PROJECT_ROOT_FOLDER , 'app' , 'build' , 'outputs' , 'bundle' , 'release' , 'app-release.aab' ) ,
49+ track : track ,
50+ release_status : release_status ,
51+ rollout : rollout ,
52+ skip_upload_metadata : ( track != 'production' ) ,
53+ skip_upload_changelogs : true ,
54+ skip_upload_images : true ,
55+ skip_upload_screenshots : true ,
56+ json_key_data : get_required_env! ( 'PLAY_STORE_RAW_JSON_KEY' )
57+ )
58+ end
59+
2460 # Builds the Gravatar Demo app prototype APK, uploads it to S3, and posts a download link as a comment on the associated pull request.
2561 #
2662 # Intended for use in CI to provide reviewers with an installable build for testing.
0 commit comments