WEBVTT

1
00:00:00.400 --> 00:00:01.820
Hi and welcome back.

2
00:00:01.850 --> 00:00:04.180
Today we're going to go over how to upload

3
00:00:04.210 --> 00:00:08.300
our Android application
to Google Play Store using Fastlane.

4
00:00:08.330 --> 00:00:10.420
We're going to automate this process so

5
00:00:10.450 --> 00:00:14.300
every new version that we have once we
make changes to our application,

6
00:00:14.330 --> 00:00:17.780
can be uploaded to Google Play Store
using Fastlane

7
00:00:17.810 --> 00:00:20.180
and just one command. For this,

8
00:00:20.210 --> 00:00:24.140
we're going to have to set up Fastlane
in our repository for Android as well.

9
00:00:24.170 --> 00:00:26.500
We're still follow this donation.

10
00:00:26.530 --> 00:00:31.900
If you haven't set this up for iOS,
please make sure to open the link given

11
00:00:31.920 --> 00:00:37.180
in the resources and run these three
commands given here so that you're all

12
00:00:37.210 --> 00:00:42.260
ready to get started with Android
application deployment.

13
00:00:42.290 --> 00:00:44.300
Now once you have that ready,

14
00:00:44.330 --> 00:00:49.160
we're going to scroll down to the Android
section and make sure that we have all

15
00:00:49.180 --> 00:00:53.180
the prerequisites we need
to start setting this up.

16
00:00:53.210 --> 00:00:57.900
So first of all, we're going to need
a Google Play Console admin account.

17
00:00:57.930 --> 00:00:59.300
We already have that.

18
00:00:59.330 --> 00:01:02.620
And just make sure that you are verified

19
00:01:02.650 --> 00:01:06.490
before getting started,
because unless you're verified,

20
00:01:06.520 --> 00:01:10.980
this setup won't work and you're going
to waste time watching this video.

21
00:01:11.010 --> 00:01:12.570
Now let's continue.

22
00:01:12.600 --> 00:01:16.660
So we need to create an application
in the Google Play Console.

23
00:01:16.690 --> 00:01:18.740
So let's do that.

24
00:01:18.770 --> 00:01:23.570
Let's go to Google Play console.

25
00:01:23.600 --> 00:01:25.660
I'm going to click on this link,

26
00:01:25.680 --> 00:01:28.540
and here you're going to see that I
already have some apps created.

27
00:01:28.570 --> 00:01:30.820
This screen should be blank for you,

28
00:01:30.850 --> 00:01:35.620
and the first thing that you're going
to see is the Create Application button.

29
00:01:35.650 --> 00:01:40.620
So just click on that and let's
continue with creating our application.

30
00:01:40.650 --> 00:01:45.930
I'm going to name this Altru donate
as well as we did in the iOS version.

31
00:01:45.960 --> 00:01:49.620
So I'm going to say that this is
an application and it's going to be free.

32
00:01:49.650 --> 00:01:52.660
And I'm going to accept all of the terms

33
00:01:52.690 --> 00:01:57.980
and agreements, and I'm going
to click on Create the Application.

34
00:01:58.010 --> 00:02:03.420
Okay, so now you're going to see a bunch
of tasks that we need to complete.

35
00:02:03.450 --> 00:02:06.930
And let's start with setting
up our testers.

36
00:02:06.960 --> 00:02:13.380
I already have a group for the testers,
and I created it and called it Myself.

37
00:02:13.410 --> 00:02:17.170
It only has one email there,
so make sure that you create one.

38
00:02:17.200 --> 00:02:20.580
If you don't know how to create it,
just click on Create email list.

39
00:02:20.610 --> 00:02:27.540
I'm going to say that this is Myself 2.0,
and you need to add an email address here.

40
00:02:27.570 --> 00:02:32.060
So I'm going to add
this email address here.

41
00:02:32.090 --> 00:02:35.170
Click on enter.
It's going to be shown right here.

42
00:02:35.200 --> 00:02:36.700
And then click on Save changes.

43
00:02:36.730 --> 00:02:40.860
Click on Create and the make
sure to select this one.

44
00:02:40.890 --> 00:02:44.580
And then just click on Save.
Great.

45
00:02:44.610 --> 00:02:47.540
So we can't create a new release yet.

46
00:02:47.570 --> 00:02:52.700
So just let's discard this for a bit
and go to our dashboard and start

47
00:02:52.730 --> 00:02:56.060
completing our tasks
to set up our application.

48
00:02:56.080 --> 00:02:57.940
So there's a bunch of things that we need

49
00:02:57.960 --> 00:03:00.610
to complete, and we're going
to go through this super quickly.

50
00:03:00.640 --> 00:03:03.260
So let's set privacy policy.

51
00:03:03.290 --> 00:03:07.960
I'm going to set it to my website.

52
00:03:08.160 --> 00:03:09.700
You can set it to your website,

53
00:03:09.730 --> 00:03:14.500
but this actually will have to be a link
to your privacy policy before you actually

54
00:03:14.530 --> 00:03:17.700
release your application
to the production.

55
00:03:17.730 --> 00:03:19.720
So make sure that you set up some kind

56
00:03:19.750 --> 00:03:25.540
of page on a website that refers to the
privacy policy for your application.

57
00:03:25.570 --> 00:03:27.860
But this will be enough for now.

58
00:03:27.890 --> 00:03:30.660
I'm going to click on save

59
00:03:30.690 --> 00:03:36.220
and then let's go to app access here
and say that all functionality

60
00:03:36.240 --> 00:03:39.900
in my application is going to be available
without any access or restrictions.

61
00:03:39.930 --> 00:03:41.980
And let's click on save.

62
00:03:42.010 --> 00:03:45.500
Now let's go back and complete the ad

