cianru / huawei-appgallery-publish-gradle-plugin

Huawei AppGallery Publish Gradle Plugin allows you to publish the android release build file (*.apk or *.aab) to the Huawei AppGallery store
Apache License 2.0
111 stars 20 forks source link

Allow to set clientId and ClientKey via gradle properties #9

Closed MazyNoc closed 3 years ago

MazyNoc commented 3 years ago

Right now, the client id and key must be in a json file which makes it harder to "hide" the values locally (of course, we could put the file in .gitIgnore or outside the project, but a nicer approach would be to allow it to be populated directly in the huaweiPublish tag

example :

huaweiPublish {
    instances {
        release {
           // credentialsPath = "$rootDir/app/huawei-credentials.json"
            clientId = project.property("huawei_client_id")            
            clientSecret = project.property("huawei_client_secret")            // secret as from PR #8
            buildFormat = "apk"
            publish = false
        }
    }
}

This allows the user to just add these variables into the global gradle.properties and share that file among developers (one file for all projects)

MazyNoc commented 3 years ago

There is no reason to remove the current credentialsPath, just clarify which ones are taking precedence in the documentation

CedrickFlocon commented 3 years ago

https://github.com/cianru/huawei-publish-gradle-plugin/pull/8#discussion_r500802383

cosic commented 3 years ago

Released at v1.2.1