|
1 | 1 | # TopToast |
2 | | -[](https://github.com/aliernfrog/top-toast-compose/packages) |
3 | | -[](https://jitpack.io/#aliernfrog/top-toast-compose) |
| 2 | +[](https://jitpack.io/#aliernfrog/top-toast-compose) |
| 3 | +[](https://github.com/aliernfrog/top-toast-compose/packages) |
4 | 4 |
|
5 | 5 | Toast library for Jetpack Compose |
6 | 6 |
|
7 | 7 | ## 👀 Try it out |
8 | 8 | You can try TopToast by downloading demo application from [releases](https://github.com/aliernfrog/top-toast-compose/releases) |
9 | 9 |
|
10 | 10 | ## 📥 Installation |
11 | | -You can get the library from GitHub Packages or JitPack |
12 | | -### GitHub Packages |
13 | | -- Create a GitHub PAT with `read:packages` scope |
14 | | -- Put the PAT and your GitHub username in global/project `gradle.properties`: |
15 | | - ``` |
16 | | - gpr.user=MyUserName |
17 | | - gpr.key=MyPAT |
18 | | - ``` |
19 | | - or supply `GITHUB_ACTOR` (username) and `GITHUB_TOKEN` (PAT) in environment variables |
20 | | -- Add maven repository: (Kotlin) |
21 | | - ```kts |
22 | | - maven(url = "https://maven.pkg.github.com/aliernfrog/top-toast-compose") { |
23 | | - credentials { |
24 | | - username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("GITHUB_ACTOR") |
25 | | - password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("GITHUB_TOKEN") |
26 | | - } |
27 | | - } |
28 | | - ``` |
29 | | -- Add dependency: (Kotlin) |
30 | | - ```kts |
31 | | - implementation("aliernfrog:top-toast-compose:<VERSION>") |
32 | | - ``` |
33 | | - |
34 | | -### JitPack |
35 | | -> [!WARNING] |
36 | | -> As JitPack now fails to build with no reason, latest versions available on JitPack are `1.3.4` and `1.3.5-alpha01`. |
37 | | -> It may or may not be updated in the future. |
38 | | -- Add maven repository: (Kotlin) |
39 | | - ```kts |
40 | | - maven(url = "https://jitpack.io") |
41 | | - ``` |
42 | | -- Add dependency: (Kotlin) |
43 | | - ```kts |
44 | | - implementation("com.github.aliernfrog:top-toast-compose:<VERSION>") |
45 | | - ``` |
| 11 | +<details open> |
| 12 | + <summary>JitPack</summary> |
| 13 | + |
| 14 | + - Add maven repository: (Kotlin) |
| 15 | + ```kts |
| 16 | + maven(url = "https://jitpack.io") |
| 17 | + ``` |
| 18 | + - Add dependency: (Kotlin) |
| 19 | + ```kts |
| 20 | + implementation("com.github.aliernfrog:top-toast-compose:<VERSION>") |
| 21 | + ``` |
| 22 | +</details> |
| 23 | +<details> |
| 24 | + <summary>GitHub Packages</summary> |
| 25 | + |
| 26 | + - Create a GitHub PAT with `read:packages` scope |
| 27 | + - Put the PAT and your GitHub username in global/project `gradle.properties`: |
| 28 | + ``` |
| 29 | + gpr.user=MyUserName |
| 30 | + gpr.key=MyPAT |
| 31 | + ``` |
| 32 | + or supply `GITHUB_ACTOR` (username) and `GITHUB_TOKEN` (PAT) in environment variables |
| 33 | + - Add maven repository: (Kotlin) |
| 34 | + ```kts |
| 35 | + maven(url = "https://maven.pkg.github.com/aliernfrog/top-toast-compose") { |
| 36 | + credentials { |
| 37 | + username = providers.gradleProperty("gpr.user").orNull ?: System.getenv("GITHUB_ACTOR") |
| 38 | + password = providers.gradleProperty("gpr.key").orNull ?: System.getenv("GITHUB_TOKEN") |
| 39 | + } |
| 40 | + } |
| 41 | + ``` |
| 42 | + - Add dependency: (Kotlin) |
| 43 | + ```kts |
| 44 | + implementation("aliernfrog:top-toast-compose:<VERSION>") |
| 45 | + ``` |
| 46 | +</details> |
46 | 47 |
|
47 | 48 | ## 🍞 Example usage |
48 | 49 | ```kotlin |
|
0 commit comments