63
00:03:45.530 --> 00:03:51.180
section and say that no, we don't have
any ads in our application and save this.

64
00:03:51.210 --> 00:03:56.610
Now let's go to the content rating and
complete this questionnaire real quick.

65
00:03:56.640 --> 00:04:04.120
I'm going to enter my email address here
and then I'm going to say that it's not

66
00:04:04.150 --> 00:04:09.020
a game, it's not a social or communication
application, it's just other types of app.

67
00:04:09.050 --> 00:04:10.940
And then I'm going to click on next.

68
00:04:10.970 --> 00:04:14.260
These questions are mostly something

69
00:04:14.290 --> 00:04:18.500
that you can answer with no, I'm not
going to go through all of the right now.

70
00:04:18.530 --> 00:04:23.660
I'm just going to click on an answer no
to all of them and make sure that you read

71
00:04:23.690 --> 00:04:27.620
these questions and when you have
a different application that you're

72
00:04:27.650 --> 00:04:31.980
deploying other than the donation
application, we're uploading right now

73
00:04:32.010 --> 00:04:35.540
that these answers actually
match your application.

74
00:04:35.570 --> 00:04:40.920
So I'm just going to say no
to all of these right now.

75
00:04:40.960 --> 00:04:44.700
No, I'm going to save it.

76
00:04:44.720 --> 00:04:46.140
Click on next.

77
00:04:46.160 --> 00:04:47.780
This was generated for me.

78
00:04:47.800 --> 00:04:50.540
I'm just going to save it and great,
this has been completed.

79
00:04:50.570 --> 00:04:53.160
Let's go back to our dashboard and go

80
00:04:53.190 --> 00:04:57.380
to target audience and say that everyone
that's going to access our app is 18

81
00:04:57.410 --> 00:05:03.500
and over so that we have no more questions
asked and I'll say that it will never

82
00:05:03.530 --> 00:05:07.860
appeal to children
and I'm going to save this.

83
00:05:07.890 --> 00:05:10.060
Now let's go back to the dashboard and go

84
00:05:10.090 --> 00:05:15.340
to the news apps and say that no,
we're not creating a news application.

85
00:05:15.360 --> 00:05:20.060
And now let's go to COVID-19 contact
tracing and status apps and say

86
00:05:20.090 --> 00:05:25.820
that we're not tracing any kind of
status for COVID-19 and then save this.

87
00:05:25.840 --> 00:05:28.620
And let's go back to dashboard and do

88
00:05:28.650 --> 00:05:34.820
the data safety questionnaire and say that
we're not collecting any kind of data.

89
00:05:34.850 --> 00:05:39.740
We technically are, but we don't want
to answer too much questions right now.

90
00:05:39.760 --> 00:05:41.620
I'm just trying to show you how to deploy

91
00:05:41.650 --> 00:05:45.400
this application so you can answer these
questions differently when you have

92
00:05:45.420 --> 00:05:50.460
a different application that you
actually want to publish to the world.

93
00:05:50.480 --> 00:05:52.500
So let's go to government applications

94
00:05:52.530 --> 00:05:55.940
and say that, no, we're not
a government application.

95
00:05:55.970 --> 00:05:58.700
Let's go back to the dashboard and then

96
00:05:58.730 --> 00:06:02.820
let's say that we want to select an app
category and provide contact details.

97
00:06:02.850 --> 00:06:06.220
So just click on editing this section

98
00:06:06.250 --> 00:06:12.440
and we're going to say that it's
an app and category is going to be?

99
00:06:12.480 --> 00:06:14.460
I don't know, let's say just Lifestyle

100
00:06:14.480 --> 00:06:19.100
for now and click on Save
and then close this.

101
00:06:19.130 --> 00:06:22.300
And here we're going to need
the contact details.

102
00:06:22.330 --> 00:06:26.860
So let's input my email here.

103
00:06:26.890 --> 00:06:30.340
You can enter your email,

104
00:06:30.360 --> 00:06:35.540
and there's no other required information,
so this should be sufficient.

105
00:06:35.570 --> 00:06:36.740
And once we have that,

106
00:06:36.770 --> 00:06:40.580
let's go back to the dashboard again
and see what we have to complete.

107
00:06:40.600 --> 00:06:43.140
And then we have to set
up our store listing.

108
00:06:43.170 --> 00:06:47.260
So here we're going to have
the application name already displayed.

109
00:06:47.290 --> 00:06:49.180
I'm just going to enter that

110
00:06:49.210 --> 00:06:53.060
this is a donation application
in the short description.

111
00:06:53.090 --> 00:06:56.300
I'm going to inter some placeholder text

112
00:06:56.330 --> 00:07:01.500
for now in the full description here,
we're going to have to upload graphics.

113
00:07:01.530 --> 00:07:04.460
And you can see attached files to this

114
00:07:04.480 --> 00:07:08.180
video so that you don't have
to get the graphics on your own.

115
00:07:08.210 --> 00:07:11.940
So for now, just download those files.

116
00:07:11.970 --> 00:07:16.180
I'm going to open the folder
containing those files for myself.

117
00:07:16.210 --> 00:07:19.420
And I'm going to upload
the Play store icon here.

118
00:07:19.440 --> 00:07:21.020
This Play Store icons was actually

119
00:07:21.040 --> 00:07:25.620
generated by Make App icon that we
use in the previous videos.

120
00:07:25.650 --> 00:07:27.700
So I just grabbed it from there.

121
00:07:27.730 --> 00:07:31.140
For the feature graphic, I just
grabbed something from the Internet.

122
00:07:31.170 --> 00:07:34.540
It's not really connected
to our donation application

123
00:07:34.570 --> 00:07:39.540
I just got something
that's 1024 by 500 pixels.

