Samsung publisher gradle plugin is Android's unofficial release automation Gradle Plugin. It helps you automate uploading of apk to samsung store. The plugin haven't sent for review yet, it just downloads the apk
Follow to Samsung store and create service account with "Publishing & ITEM" permission.
Save Private Key
and Service Account ID
Next, open the application list and click on application.
You will see a link like that https://seller.samsungapps.com/application/main.as?contentId=000000000000
.
Save contentId
from link
Kotlin
//app build.gradle.kts
plugins {
id("ru.litres.plugin.publish.samsung") version "{last_version}"
}
Groovy
//app build.gradle.kts
plugins {
id 'ru.litres.plugin.publish.samsung' version '{latest_version}'
}
Legacy
Kotlin
//root build.gradle.kts
dependencies {
classpath("ru.litres.plugin:plugin:{latest_version}")
}
//app build.gradle.kts
apply(plugin = "ru.litres.plugin.publish.samsung")
Groovy
//root build.gradle.kts
dependencies {
classpath "ru.litres.plugin:plugin:{latest_version}"
}
//app build.gradle.kts
apply plugin: "ru.litres.plugin.publish.samsung"
Kotlin
android { ... }
samsungPublishConfig {
//private key from service account
privateKey.set(
"-----BEGIN RSA PRIVATE KEY-----\n" +
"....\n" +
"......\n" +
"-----END RSA PRIVATE KEY-----"
)
//Service Account ID from service account
serviceAccountId.set("....")
//Directory where plugin should find release apk.
//Plugin searches by extension .apk and gets first file
artifactDir.set(File("build/output"))
//Object with app setting
publishSetting {
//contentId from url
contentId = "..."
}
}
Groovy
android { ... }
samsungPublishConfig {
//private key from service account
privateKey.set(
"-----BEGIN RSA PRIVATE KEY-----\n" +
"....\n" +
"......\n" +
"-----END RSA PRIVATE KEY-----"
)
//Service Account ID from service account
serviceAccountId.set("....")
//Directory where plugin should find release apk.
//Plugin searches by extension .apk and gets first file
artifactDir.set(file("./build/output"))
//Object with app setting
publishSetting {
//contentId from url
contentId = "..."
}
}
And finally if your configuration is correct you can use gradle task samsungPublish
for upload apk
Field | Type | Description | Default value |
---|---|---|---|
contentId | String | Application id which you get from url | - |
defaultLanguageCode | String | The language in which you provide application information. See Language codes for a list of supported languages. | "RUS" |
paid | Boolean | Whether app download requires a user payment | false |
hasGoogleService | Boolean | Whether the app provides the user with any Google™ services | true |