Skip to content

Commit 09be2fa

Browse files
author
codebysd
committed
Added README file.
Updated CLI option descriptions.
1 parent 666c4d6 commit 09be2fa

File tree

2 files changed

+74
-4
lines changed

2 files changed

+74
-4
lines changed

README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Play Store Uploader
2+
3+
This is a simple tool to upload android apk builds to play store.
4+
Suitable for automation of play store uploads in a CI system.
5+
6+
## Requirements
7+
8+
1. Java (JRE) 7 or above
9+
10+
## Install
11+
12+
1. Download the latest zip or tar archive from [Releases Section](https://github.com/codebysd/java-play-store-uploader/releases).
13+
2. Unpack archive contents to any location.
14+
3. Execute the binaries in `bin` directory. On unix use `PlayStoreUploader`, while on windows use `PlayStoreUploader.bat`.
15+
16+
## Usage
17+
18+
### 1. Setup Play Store
19+
20+
Ensure that the app is created on Play Store. Setup Play Store listing and other required information so that release management is enabled and new releases can be published. It is advised to do a manual upload and release at least once in the beginning.
21+
22+
### 2. Setup Release Tracks
23+
24+
Play Store allows to upload apps on release tracks like alpha, beta and production. Enable and setup the track you want to use, on Play Store console.
25+
26+
### 3. Get Service Account Key
27+
28+
To access Play Store API a JSON key file is needed. On Play Store, goto API Access section and configure a service account with Play Store API access. Download and save the JSON credentials of this account.
29+
30+
### 4. Build apk file
31+
32+
Build signed production android apk file to upload. In case of a CI server, this file should be already generated.
33+
34+
### 4. Run Upload Command
35+
36+
Execute the binary, passing required data in arguments.
37+
38+
```bash
39+
PlayStoreUploader -key "key.json" -apk "app.apk" -track "alpha" -name "myApp" -notes "new release"
40+
```
41+
42+
#### CLI Options
43+
44+
Running without any arguments will print available argument options.
45+
46+
```bash
47+
Options:
48+
-apk VAL : The apk file to upload
49+
-key VAL : JSON key file of authorized service account
50+
-name VAL : (optional) App name on Play Store (defaults to name in apk)
51+
-notes VAL : (optional) Release notes
52+
-notesFile VAL : (optional) Release notes from file
53+
-track VAL : Release track to use. Eg. alpha, beta, production etc
54+
```
55+
56+
## Development
57+
58+
To build:
59+
60+
```bash
61+
./gradlew clean assemble
62+
```
63+
64+
To run:
65+
66+
```bash
67+
./gradlew run --args "...arguments"
68+
```
69+
70+
Pull requests and suggestions are welcome.

src/main/java/App.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ public class App {
3636
@Option(name = "-key", required = true, usage = "JSON key file of authorized service account")
3737
private String jsonKeyPath;
3838

39-
@Option(name = "-name", usage = "(optional) Application name as registered on Play Store.")
39+
@Option(name = "-name", usage = "(optional) App name on Play Store (defaults to name in apk)")
4040
private String appName;
4141

4242
@Option(name = "-apk", required = true, usage = "The apk file to upload")
4343
private String apkPath;
4444

45-
@Option(name = "-track", required = true, usage = "Release track to use. Eg. alpha, beta, production etc.")
45+
@Option(name = "-track", required = true, usage = "Release track to use. Eg. alpha, beta, production etc")
4646
private String trackName;
4747

48-
@Option(name = "-notes", forbids = "-notesFile", usage = "(optional) Release notes.")
48+
@Option(name = "-notes", forbids = "-notesFile", usage = "(optional) Release notes")
4949
private String notes;
5050

51-
@Option(name = "-notesFile", forbids = "-notes", usage = "(optional) Release notes from file.")
51+
@Option(name = "-notesFile", forbids = "-notes", usage = "(optional) Release notes from file")
5252
private String notesPath;
5353

5454
/**

0 commit comments

Comments
 (0)