124
00:07:39.570 --> 00:07:42.500
So make sure that you have this whenever

125
00:07:42.530 --> 00:07:48.140
you try to upload application using fast
lane, because these are the prerequisites.

126
00:07:48.170 --> 00:07:52.140
I'm just going to have these uploaded.
Now, for the phone screenshots

127
00:07:52.170 --> 00:07:54.780
you can literally take screenshots of your

128
00:07:54.800 --> 00:07:58.740
application in the Android simulator
whenever you have that open.

129
00:07:58.770 --> 00:08:04.180
I already took two screenshots, so I'm
going to drop them real quick here.

130
00:08:04.210 --> 00:08:09.740
These are also attached to the resources
of this lecture, so you can find it there.

131
00:08:09.770 --> 00:08:11.940
And then these are not required because

132
00:08:11.960 --> 00:08:14.820
we're actually not going to be
supporting Tablet or Chromebook.

133
00:08:14.850 --> 00:08:17.260
So I'm just going to click on Save here.

134
00:08:17.290 --> 00:08:21.700
And we have most of the things
that we need done right here.

135
00:08:21.730 --> 00:08:25.220
So now let's go back to the documentation.

136
00:08:25.250 --> 00:08:27.220
I'm going to close this.

137
00:08:27.250 --> 00:08:32.420
And here we see that we have created
the application in Google Play Console,

138
00:08:32.440 --> 00:08:37.140
and now we need to use the git ignore file
and place it inside the Android directory.

139
00:08:37.170 --> 00:08:39.100
So I'm going to click on this,

140
00:08:39.130 --> 00:08:43.380
and then I'm going to open our
project in the webstorm editor.

141
00:08:43.410 --> 00:08:47.980
You can also open your project
in any editor that you like.

142
00:08:48.010 --> 00:08:52.380
And here I'm going to just create a new

143
00:08:52.410 --> 00:08:56.460
Git ignore file inside the Android
folder as I suggested.

144
00:08:56.490 --> 00:09:01.780
I'm going to create this
file and call it Git ignore.

145
00:09:01.810 --> 00:09:05.740
And then I'm going to just click on raw

146
00:09:05.770 --> 00:09:10.580
here, copy these,
and paste it here and save it.

147
00:09:10.600 --> 00:09:12.740
Great.
So now we have the Get ignore file inside

148
00:09:12.770 --> 00:09:19.140
the Android directory, and we need to
start setting up our Google credentials.

149
00:09:19.170 --> 00:09:22.260
So now just follow me because we are going

150
00:09:22.290 --> 00:09:27.820
to go a little different route than this
outdated documentation, unfortunately.

151
00:09:27.850 --> 00:09:31.620
So let's just go to Google Play Console.

152
00:09:31.650 --> 00:09:36.460
I'm going to go here and I'm going
to go to all of the applications.

153
00:09:36.490 --> 00:09:38.580
And here in the setup section,

154
00:09:38.610 --> 00:09:42.660
you're going to see API Access
and just click on that.

155
00:09:42.690 --> 00:09:46.420
Now let's talk about what API access is.

156
00:09:46.440 --> 00:09:52.420
API access to Google Services enables
developers to integrate Google Services

157
00:09:52.440 --> 00:09:56.740
into their own applications,
websites, or software solutions.

158
00:09:56.770 --> 00:10:01.060
And by leveraging these APIs,
developers can retrieve data,

159
00:10:01.080 --> 00:10:05.580
perform actions, and interact
with Google Services programmatically.

160
00:10:05.610 --> 00:10:07.460
And to gain access to a specific

161
00:10:07.490 --> 00:10:12.180
Google Service API,
we typically need to obtain an API key or

162
00:10:12.200 --> 00:10:14.300
credentials from the
Google Developer Console.

163
00:10:14.320 --> 00:10:16.780
And these key or credentials serve as

164
00:10:16.810 --> 00:10:22.620
an authentication mechanism allowing us
and our applications to make requests

165
00:10:22.650 --> 00:10:27.020
to the desired APIs and access
the associated resources.

166
00:10:27.040 --> 00:10:28.740
And if we don't know how to do that,

167
00:10:28.770 --> 00:10:32.820
there's a button here that says learn
how to create service accounts.

168
00:10:32.850 --> 00:10:37.020
Now we're going to need to go
to Google Platform, and if you don't have

169
00:10:37.050 --> 00:10:41.700
a Google Platform account,
just create an account using the same

170
00:10:41.730 --> 00:10:45.740
email address that you used
for the Google Play Console

171
00:10:45.770 --> 00:10:49.060
and I'm sure you can just login
in with that address even.

172
00:10:49.080 --> 00:10:52.220
So just go to Google Cloud Console.

173
00:10:52.250 --> 00:10:56.740
And I already have some
service accounts set up here,

174
00:10:56.770 --> 00:11:03.620
but I am going to create a new one
and I'm going to call it Altru Donate.

175
00:11:03.650 --> 00:11:06.660
And then I'm going to click
on Create and continue.

176
00:11:06.690 --> 00:11:09.780
And I'm going to grant myself the owner

177
00:11:09.810 --> 00:11:13.300
role so that I can do anything
that I'd like with this API

178
00:11:13.330 --> 00:11:15.060
and I'm not restricted anyhow.

179
00:11:15.080 --> 00:11:18.700
I'm going to continue and I'm
going to click on Done.

180
00:11:18.730 --> 00:11:21.980
And once I do that,
you're going to see this appear here.

181
00:11:22.010 --> 00:11:26.420
And what I want to do is go to Manage Keys

182
00:11:26.450 --> 00:11:32.380
and the Add a new key and create
a JSON key and click on Create.

183
00:11:32.410 --> 00:11:36.540
And that is going to be just downloaded
directly to your downloads folder.

