Skip to content

Commit

Permalink
Update dependencies and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cosic committed Aug 23, 2020
1 parent fcc6609 commit a3be793
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 7 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Support `Gradle v4.1+`
LAST_RELEASE_VERSION = 1.0.0
```
```
LAST_SNAPSHOT_VERSION = 1.1.0-SNAPSHOT
LAST_SNAPSHOT_VERSION = 1.0.1-SNAPSHOT
```
# Adding the plugin to your project

Expand All @@ -31,9 +31,11 @@ huaweiPublish {
instances {
release {
credentialsPath = "$rootDir/huawei-credentials-release.json"
publish = true
}
debug {
credentialsPath = "$rootDir/huawei-credentials-debug.json"
publish = true
}
}
}
Expand All @@ -46,9 +48,11 @@ huaweiPublish {
instances {
demoRelease {
credentialsPath = "$rootDir/huawei-credentials-demo-release.json"
publish = true
}
fullRelease {
credentialsPath = "$rootDir/huawei-credentials-full-release.json"
publish = true
}
}
}
Expand All @@ -63,6 +67,13 @@ File `huawei-credentials.json` contains next json structure:
```
Credentials you should get at Huawei AppGallery Developer Console.

#### Params

| param | priority | type | description |
|-----------------|----------|---------|--------------------------------------------------------------------------------------------------------|
| credentialsPath | required | string | File path with AppGallery credentials params (client_id and client_key) |
| publish | optional | boolean | true - upload build file and publish it on all users, <br>false - upload build file without publishing |

#### For Release Plugin version
```
buildscript {
Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ config.targetSdkVersion=29
ext.config = config

def versions = [:]
versions.kotlin = "1.4.0"
versions.kotlin = "1.3.72"
versions.java = "1.8"
ext.versions = versions

Expand Down
1 change: 1 addition & 0 deletions sample1/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ huaweiPublish {
instances {
release {
credentialsPath = "$rootDir/sample1/huawei-credentials.json"
publish = true
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions sample2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ buildscript {
huaweiPublish {
instances {
demoRelease {
credentialsPath = "$rootDir/sample1/huawei-credentials.json"
credentialsPath = "$rootDir/sample1/huawei-credentials-1.json"
publish = false
}
fullRelease {
credentialsPath = "$rootDir/sample1/huawei-credentials.json"
credentialsPath = "$rootDir/sample1/huawei-credentials-2.json"
publish = true
}
}
}
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions sample2/huawei-credentials-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"client_id": "<CLIENT_ID>",
"client_key": "<CLIENT_KEY>"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ open class HuaweiPublishExtension(
project: Project
) {

val instances = project.container(HuaweiPublishCredential::class.java) { name ->
HuaweiPublishCredential(name, project)
val instances = project.container(HuaweiPublishConfig::class.java) { name ->
HuaweiPublishConfig(name, project)
}

companion object {
const val NAME = "huaweiPublish"
}
}

class HuaweiPublishCredential(
class HuaweiPublishConfig(
val name: String,
project: Project
) {
Expand Down

0 comments on commit a3be793

Please sign in to comment.