Skip to content

Commit

Permalink
readme, replace table on sepparated params description
Browse files Browse the repository at this point in the history
  • Loading branch information
cosic committed Dec 18, 2023
1 parent da60c07 commit dbf1308
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 44 deletions.
189 changes: 145 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
[comment]: # (Markdown formating https://docs.github.com/ru/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)

[//]: # (![screenshot](docs/screenshots/cian_logo.png))
[//]: # (![screenshot](docs/screenshots/huawei_appgallery_icon.jpeg))

<img src="docs/screenshots/cian_logo.png" width="200">
<img src="docs/screenshots/huawei_appgallery_icon.png" width="300">

# Huawei App Gallery Publishing

[![Maven Central](https://img.shields.io/maven-central/v/ru.cian/huawei-publish-gradle-plugin.svg)](https://search.maven.org/search?q=a:huawei-publish-gradle-plugin)
Expand Down Expand Up @@ -28,21 +34,21 @@ For publication the plugin used official [Huawei Publish API (v2)](https://devel

The following features are available:

- [x] :white_check_mark: Publish APK or AAB build file in Huawei AppGallery
- [x] :white_check_mark: Submit the build on all users after getting store approve
- [x] :white_check_mark: Publish the build on a part of users (Release Phases)
- [x] :white_check_mark: Update Release Notes for publishing build (Release Notes)
- [x] :white_check_mark: Update App Basic Info for publishing build
- [x] :white_check_mark: Separated settings for different configurations build types and flavors
- [x] :white_check_mark: Support of Gradle Portal and Gradle DSL
- [x] :white_check_mark: Support of Gradle 8.+
- [x] :white_check_mark: Support of Configuration Cache
- [ ] :children_crossing: Change App Store Information: description, app icon, screenshots and etc.
- :white_check_mark: Publish APK or AAB build file in Huawei AppGallery
- :white_check_mark: Submit the build on all users after getting store approve
- :white_check_mark: Publish the build on a part of users (Release Phases)
- :white_check_mark: Update Release Notes for publishing build (Release Notes)
- :white_check_mark: Update App Basic Info for publishing build
- :white_check_mark: Separated settings for different configurations build types and flavors
- :white_check_mark: Support of Gradle Portal and Gradle DSL
- :white_check_mark: Support of Gradle 8.+
- :white_check_mark: Support of Configuration Cache
- :children_crossing: Change App Store Information: description, app icon, screenshots and etc.

The following features doesn't support Huawei Publishing API:

- [ ] :no_entry: Update appname, title and description.
- [ ] :no_entry: Rollout Holding
- :no_entry: Update appname, title and description.
- :no_entry: Rollout Holding

# Compatibility
The Android Gradle Plugin often changes the Variant API,
Expand Down Expand Up @@ -254,38 +260,133 @@ File `huawei-credentials.json` contains next json structure:
How to get credentials see [AppGallery Connect API Getting Started](https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agcapi-getstarted).

## Plugin params
Where Priority(P), Required(R), Optional(O)

| param | P | type | default value | cli | description |
|--------------------|---|--------------|---------------|--------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `credentialsPath` | O | string | null | `--credentialsPath` | Path to json file with AppGallery credentials params (`client_id` and `client_secret`) |
| `deployType` | O | string | "publish" | `--deployType` | '`publish`' to deploy and submit build on users,<br>'`draft`' to deploy and save as draft without submit on users,<br>'`upload-only`' to deploy without draft saving and submit on users |
| `publishTimeoutMs` | O | long | 600000 #(10m) | `--publishTimeoutMs` | The time in millis during which the plugin periodically tries to publish the build |
| `publishPeriodMs` | O | long | 15000 #(15s) | `--publishPeriodMs` | The period in millis between tries to publish the build |
| `buildFormat` | O | string | "apk" | `--buildFormat` | 'apk' or 'aab' for corresponding build format |
| `buildFile` | O | string | null | `--buildFile` | Path to build file. "null" means use standard path for "apk" and "aab" files. |
| `releaseTime` | O | string | null | `--releaseTime` | Release time after review in UTC format. The format is 'yyyy-MM-dd'T'HH:mm:ssZZ'. |
| `releasePhase` | O | ReleasePhase | null | (see ReleasePhase param desc.) | Release Phase settings. For mote info see documentation below. |
| `releaseNotes` | O | ReleaseNotes | null | (see ReleaseNotes param desc.) | Release Notes settings. For mote info see documentation below. |
| `appBasicInfo` | O | string | null | `--appBasicInfo` | Path to json file with params to update app basic info [api](https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agcapi-app-info-update-0000001111685198)) |

other params

| ReleasePhase(Object) | P | type | default value | cli | description |
|----------------------|---|---------|---------------|---------------------------|------------------------------------------------------------------------------------------------------------|
| `startTime` | R | string | null | `--releasePhaseStartTime` | Start release time after review in UTC format. The format is 'yyyy-MM-dd'T'HH:mm:ssZZ'. |
| `endTime` | R | string | null | `--releasePhaseEndTime` | End release time after review in UTC format. The format is 'yyyy-MM-dd'T'HH:mm:ssZZ'. |
| `percent` | R | string | null | `--releasePhasePercent` | Percentage of target users of release by phase. The integer or decimal value from 0 to 100. |

| ReleaseNotes(Object) | P | type | default value | cli | description |
|----------------------|---|-------------------|---------------|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `descriptions` | R | List<ReleaseNote> | null | (See `--releaseNotes` desc.) | Release Notes by languages. For mote info see documentation below. |
| `removeHtmlTags` | O | boolean | false | (See `--removeHtmlTags` desc.) | :warning: EXPERIMENTAL: True - if needs to remove html tags from provided release notes. For example, to support Google Play release notes. |

| ReleaseNote(Object) | P | type | default value | cli | description |
|----------------------|---|---------|---------------|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `lang` | R | string | null | (See `--releaseNotes` desc.) | [Langtype](https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agcapi-reference-langtype-0000001158245079)|
| `filePath` | R | string | null | (See `--releaseNotes` desc.) | Absolutely path to file with Release Notes for current `lang`. Release notes text must be less or equals to 500 sign. |

### Base level params

#### `credentialsPath`
Priority: Optional<br>
Type: String<br>
Default value: `null`<br>
CLI: `--credentialsPath`<br>
Description: Path to json file with AppGallery credentials params (`client_id` and `client_secret`)

#### `deployType`
Priority: Optional<br>
Type: String<br>
Default value: `publish`<br>
CLI: `--deployType`<br>
Description: '`publish`' to deploy and submit build on users,<br>'`draft`' to deploy and save as draft without submit on users,<br>'`upload-only`' to deploy without draft saving and submit on users

#### `publishTimeoutMs`
Priority: Optional<br>
Type: long<br>
Default value: `600000` // (10min)<br>
CLI: `--publishTimeoutMs`<br>
Description: The time in millis during which the plugin periodically tries to publish the build

#### `publishPeriodMs`
Priority: Optional<br>
Type: long<br>
Default value: `15000` // (15sec)<br>
CLI: `--publishPeriodMs`<br>
Description: The period in millis between tries to publish the build

#### `buildFormat`
Priority: Optional<br>
Type: String<br>
Default value: `apk`<br>
CLI: `--buildFormat`<br>
Description: 'apk' or 'aab' for corresponding build format.

#### `buildFile`
Priority: Optional<br>
Type: String<br>
Default value: `null`<br>
CLI: `--buildFile`<br>
Description: Path to build file. "null" means use standard path for "apk" and "aab" files.

#### `releaseTime`
Priority: Optional<br>
Type: string<br>
Default value: `null`<br>
CLI: `--releaseTime`<br>
Description: Release time after review in UTC format. The format is 'yyyy-MM-dd'T'HH:mm:ssZZ'.

#### `releasePhase`
Priority: Optional<br>
Type: ReleasePhase<br>
Default value: `null`<br>
CLI: (see ReleasePhase param desc.)<br>
Description: Release Phase settings. For mote info see documentation below.

#### `releaseNotes`
Priority: Optional<br>
Type: ReleaseNotes<br>
Default value: `null`<br>
CLI: (see ReleaseNotes param desc.)<br>
Description: Release Notes settings. For mote info see documentation below.

#### `appBasicInfo`
Priority: Optional<br>
Type: string<br>
Default value: `null`<br>
CLI: `--appBasicInfo`<br>
Description: Path to json file with params to update app basic info [Huawei Publish API](https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agcapi-app-info-update-0000001111685198))

### ReleasePhase

#### `startTime`
Priority: Required<br>
Type: string<br>
Default value: `null`<br>
CLI: `--releasePhaseStartTime`<br>
Description: Start release time after review in UTC format. The format is 'yyyy-MM-dd'T'HH:mm:ssZZ'.

#### `endTime`
Priority: Required<br>
Type: string<br>
Default value: `null`<br>
CLI: `--releasePhaseEndTime`<br>
Description: End release time after review in UTC format. The format is 'yyyy-MM-dd'T'HH:mm:ssZZ'.

#### `percent`
Priority: Required<br>
Type: string<br>
Default value: `null`<br>
CLI: `--releasePhasePercent`<br>
Description: Percentage of target users of release by phase. The integer or decimal value from 0 to 100.

### ReleaseNotes

#### `descriptions`
Priority: Required<br>
Type: List<ReleaseNote><br>
Default value: `null`<br>
CLI: (See `--releaseNotes` desc.)<br>
Description: Release Notes by languages. For mote info see documentation below.

#### `removeHtmlTags`
Priority: Optional<br>
Type: boolean<br>
Default value: `false`<br>
CLI: (See `--removeHtmlTags` desc.)<br>
Description: :warning: EXPERIMENTAL: True - if needs to remove html tags from provided release notes. For example, to support Google Play release notes.

### ReleaseNote

#### `lang`
Priority: Required<br>
Type: string<br>
Default value: `null`<br>
CLI: (See `--releaseNotes` desc.)<br>
Description: [Langtype](https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agcapi-reference-langtype-0000001158245079)

#### `filePath`
Priority: Required<br>
Type: string<br>
Default value: `null`<br>
CLI: (See `--releaseNotes` desc.)<br>
Description: Absolutely path to file with Release Notes for current `lang`. Release notes text must be less or equals to 500 sign.

For CLI `--releaseNotes` use string type with format: `<lang_1>:<releaseNotes_FilePath_1>;<lang_2>:<releaseNotes_FilePath_2>`.

Expand Down
Binary file added docs/screenshots/cian_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screenshots/huawei_appgallery_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dbf1308

Please sign in to comment.