184
00:11:36.570 --> 00:11:38.460
And we're not going to use it yet.

185
00:11:38.490 --> 00:11:41.460
Let's just go to the API Access here,

186
00:11:41.490 --> 00:11:45.020
click on Done, and once you click on it,
this should auto Refresh.

187
00:11:45.040 --> 00:11:46.980
But if it doesn't and you don't see your

188
00:11:47.010 --> 00:11:51.420
key appear here, just click on Refresh
Yourself and it's going to appear there.

189
00:11:51.450 --> 00:11:56.340
Now, let's click on this button that says
manage play Console permissions.

190
00:11:56.370 --> 00:12:00.220
And then let's make sure that we have
all of the permissions that we need.

191
00:12:00.250 --> 00:12:02.060
And then let's go to Add permissions

192
00:12:02.080 --> 00:12:06.020
and make sure that we add our Altru
donate application here as well.

193
00:12:06.050 --> 00:12:09.700
Let's click on Apply and Apply and let's

194
00:12:09.730 --> 00:12:12.740
invite the user and then
let's send the invite.

195
00:12:12.770 --> 00:12:14.460
Now with this API access key,

196
00:12:14.490 --> 00:12:19.140
we can connect to our application
and create Deploys using the fast lane.

197
00:12:19.170 --> 00:12:23.900
So now let's go to all of the applications
and go to our Altru donate application

198
00:12:23.930 --> 00:12:27.940
and we're going to come back
to uploading a new version here soon.

199
00:12:27.970 --> 00:12:31.380
Now it's time to start
setting up our fastlane.

200
00:12:31.410 --> 00:12:38.100
So for that let's go to terminal and let's
navigate to our donation project.

201
00:12:38.130 --> 00:12:42.100
It's called Donation App and actually
it's inside the desktop.

202
00:12:42.130 --> 00:12:44.740
So let me make sure I mentioned this.

203
00:12:44.770 --> 00:12:49.040
And then I'm going to have to go
to the Android folder and once I'm there,

204
00:12:49.070 --> 00:12:53.260
I'm just going to clear my terminal so
that you see what I'm doing clearly.

205
00:12:53.290 --> 00:12:58.140
Okay, now let's run fastlane init
command so that we initialize the fast

206
00:12:58.170 --> 00:13:04.840
lane and let's say that our package name
is com donation app vache and we don't

207
00:13:04.870 --> 00:13:10.020
have the secret file and no, we don't
need to download existing metadata.

208
00:13:10.050 --> 00:13:11.380
That's okay.

209
00:13:11.410 --> 00:13:15.260
Now let's wait for this to finish
up and let's click on Enter.

210
00:13:15.290 --> 00:13:19.220
Let's click on Enter
and that's it, we're done.

211
00:13:19.250 --> 00:13:25.860
Okay, so now once we have this,
we're going to have to test our JSON key

212
00:13:25.890 --> 00:13:29.980
and validate that it can connect
to the Google Play Store.

213
00:13:30.010 --> 00:13:36.700
So to do that actually I'm going to drag
the downloaded JSON key file and place it

214
00:13:36.730 --> 00:13:40.580
inside the Android folder and I'm
going to click on Refactor.

215
00:13:40.610 --> 00:13:43.860
That's fine.
I'm going to add this to GitHub as well.

216
00:13:43.890 --> 00:13:48.860
And then what I'm going to do is run
a command here that is going to be called

217
00:13:48.890 --> 00:13:54.180
fastlane run validate play store key,

218
00:13:54.210 --> 00:13:59.900
JSON key and the JSON key path is going

219
00:13:59.930 --> 00:14:04.260
to be let's make sure that we
can get this name here.

220
00:14:04.290 --> 00:14:08.440
I'm going to click on Rename and I'm just
going to copy this and then I'm going

221
00:14:08.470 --> 00:14:11.820
to reopen my terminal and I'm
going to paste it here.

222
00:14:11.850 --> 00:14:13.860
And then I'm going to click on Enter.

223
00:14:13.890 --> 00:14:18.740
Okay, so we can successfully establish
connection to Google Play Store.

224
00:14:18.770 --> 00:14:24.260
And now we know that our JSON key
file that we generated works.

225
00:14:24.290 --> 00:14:26.020
Okay, so that's great.

226
00:14:26.050 --> 00:14:28.620
Now we are going to need to generate

227
00:14:28.650 --> 00:14:36.060
a sign in key which will allow us to set
up a password for keystore and the key

228
00:14:36.080 --> 00:14:40.860
for that we're going to have to find
our JDK path where it's installed.

229
00:14:40.890 --> 00:14:51.780
And to do that just run user
and then libexec and then Java home.

230
00:14:51.810 --> 00:14:56.100
Okay, so this will give you a path
to where your JDK is installed.

231
00:14:56.130 --> 00:15:01.940
So just copy this and once you do that,
let's just go to this file.

232
00:15:01.970 --> 00:15:05.540
So let's just do CD and then paste this

233
00:15:05.560 --> 00:15:08.380
and we're going to change directory
and we're going to get there.

234
00:15:08.410 --> 00:15:11.220
So now we're inside the home folder

235
00:15:11.250 --> 00:15:14.940
and here we're going to run
this command given here.

236
00:15:14.970 --> 00:15:20.460
So let's search for this
and generate a signing key.

237
00:15:20.490 --> 00:15:26.860
So just copy this
and the just paste it here.

238
00:15:26.890 --> 00:15:34.540
This will generate my release keystore
file with the alias of my key alias.

239
00:15:34.570 --> 00:15:40.740
So let's just click on Enter and then
let's create some keystore password.

240
00:15:40.770 --> 00:15:42.260
I'm going to enter mine.

241
00:15:42.290 --> 00:15:43.900
You can enter yours.

