Closed rtsisyk closed 8 months ago
@rtsisyk Hi! I don't like idea to add some html tags stripper into the plugin because it should be stupid and not thinging about what a release notes text it got. But inspired your idea I'm going to add new param text
which would hight priorited then filePath
. So you can create function in gradle build script wich would fetch release noted and strip html from text on your side.
For example
huaweiPublish {
instances {
create("release") {
releaseNotes = listOf(
ru.cian.huawei.publish.ReleaseNote(
lang = "ru-RU",
text = getReleaseNotes("$projectDir/release-notes-ru.txt")
),
ru.cian.huawei.publish.ReleaseNote(
lang = "en-US",
text = getReleaseNotes("$projectDir/release-notes-en.txt")
)
)
}
}
}
and
fun getReleaseNotes(filePath: String): String {
return File(filePath).readAll().replaceAll("\\<[^>]*>","")
}
What do you think about it?
The best option would be to support Triple-T structure out of the box.
@rtsisyk How does Triple-T Release Notes structure help us to solve problem that AppGallery doesn't support html tags?
@rtsisyk Hi! Please try a new 1.4.1-SNAPSHOT
version with a new removeHtmlTags
parameter. For more information see README/snapshot-1.4.1.
Pay attention I've changed releaseNotes
block. Instead of
releaseNotes = listOf(
ru.cian.rustore.publish.ReleaseNote(
lang = "en-US",
filePath = "$projectDir/release-notes-en.txt"
),
)
new configuration
releaseNotes = ru.cian.huawei.publish.ReleaseNotesExtension(
descriptions = listOf(
ru.cian.huawei.publish.ReleaseNote(
lang = "en-US",
filePath = "$projectDir/release-notes-en.txt"
)
),
removeHtmlTags = false
)
And I remember you are using a trick to support Google Play languages. A new version should be
huaweiPublish {
instances {
huaweiRelease {
credentialsPath = "$rootDir/huawei-appgallery.json"
buildFormat = 'aab'
deployType = 'draft' // confirm manually
releaseDescriptions = []
def localeOverride = [
'am' : 'am-ET',
'gu': 'gu_IN',
'iw-IL': 'he_IL',
'kn-IN': 'kn_IN',
'ml-IN': 'ml_IN',
'mn-MN': 'mn_MN',
'mr-IN': 'mr_IN',
'ta-IN': 'ta_IN',
'te-IN': 'te_IN',
]
def files = fileTree(dir: "$projectDir/src/google/play/release-notes",
include: '**/default.txt')
files.each { File file ->
def path = file.getPath()
def locale = file.parentFile.getName()
locale = localeOverride.get(locale, locale)
releaseDescriptions.add(new ru.cian.huawei.publish.ReleaseNote(locale, path))
}
releaseNotes = new ru.cian.huawei.publish.ReleaseNotesExtension(releaseDescriptions, true)
}
}
}
@rtsisyk Hi! Please try a new
1.4.1-SNAPSHOT
version with a newremoveHtmlTags
parameter. For more information see README/snapshot-1.4.1.
Wow, fantastic! Sorry for the silence. I will try.
It looks like that Huawei's AppGallery doesn't support HTML tags in the release notes and description, like Google Play does.
Please consider adding automated stripping of HTML tags to allow sharing of the same description with Google Play.