@tonycodes-ui/mortar 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/catalog.json +119 -119
- package/dist/agent-data.json +1 -1
- package/docs/native.md +28 -4
- package/package.json +1 -1
package/docs/native.md
CHANGED
|
@@ -77,16 +77,40 @@ Rendering differs between iOS versions, so the reference images are recorded on
|
|
|
77
77
|
|
|
78
78
|
## Jetpack Compose
|
|
79
79
|
|
|
80
|
-
The library is in `native/android` (module `mortar`, package `codes.tony.mortar`) for Android 7.0 (API 24) and later.
|
|
80
|
+
The library is in `native/android` (module `mortar`, package `codes.tony.mortar`) for Android 7.0 (API 24) and later. Each Mortar release publishes it to [GitHub Packages](https://github.com/tonycodes/mortar/packages) at the npm package's version. GitHub's Maven registry asks for a token even for public packages, so add the repository in `settings.gradle.kts` with a GitHub username and a personal access token that has `read:packages`, kept out of source control (here in `~/.gradle/gradle.properties`):
|
|
81
81
|
|
|
82
|
-
```
|
|
83
|
-
|
|
82
|
+
```kotlin
|
|
83
|
+
dependencyResolutionManagement {
|
|
84
|
+
repositories {
|
|
85
|
+
google()
|
|
86
|
+
mavenCentral()
|
|
87
|
+
maven("https://maven.pkg.github.com/tonycodes/mortar") {
|
|
88
|
+
credentials {
|
|
89
|
+
username = providers.gradleProperty("gpr.user").get()
|
|
90
|
+
password = providers.gradleProperty("gpr.key").get()
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
84
95
|
```
|
|
85
96
|
|
|
97
|
+
Then the dependency, at the same version as `@tonycodes-ui/mortar`:
|
|
98
|
+
|
|
86
99
|
```kotlin
|
|
87
|
-
|
|
100
|
+
// The release that adds publishing (#95) is the first in GitHub Packages.
|
|
101
|
+
implementation("codes.tony:mortar:0.21.0")
|
|
88
102
|
```
|
|
89
103
|
|
|
104
|
+
To try unreleased changes, build the library into your local Maven repository with Gradle 8.11 and JDK 17 and depend on `0.0.0-local`:
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
gradle -p native/android :mortar:publishToMavenLocal -Pversion=0.0.0-local
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Publishing
|
|
111
|
+
|
|
112
|
+
`.github/workflows/publish-android.yml` runs after each successful **Release package** run on main. It finds the release tag on the released commit (a run that released nothing leaves none), skips a version GitHub Packages already has, and publishes `codes.tony:mortar:<version>` with `gradle :mortar:publishReleasePublicationToGitHubPackagesRepository`. It publishes with the run's own `GITHUB_TOKEN` and `packages: write`, so no secret is stored, and it has no manual trigger, so a version is only published from its release. The release policy test (R-AR-17) keeps it that way: read-only contents, no ref writes, no secrets.
|
|
113
|
+
|
|
90
114
|
Theme the app once near its root, then use the components:
|
|
91
115
|
|
|
92
116
|
```kotlin
|