242
00:15:43.920 --> 00:15:45.320
By the way, when you're going to be

243
00:15:45.320 --> 00:15:48.380
typing, you're not going to be
string it and that's totally fine.

244
00:15:48.410 --> 00:15:51.700
Your input is taken
into consideration anyways.

245
00:15:51.730 --> 00:15:55.940
And I'm going to reenter my password here

246
00:15:55.970 --> 00:16:00.020
and I'm going to say that my first name
and last name is Nata Vacheishvili.

247
00:16:00.050 --> 00:16:05.260
And I'm not going to answer any of these
questions, and I'm going to say yes here.

248
00:16:05.290 --> 00:16:07.900
Okay, so this file has been created.

249
00:16:07.930 --> 00:16:14.420
Now we're going to need to locate that
file and actually move it to our project.

250
00:16:14.450 --> 00:16:19.660
And that file will need to be moved
to Android app folder given here.

251
00:16:19.690 --> 00:16:23.460
So first we're going to have
to locate this file, right?

252
00:16:23.490 --> 00:16:29.460
Let's just copy the path
to our JDK one more time.

253
00:16:29.490 --> 00:16:32.660
And on your Mac just open the finder.

254
00:16:32.690 --> 00:16:37.860
And once you open this,
you can just click on Go and then go

255
00:16:37.890 --> 00:16:42.340
to folder and the just paste
this here and click on Enter.

256
00:16:42.370 --> 00:16:48.100
Once you click on Enter, you're going to
see my release key store generated here.

257
00:16:48.130 --> 00:16:50.260
So just grab that file and more.

258
00:16:50.290 --> 00:16:56.140
It inside the app folder of your
Android directory and great.

259
00:16:56.170 --> 00:16:57.500
So now this is added there.

260
00:16:57.530 --> 00:17:00.860
I don't need this finder anymore.

261
00:17:00.890 --> 00:17:08.530
And once we have this file, we're going
to need to edit our Gradle Properties.

262
00:17:08.560 --> 00:17:10.800
So let's go to Gradle Properties file.

263
00:17:10.830 --> 00:17:13.770
This is directly inside the Android

264
00:17:13.800 --> 00:17:16.380
folder, so just click
on that and open that up.

265
00:17:16.410 --> 00:17:20.810
And here we're going to set up some
constants that we can use in our project.

266
00:17:20.840 --> 00:17:26.460
So the first constant that we're going
to set up is going to be for our store

267
00:17:26.490 --> 00:17:31.770
file, which is a binary file that contains
a private key used to sign the app.

268
00:17:31.800 --> 00:17:36.180
It is typically created using
the Java key tool that we just used.

269
00:17:36.210 --> 00:17:38.420
So the store file should be kept secure

270
00:17:38.450 --> 00:17:43.010
and backed up as it is required to sign
future updates of the application.

271
00:17:43.040 --> 00:17:47.330
So make sure that you don't
commit this to your GitHub.

272
00:17:47.360 --> 00:17:52.290
Okay, so now let's do
my App upload store file.

273
00:17:52.320 --> 00:18:01.740
And let's say that this is going
to be my release keystore file.

274
00:18:01.770 --> 00:18:06.290
Now we're going to need a second
constant that is going to be my.

275
00:18:06.320 --> 00:18:10.220
App upload key alias.

276
00:18:10.250 --> 00:18:16.770
And we know that our key alias
was set to MyKey alias here.

277
00:18:16.800 --> 00:18:20.980
So let's just copy this and paste it here.

278
00:18:21.000 --> 00:18:24.420
And then we're going to need some
constants for our passwords as well.

279
00:18:24.450 --> 00:18:29.010
So let's set up my app
upload store password.

280
00:18:29.040 --> 00:18:33.010
So these two constants are going to be

281
00:18:33.040 --> 00:18:35.660
the passwords that you
created in the terminal.

282
00:18:35.690 --> 00:18:43.810
So let's create a second one
called my app upload key password.

283
00:18:43.840 --> 00:18:47.290
Great.
Okay, so I'm going to set up my passwords

284
00:18:47.320 --> 00:18:50.290
right now and you're not
going to be seeing it.

285
00:18:50.320 --> 00:18:53.570
Just enter your passwords as
well and come back to the video.

286
00:18:53.600 --> 00:18:53.900
Great.

287
00:18:53.930 --> 00:18:58.090
So make sure that you have
that file saved before continuing.

288
00:18:58.120 --> 00:19:05.460
And now let's talk a bit about why
we needed to set up signing at all.

289
00:19:05.490 --> 00:19:09.420
So signing in the context of app
development refers to the process

290
00:19:09.450 --> 00:19:15.050
of digitally signing an Android
application file using cryptographic key,

291
00:19:15.080 --> 00:19:19.860
and the signing process ensures the
integrity and authenticity of the app.

292
00:19:19.890 --> 00:19:25.660
So now that we have all of our constants
set up, we're going to have to go

293
00:19:25.690 --> 00:19:31.810
to the build gradle file inside our
application and start modifying it.

294
00:19:31.840 --> 00:19:36.220
So here you see that we have the signing
config set up for debugging purposes,

295
00:19:36.250 --> 00:19:40.250
but we're going to be using Fast
lane for releasing our application.

296
00:19:40.280 --> 00:19:43.770
So we need to create a release
signing config as well.

297
00:19:43.800 --> 00:19:48.770
So let's just copy this and paste it here
and modify this.

298
00:19:48.800 --> 00:19:53.720
Okay, so I'm going to format
this a little bit better.

299
00:19:55.160 --> 00:19:56.810
And here in this store file,

300
00:19:56.840 --> 00:20:06.330
I'm going to use our My app upload store
file constant that we created together.

301
00:20:06.360 --> 00:20:15.570
For the store password, we're going
to use My app upload store password.

