Skip to content

Commit f8200d6

Browse files
committed
android beta build full doc
1 parent 6a319cd commit f8200d6

File tree

2 files changed

+55
-5
lines changed

2 files changed

+55
-5
lines changed

android/gradlew

100644100755
File mode changed.

docs/beta builds.md

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ sudo gem install fastlane -NV
3939

4040
Before continuing make sure you have:
4141

42-
- [ ] Xcode 9 or higher
42+
- [ ] Install all [required dependencies](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies), with Xcode 9 or higher
4343
- [ ] Choose the [bundle identifier](https://cocoacasts.com/what-are-app-ids-and-bundle-identifiers/) of your app (for example `com.tcm.boilerplate`)
4444
- [ ] An Apple ID with an admin user, with its username (email, for example `[email protected]`) and password
4545
- [ ] Your app name, if not already created on the Developer Portal (for example `TCM React Native Boilerplate`). Fastlane can create applications in the Developer Portal and App Store Connect, so it's recommended to let Fastlane do the job for you.
@@ -185,10 +185,12 @@ fastlane beta
185185
Before continuing make sure you have:
186186

187187
- [ ] An Google Play Console account with an admin rights, with its username (email, for example `[email protected]`) and password
188-
- [ ] Your app name, if not already created on Google Play (for example `TCM React Native Boilerplate`). Fastlane can create applications in the Google Play Console so it's recommended to let Fastlane do the job for you.
188+
- [ ] Unlike for iOS, Fastlane can't create applications in the Google Play Console. You must create your application before in the Google Play Console
189189
- [ ] Use the right [.gitignore](android/.gitignore) file inside the `android` directory
190-
- [Collect your Google Credentials](https://docs.fastlane.tools/getting-started/android/setup/#collect-your-google-credentials) :warning: hl=en
191-
Créer le fichier dans un dossier /builds/api-7464680612454675996-156274-380a41c4a589
190+
- [ ] [Collect your Google Credentials](https://docs.fastlane.tools/getting-started/android/setup/#collect-your-google-credentials)
191+
:warning: In the Google Play Console, add the parameter `&hl=en` at the end of the URL (before any #) to switch to English. In some languages, the "Create Service Account" will not be able.
192+
Download the JSON key file, and copy it into `my-project/android/key.json`
193+
- [ ] Install [all dependencies](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-1) for macOS and Android
192194

193195

194196
### Setting up
@@ -205,6 +207,54 @@ The following questions will be asked:
205207
* `Package Name (com.krausefx.app)`
206208
* Our answer is `com.tcm.boilerplate`
207209
* `Path to the json secret file`
208-
* ./key.json
210+
* Type `key.json` (path to the file previously created in the Prerequisites step)
209211
* Download existing metadata and setup metadata management?
210212
* y
213+
214+
Fastlane will then give you some information about git, the files it will create, etc. Just type `enter` to continue.
215+
216+
Congrats! Fastlane has created some files.
217+
If you are using Git, commit all generated files.
218+
219+
Once the setup has finished you can see a new folder inside the `ios` folder:
220+
```
221+
- fastlane/
222+
- Appfile
223+
- Fastfile
224+
```
225+
226+
`Appfile` contains identifiers used to connect to the Google Play Console and the link to the `key.json` file.
227+
You can read more about this file [here](https://docs.fastlane.tools/advanced/#appfile).
228+
229+
`Fastfile` contains all actions you can launch.
230+
You can read more about this file [here](https://docs.fastlane.tools/actions).
231+
A `beta` [lane](https://docs.fastlane.tools/advanced/lanes/) a `deploy` lane and a `test` are available by default.
232+
233+
You can remove the `deploy` lane to avoid some mistakes, and replace the `beta` lane by the following:
234+
```
235+
desc "Submit a new Beta Build to Play Store"
236+
lane :beta do
237+
gradle(
238+
task: 'assemble',
239+
build_type: 'Release'
240+
)
241+
upload_to_play_store(
242+
track: 'beta'
243+
)
244+
```
245+
246+
247+
### Creating a beta build
248+
249+
Creating a beta build and uploading it on Google Play is now really easy.
250+
Just type the following:
251+
252+
```
253+
cd my-project/ios
254+
fastlane beta
255+
```
256+
257+
If you have a `Permission denied` issue, please run:
258+
```
259+
chmod a+x /my-project/android/gradlew
260+
```

0 commit comments

Comments
 (0)