Skip to content

Commit 74e4252

Browse files
committed
Initial Commit
0 parents  commit 74e4252

File tree

4 files changed

+427
-0
lines changed

4 files changed

+427
-0
lines changed

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
4+
### STS ###
5+
.apt_generated
6+
.classpath
7+
.factorypath
8+
.project
9+
.settings
10+
.springBeans
11+
.sts4-cache
12+
13+
### IntelliJ IDEA ###
14+
.idea
15+
*.iws
16+
*.iml
17+
*.ipr
18+
19+
### NetBeans ###
20+
/nbproject/private/
21+
/nbbuild/
22+
/dist/
23+
/nbdist/
24+
/.nb-gradle/
25+
/build/
26+
27+
### VS Code ###
28+
.vscode/

README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Google Play Store Publisher
2+
3+
This is a simple tool to upload android apk files to play store which is inspired from https://github.com/codebysd/java-play-store-uploader.
4+
Suitable for automation of play store uploads in a CI system.
5+
6+
## Requirements
7+
8+
1. Java (JRE) 8 or above
9+
10+
## Install
11+
12+
1. Download the latest jar file from [Releases Section](https://github.com/rakeshgirase/app-release-manager/releases).
13+
2. Place it in root folder of your application. You can check in the file for Cloud build.
14+
3. Use command java -jar release-manager-1.0.jar -key "key.json" -apk "app.apk" -track "internal" -name "myApp" -notes "new release". (You can use this command in your cloud build config file)
15+
16+
17+
## Usage
18+
19+
### 1. Setup Play Store
20+
21+
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.
22+
23+
### 2. Setup Release Tracks
24+
25+
Play Store allows to upload apps on release tracks like internal, alpha, beta and production. Enable and setup the track you want to use, on Play Store console.
26+
27+
### 3. Get Service Account Key
28+
29+
To access Play Store API a JSON key file is needed.
30+
31+
i. Create Service Account:
32+
https://developers.google.com/android/management/service-account
33+
Download key.json:
34+
35+
ii. Go to https://console.developers.google.com/apis/credentials
36+
37+
iii. Select "Create credentials" > "Service Account key" and generate a new key for the Service that is associated to your Google Play service account.
38+
39+
### 4. Build apk file
40+
41+
Build signed production android apk file to upload. In case of a CI server, this file should be already generated.
42+
43+
### 4. Run Upload Command
44+
45+
Execute the binary, passing required data in arguments.
46+
47+
```bash
48+
PlayStoreUploader -key "key.json" -apk "app.apk" -track "alpha" -name "myApp" -notes "new release"
49+
```
50+
51+
#### CLI Options
52+
53+
Running without any arguments will print available argument options.
54+
55+
```bash
56+
Options:
57+
-apk VAL : The apk file to publish
58+
-key VAL : JSON key file of authorized service account
59+
-name VAL : (optional) AndroidPublisher name on Play Store (defaults to
60+
name in apk)
61+
-notes VAL : (optional) Release notes
62+
-notesFile VAL : (optional) Release notes from file
63+
-track VAL : Release track to use. Eg. internal, alpha, beta or production
64+
```
65+
66+
## Development
67+
68+
To build:
69+
70+
```bash
71+
mvn clean install
72+
```
73+
74+
Pull requests and suggestions are welcome.

pom.xml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starter-parent</artifactId>
8+
<version>2.1.3.RELEASE</version>
9+
<relativePath/>
10+
</parent>
11+
<groupId>com.rg</groupId>
12+
<artifactId>release-manager</artifactId>
13+
<version>1.0</version>
14+
<name>app-release-manager</name>
15+
<description>Publishes APK File to Google Play Store</description>
16+
17+
<properties>
18+
<java.version>1.8</java.version>
19+
</properties>
20+
21+
<dependencies>
22+
<dependency>
23+
<groupId>org.springframework.boot</groupId>
24+
<artifactId>spring-boot-starter</artifactId>
25+
</dependency>
26+
27+
<dependency>
28+
<groupId>org.projectlombok</groupId>
29+
<artifactId>lombok</artifactId>
30+
<optional>true</optional>
31+
</dependency>
32+
<dependency>
33+
<groupId>net.dongliu</groupId>
34+
<artifactId>apk-parser</artifactId>
35+
<version>2.6.6</version>
36+
</dependency>
37+
<dependency>
38+
<groupId>commons-logging</groupId>
39+
<artifactId>commons-logging</artifactId>
40+
<version>1.2</version>
41+
</dependency>
42+
<dependency>
43+
<groupId>com.google.api-client</groupId>
44+
<artifactId>google-api-client</artifactId>
45+
<version>1.28.0</version>
46+
</dependency>
47+
<dependency>
48+
<groupId>com.google.apis</groupId>
49+
<artifactId>google-api-services-androidpublisher</artifactId>
50+
<version>v3-rev66-1.25.0</version>
51+
</dependency>
52+
<dependency>
53+
<groupId>com.google.http-client</groupId>
54+
<artifactId>google-http-client</artifactId>
55+
<version>1.28.0</version>
56+
</dependency>
57+
<dependency>
58+
<groupId>com.google.http-client</groupId>
59+
<artifactId>google-http-client-jackson2</artifactId>
60+
<version>1.28.0</version>
61+
</dependency>
62+
<dependency>
63+
<groupId>com.google.oauth-client</groupId>
64+
<artifactId>google-oauth-client</artifactId>
65+
<version>1.28.0</version>
66+
</dependency>
67+
<dependency>
68+
<groupId>com.google.guava</groupId>
69+
<artifactId>guava</artifactId>
70+
<version>23.0</version>
71+
</dependency>
72+
<dependency>
73+
<groupId>org.apache.httpcomponents</groupId>
74+
<artifactId>httpclient</artifactId>
75+
<version>4.5.7</version>
76+
</dependency>
77+
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
78+
<dependency>
79+
<groupId>org.apache.httpcomponents</groupId>
80+
<artifactId>httpcore</artifactId>
81+
<version>4.4.11</version>
82+
</dependency>
83+
<dependency>
84+
<groupId>com.google.j2objc</groupId>
85+
<artifactId>j2objc-annotations</artifactId>
86+
<version>1.3</version>
87+
</dependency>
88+
<dependency>
89+
<groupId>com.fasterxml.jackson.core</groupId>
90+
<artifactId>jackson-core</artifactId>
91+
<version>2.9.8</version>
92+
</dependency>
93+
<dependency>
94+
<groupId>com.google.code.findbugs</groupId>
95+
<artifactId>jsr305</artifactId>
96+
<version>3.0.2</version>
97+
</dependency>
98+
<dependency>
99+
<groupId>args4j</groupId>
100+
<artifactId>args4j</artifactId>
101+
<version>2.33</version>
102+
</dependency>
103+
<dependency>
104+
<groupId>org.springframework.boot</groupId>
105+
<artifactId>spring-boot-starter-test</artifactId>
106+
<scope>test</scope>
107+
</dependency>
108+
</dependencies>
109+
110+
<build>
111+
<plugins>
112+
<plugin>
113+
<groupId>org.springframework.boot</groupId>
114+
<artifactId>spring-boot-maven-plugin</artifactId>
115+
</plugin>
116+
</plugins>
117+
</build>
118+
119+
</project>

0 commit comments

Comments
 (0)