302
00:20:15.600 --> 00:20:18.140
For the key alias, we're going to use our

303
00:20:18.170 --> 00:20:27.770
Constants again and say that we're
using My app upload key alias.

304
00:20:27.800 --> 00:20:35.330
And then for the key password, we're
going to use My app upload key password.

305
00:20:35.360 --> 00:20:37.180
Great.
Now let's save this.

306
00:20:37.210 --> 00:20:39.570
And we're going to have
to do one more thing.

307
00:20:39.600 --> 00:20:41.860
Inside the build types here we have

308
00:20:41.890 --> 00:20:45.940
the signing config for debug
created, but for releasing.

309
00:20:45.960 --> 00:20:47.530
We're not going to be using signing

310
00:20:47.560 --> 00:20:51.660
configs for debug anymore because we
just created the one for release.

311
00:20:51.690 --> 00:20:54.740
Actually, let me rename this to release.

312
00:20:54.770 --> 00:21:00.500
And here let's use
the release signing config.

313
00:21:00.530 --> 00:21:04.570
Great.
So one thing I forgot in the last video

314
00:21:04.600 --> 00:21:09.250
after editing all of our files was that I
didn't change a folder name

315
00:21:09.280 --> 00:21:14.290
for the release
inside the source release here,

316
00:21:14.320 --> 00:21:19.940
I only changed it for the debugging
and main application.

317
00:21:19.970 --> 00:21:21.980
So let's see the one here as well.

318
00:21:22.000 --> 00:21:23.800
So this is called donation app vache.

319
00:21:23.830 --> 00:21:27.660
But if I go to the release section,
I want to rename this donation app

320
00:21:27.690 --> 00:21:32.570
to match with donation app vache
so that we have no problems.

321
00:21:32.600 --> 00:21:36.500
And inside this react native flipper file,
I want to make sure that the package

322
00:21:36.530 --> 00:21:41.220
that we import here is also
called donation app vache.

323
00:21:41.250 --> 00:21:44.810
Okay, great.
So now we can start preparing

324
00:21:44.840 --> 00:21:48.900
for uploading our application
on Google Play Store already.

325
00:21:48.930 --> 00:21:51.620
The thing is that for creating the first

326
00:21:51.650 --> 00:21:56.980
beta build, we have to upload it
into Google Play console manually.

327
00:21:57.010 --> 00:21:59.740
So we're going to have to do this manually

328
00:21:59.770 --> 00:22:03.180
first, and then we can
use fastlane to do this.

329
00:22:03.210 --> 00:22:05.740
So for that, let's open a new terminal.

330
00:22:05.770 --> 00:22:11.420
Let's go to the donation app Android file.
Great.

331
00:22:11.450 --> 00:22:15.460
I'm going to clear my terminal so that you
see everything that I do clearly.

332
00:22:15.490 --> 00:22:20.940
And what I'm going to do is
use gradlew clean so that we start fresh

333
00:22:20.970 --> 00:22:25.810
and we don't have any build caches
missing with our release bundle.

334
00:22:25.840 --> 00:22:26.420
Great.

335
00:22:26.450 --> 00:22:30.810
So now what we need to do is
run gradlew bundleRelease.

336
00:22:30.840 --> 00:22:33.940
And this will generate an AAB file.

337
00:22:33.970 --> 00:22:39.760
And this AAB file is something that we're
going to use for our first release.

338
00:22:39.800 --> 00:22:42.740
So we can already go to our dashboard.

339
00:22:42.770 --> 00:22:47.900
And if this runs successfully, we're
going to be able to create a new release.

340
00:22:47.930 --> 00:22:49.290
This might take some time,

341
00:22:49.320 --> 00:22:53.460
so you can wait for it and come back
to the video once you're ready.

342
00:22:53.480 --> 00:22:56.090
Great.
So now our application has successfully

343
00:22:56.120 --> 00:23:01.180
bundled up and if we go here,
we're going to see a new folder appear

344
00:23:01.210 --> 00:23:05.810
here called Build inside
Android Directory App and then Build.

345
00:23:05.840 --> 00:23:07.810
And if you open this up and open

346
00:23:07.840 --> 00:23:14.460
the outputs and then Bundle and Release
here, you're going to see App Release AAB

347
00:23:14.480 --> 00:23:18.050
file, which is what we're going to use
to manually upload the build of our

348
00:23:18.080 --> 00:23:21.620
application inside
the Google Play Console.

349
00:23:21.650 --> 00:23:28.570
So let's create a new release
and click on Create a new Release

350
00:23:28.600 --> 00:23:33.900
and let's drop this file here
and wait for the upload to complete.

351
00:23:33.930 --> 00:23:38.140
Great.
Now this is already uploaded so we can use

352
00:23:38.170 --> 00:23:44.290
our release name and actually name it 1.0
and then click on Next.

353
00:23:44.320 --> 00:23:47.180
Here you're going to see some warnings pop

354
00:23:47.210 --> 00:23:51.380
up, but these are not important,
so don't pay attention to this.

355
00:23:51.410 --> 00:23:52.540
These are not errors.

356
00:23:52.570 --> 00:23:54.500
We can still release our application.

357
00:23:54.530 --> 00:23:55.980
So just click on save.

358
00:23:56.010 --> 00:23:59.290
And now this is available
to Internal Testers.

359
00:23:59.320 --> 00:24:01.960
Now the next step is to make sure that we

360
00:24:01.990 --> 00:24:08.180
can use Fastlane to upload our
applications and our application since we

361
00:24:08.210 --> 00:24:12.900
have only first release to internal
testers is now in the Draft mode.

362
00:24:12.930 --> 00:24:14.740
And to ensure that this is not

