diff --git a/README.md b/README.md
index 232063d..5a37f97 100644
--- a/README.md
+++ b/README.md
@@ -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
@@ -31,9 +31,11 @@ huaweiPublish {
instances {
release {
credentialsPath = "$rootDir/huawei-credentials-release.json"
+ publish = true
}
debug {
credentialsPath = "$rootDir/huawei-credentials-debug.json"
+ publish = true
}
}
}
@@ -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
}
}
}
@@ -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,
false - upload build file without publishing |
+
#### For Release Plugin version
```
buildscript {
diff --git a/dependencies.gradle b/dependencies.gradle
index be52b10..a182a14 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -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
diff --git a/sample1/build.gradle b/sample1/build.gradle
index 995af71..be165c9 100644
--- a/sample1/build.gradle
+++ b/sample1/build.gradle
@@ -17,6 +17,7 @@ huaweiPublish {
instances {
release {
credentialsPath = "$rootDir/sample1/huawei-credentials.json"
+ publish = true
}
}
}
diff --git a/sample2/build.gradle b/sample2/build.gradle
index ce7e481..45c788e 100644
--- a/sample2/build.gradle
+++ b/sample2/build.gradle
@@ -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
}
}
}
diff --git a/sample2/huawei-credentials.json b/sample2/huawei-credentials-1.json
similarity index 100%
rename from sample2/huawei-credentials.json
rename to sample2/huawei-credentials-1.json
diff --git a/sample2/huawei-credentials-2.json b/sample2/huawei-credentials-2.json
new file mode 100644
index 0000000..3dbc4b4
--- /dev/null
+++ b/sample2/huawei-credentials-2.json
@@ -0,0 +1,4 @@
+{
+ "client_id": "",
+ "client_key": ""
+}
\ No newline at end of file
diff --git a/src/main/kotlin/ru/cian/huawei/publish/HuaweiPublishExtension.kt b/src/main/kotlin/ru/cian/huawei/publish/HuaweiPublishExtension.kt
index 0e45cc3..49cd0fe 100644
--- a/src/main/kotlin/ru/cian/huawei/publish/HuaweiPublishExtension.kt
+++ b/src/main/kotlin/ru/cian/huawei/publish/HuaweiPublishExtension.kt
@@ -7,8 +7,8 @@ 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 {
@@ -16,7 +16,7 @@ open class HuaweiPublishExtension(
}
}
-class HuaweiPublishCredential(
+class HuaweiPublishConfig(
val name: String,
project: Project
) {