pachli-android/plugins/markdown2resource
renovate[bot] 62517036b4
fix(deps): update dependency org.jetbrains:markdown to v0.7.0 (#607)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.jetbrains:markdown](https://togithub.com/JetBrains/markdown) |
`0.6.1` -> `0.7.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains:markdown/0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains:markdown/0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains:markdown/0.6.1/0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains:markdown/0.6.1/0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>JetBrains/markdown (org.jetbrains:markdown)</summary>

###
[`v0.7.0`](https://togithub.com/JetBrains/markdown/blob/HEAD/CHANGELOG.md#070)

- \[[#&#8203;133](https://togithub.com/JetBrains/markdown/issues/133)]
Added support for mathematical expressions in GFM
- \[[#&#8203;140](https://togithub.com/JetBrains/markdown/issues/140)]
Added wasmJs target
- \[[#&#8203;146](https://togithub.com/JetBrains/markdown/issues/146)]
Added linuxArm64 target
- \[[#&#8203;149](https://togithub.com/JetBrains/markdown/issues/149)]
Fixed parsing of code spans with backslashes and spaces

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-10 09:36:15 +02:00
..
src/main/kotlin/app/pachli/plugins/markdown2resource refactor: Modularise "about" activities (#405) 2024-02-02 15:14:31 +01:00
README.md feat: Embed the privacy policy in the app (#139) 2023-10-03 12:56:30 +02:00
build.gradle.kts fix(deps): update dependency org.jetbrains:markdown to v0.7.0 (#607) 2024-04-10 09:36:15 +02:00
gradle.properties refactor: Start creating core modules (#286) 2023-12-04 16:58:36 +01:00
settings.gradle.kts refactor: Start creating core modules (#286) 2023-12-04 16:58:36 +01:00

README.md

markdown2resource-plugin

Synopsis

Gradle plugin to convert one or more Markdown files to Java files with static constants where the Markdown has been converted to HTML. Similar (but not quite identical) to Android resources.

Example

In build.gradle:

// Install the plugin
plugins {
    id "app.pachli.plugins.markdown2resource"
}

// ...

// Configure the files to be processed
markdown2resource {
    files = [ layout.projectDirectory.file('../PRIVACY.md') ]
}

In code:

// Assume binding.privacyPolicy references a `WebView`

// The generated string constant is in the `markdownR.html` package, named
// `PRIVACY_md`. To load the content in to a WebView it must be converted to
// base64
val html = Base64.encodeToString(markdownR.html.PRIVACY_md.toByteArray(), Base64.NO_PADDING)
binding.privacyPolicy.loadData(html, "text/html", "base64")

Configuration

The markdown2resource block supports the following options.

files - a list of RegularFile in Markdown.

packageName - the package name to use for the generated resources. Default is the android.namespace of the build variant.

resourceClassName - the outer class name to use for the generated resources. Default is markdownR.

stringClassName - the inner class name to use for the generated resources. Default is html.

Tasks

The plugin creates N tasks, one for each configured build variant, named markdown2resource${variant.name.capitalized()}

For example:

  1. You have defined debug and release build types, two tasks will be created, markdown2resourceDebug and markdown2resourceRelease.
  2. You have defined debug and release build types and demo and full product flavours, four tasks will be created, markdown2resourceDemoDebug, markdown2resourceDemoRelease, markdown2resourceFullDebug, markdown2resourceFullRelease.