363
00:24:14.760 --> 00:24:17.700
in the Draft node,
what we're going to have to do is promote

364
00:24:17.730 --> 00:24:23.380
the release to close testing and this will
create alpha version of our application

365
00:24:23.410 --> 00:24:25.620
and we're going to move from the Draft

366
00:24:25.650 --> 00:24:30.380
mode to the alpha mode,
which is something that we need to ensure

367
00:24:30.410 --> 00:24:35.660
that we can use Fastlane for uploading
our subsequent newer version.

368
00:24:35.690 --> 00:24:42.620
So I'm going to click on this
and submit it.

369
00:24:42.650 --> 00:24:45.220
And here you're going to see errors and if

370
00:24:45.240 --> 00:24:48.380
you don't resolve those errors,
you're not going to be able to continue.

371
00:24:48.410 --> 00:24:50.570
So let's see what errors we have.

372
00:24:50.600 --> 00:24:55.620
First of all,
our application has to target this and we

373
00:24:55.650 --> 00:24:58.980
should declare the use
of advertising ID in Play Console.

374
00:24:59.010 --> 00:25:01.860
So let's complete the declaration and say

375
00:25:01.890 --> 00:25:06.660
that we don't have any advertising
ID and then save this.

376
00:25:06.690 --> 00:25:10.220
Once you do that, let's go
back to the App content.

377
00:25:10.240 --> 00:25:11.420
Actually, we're going to have to go

378
00:25:11.450 --> 00:25:16.460
to Dashboard ourselves
and then close Testing

379
00:25:16.490 --> 00:25:22.020
and let's click on Manage Track and go
to our Draft Release and click on Editing

380
00:25:22.050 --> 00:25:26.050
the release and let's click
on Next again and go back here.

381
00:25:26.080 --> 00:25:28.540
And now we have one more error that says

382
00:25:28.570 --> 00:25:31.940
no countries or regions have
been selected for this track.

383
00:25:31.970 --> 00:25:34.090
So we're going to have to do that.

384
00:25:34.120 --> 00:25:37.860
Let's go to the Dashboard again

385
00:25:37.890 --> 00:25:44.420
and select the countries and regions
and let's go to add countries and Regions.

386
00:25:44.450 --> 00:25:49.620
And here I'm just going to select all
of the countries and click on Save.

387
00:25:49.650 --> 00:25:53.620
Great.
Now let's continue editing our release

388
00:25:53.650 --> 00:25:57.140
and click on Next and you're going
to see these errors disappear.

389
00:25:57.170 --> 00:26:00.500
And we only have four warnings
here that we can also discard.

390
00:26:00.530 --> 00:26:04.740
So let's just click on Save and great.

391
00:26:04.770 --> 00:26:07.040
So now we are in the alpha mode.

392
00:26:07.070 --> 00:26:09.260
We're not in the draft mode anymore.

393
00:26:09.290 --> 00:26:16.380
Therefore, we can already start uploading
our application using Fastlane.

394
00:26:16.410 --> 00:26:19.620
So before we do that,
there's one thing we have to do.

395
00:26:19.650 --> 00:26:22.290
Let's go to the app file here and make

396
00:26:22.320 --> 00:26:27.020
sure that we have the path
to our JSON key file set up.

397
00:26:27.050 --> 00:26:30.020
And let's make sure that we
grab the name of this.

398
00:26:30.050 --> 00:26:37.800
I'm going to click on Rename again,
copy this name and paste it here.

399
00:26:37.880 --> 00:26:39.380
Okay, let's save this.

400
00:26:39.410 --> 00:26:42.780
And now let's go to our Fastfile.

401
00:26:42.810 --> 00:26:45.740
And here you're going to see the deploy

402
00:26:45.770 --> 00:26:49.540
lane, which is what we're going
to use for deploying our application.

403
00:26:49.570 --> 00:26:54.260
But instead of assemble release
which generates APK files,

404
00:26:54.290 --> 00:27:01.330
we need to write bundle release so that we
generate AAB files because APK files are

405
00:27:01.360 --> 00:27:05.900
not accepted by Google Play Console
anymore because they have been deprecated.

406
00:27:05.930 --> 00:27:11.180
So for upload to Play Store,
we're going to need some arguments.

407
00:27:11.210 --> 00:27:13.500
So let's create those.

408
00:27:13.530 --> 00:27:20.570
Let's say that we are uploading our
new build to the track that is internal.

409
00:27:20.600 --> 00:27:23.400
Let's save this

410
00:27:23.800 --> 00:27:30.810
and make sure also that our version is
increased in our build gradle file.

411
00:27:30.840 --> 00:27:32.860
Because if we don't increase the version,

412
00:27:32.890 --> 00:27:36.900
then we're not going to be able
to complete the deployment.

413
00:27:36.930 --> 00:27:42.380
Every version that we're going to release
will have to have its own version code

414
00:27:42.410 --> 00:27:47.900
and version name that is unique compared
to the ones that we have already uploaded.

415
00:27:47.930 --> 00:27:50.570
So to do that, we're going to have to go

416
00:27:50.600 --> 00:27:55.260
to the build gradle file inside
the Android app directory.

417
00:27:55.290 --> 00:27:58.220
And here you're going to see
version code and version name.

418
00:27:58.250 --> 00:28:01.260
Let's just change our version code to 2

419
00:28:01.290 --> 00:28:04.260
and change our version
name to 2 as well.

420
00:28:04.280 --> 00:28:08.090
And this is something that you will always
have to do manually, unfortunately,

421
00:28:08.120 --> 00:28:15.260
before creating and uploading the build
using fatlane. In the iOS,

422
00:28:15.290 --> 00:28:19.260
this is handled automatically and it
is incremented automatically,

423
00:28:19.290 --> 00:28:21.500
but for Android, unfortunately,

