Giter Club home page Giter Club logo

Comments (6)

cosic avatar cosic commented on May 27, 2024 1

@rtsisyk Hi! In 1.4.1 version has been found a small issue. Please try 1.4.2.

from huawei-appgallery-publish-gradle-plugin.

cosic avatar cosic commented on May 27, 2024

@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?

from huawei-appgallery-publish-gradle-plugin.

rtsisyk avatar rtsisyk commented on May 27, 2024

The best option would be to support Triple-T structure out of the box.

from huawei-appgallery-publish-gradle-plugin.

cosic avatar cosic commented on May 27, 2024

@rtsisyk How does Triple-T Release Notes structure help us to solve problem that AppGallery doesn't support html tags?

from huawei-appgallery-publish-gradle-plugin.

cosic avatar cosic commented on May 27, 2024

@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)
    }
  }
}

from huawei-appgallery-publish-gradle-plugin.

rtsisyk avatar rtsisyk commented on May 27, 2024

@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.

Wow, fantastic! Sorry for the silence. I will try.

from huawei-appgallery-publish-gradle-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.