424
00:28:21.530 --> 00:28:24.570
you're going to have to do
this manually every time.

425
00:28:24.600 --> 00:28:29.220
Now I think that we are ready
for our upload process.

426
00:28:29.250 --> 00:28:31.660
So let's open a terminal.

427
00:28:31.690 --> 00:28:35.290
We're inside the Android folder already.
If you're not,

428
00:28:35.320 --> 00:28:39.660
just navigate to the Android folder
of your project and here just type

429
00:28:39.690 --> 00:28:45.620
in Fastlane Deploy and click
on Enter and wait for it to complete.

430
00:28:45.650 --> 00:28:47.540
This will take some time,

431
00:28:47.570 --> 00:28:52.900
so just be patient and come back
to the video once you're done.

432
00:28:52.920 --> 00:28:55.140
Great.
So our Fastlane tools finished

433
00:28:55.170 --> 00:28:59.900
successfully and our new version
of the application has been uploaded using

434
00:28:59.930 --> 00:29:02.420
automated deployment system
that we just set up.

435
00:29:02.450 --> 00:29:07.540
So if we go to the Altru donate
application for the Google Play Console

436
00:29:07.570 --> 00:29:12.860
website and refresh this page
inside the internal testing tab,

437
00:29:12.890 --> 00:29:16.290
you're going to see that you
have 2.0 version available.

438
00:29:16.320 --> 00:29:20.050
So if you want to deploy newer
versions of your application.

439
00:29:20.080 --> 00:29:24.810
After you make some changes,
make sure to change the version code

440
00:29:24.840 --> 00:29:30.330
and version name and update it and just do
Fastlane deploy and it should complete

441
00:29:30.360 --> 00:29:33.660
successfully and it will be
inside the internal testing.

442
00:29:33.680 --> 00:29:36.220
Now, if you're going to want to release
this to production,

443
00:29:36.250 --> 00:29:40.220
you're just going to go to production,
create a new release,

444
00:29:40.250 --> 00:29:44.220
and then you're going to add the builds
from the library,

445
00:29:44.250 --> 00:29:51.140
select the one that you want to release,
name the release, click on Next,

446
00:29:51.170 --> 00:29:57.220
and then you're going to submit it
to the Google Play console for a review.

447
00:29:57.240 --> 00:29:58.620
And you're going to have to select

448
00:29:58.650 --> 00:30:01.940
the countries and regions
for the production mode again.

449
00:30:01.970 --> 00:30:03.810
But this is something easy to do.

450
00:30:03.840 --> 00:30:04.940
You can just do it yourself.

451
00:30:04.960 --> 00:30:07.810
But I'm not going to be actually
submitting this to production.

452
00:30:07.840 --> 00:30:08.940
I don't want to do that.

453
00:30:08.960 --> 00:30:11.700
But this is how you are going
to do it if you're interested.

454
00:30:11.730 --> 00:30:14.700
Now, if you want to test this,

455
00:30:14.730 --> 00:30:20.700
you're going to have to go to the testers
tab and you're going to copy the link.

456
00:30:20.730 --> 00:30:25.570
And if you go here,
you're going to see the application.

457
00:30:25.600 --> 00:30:30.620
Now we're not logged in from the actual
phone, but if you were logged

458
00:30:30.650 --> 00:30:35.700
in from the phone
into the Google Play Store account using

459
00:30:35.730 --> 00:30:41.940
the email that we set up here inside
the Internal testers, you're going to be able

460
00:30:41.970 --> 00:30:46.260
to download this application
and actually test it on your device.

461
00:30:46.290 --> 00:30:48.090
So if you're going to share this

462
00:30:48.120 --> 00:30:51.940
application to your friends,
just make sure that you have included

463
00:30:51.970 --> 00:30:56.330
their email addresses here and that they
are logged in with the same email address

464
00:30:56.360 --> 00:30:58.980
in the Google Play Store
account on their phone.

465
00:30:59.010 --> 00:31:04.940
And once they go to this link that you can
again find here inside the testers

466
00:31:04.970 --> 00:31:09.900
and then copy the link here and send it
to your friends, they're going to be able

467
00:31:09.930 --> 00:31:13.660
to see this application and test
it out on their real device.

468
00:31:13.690 --> 00:31:16.050
And you can do so for yourself as well

469
00:31:16.080 --> 00:31:20.700
and see how Altru donate
looks on the actual device.

470
00:31:20.730 --> 00:31:22.740
So this is it my friends.

471
00:31:22.770 --> 00:31:25.420
I know we spent a lot of time setting this

472
00:31:25.450 --> 00:31:31.220
up, but in the future it's going to save
you a lot of time when you are going

473
00:31:31.250 --> 00:31:35.500
to want to release new builds
to the Google Play Store.

474
00:31:35.530 --> 00:31:37.780
Plus, this setup is something important.

475
00:31:37.810 --> 00:31:39.290
Many companies use it.

476
00:31:39.320 --> 00:31:43.700
So if you're going to see your company use
Fastlane, you're going to know how it

477
00:31:43.730 --> 00:31:48.290
functions internally and why they
needed it in the first place.

478
00:31:48.320 --> 00:31:49.290
So that's all.

479
00:31:49.320 --> 00:31:52.540
Thank you so much for watching
and going through this tutorial.

480
00:31:52.570 --> 00:31:54.380
I hope you find it useful.

481
00:31:54.410 --> 00:31:57.020
Now your application can be deployed using

482
00:31:57.050 --> 00:32:01.460
automated deployment system
of Fastlane both on iOS and Android.

483
00:32:01.490 --> 00:32:04.700
And this is a huge achievement
and a big knowledge to be honest.

484
00:32:04.730 --> 00:32:07.960
So good job to you and I'll
see you in the next video.

