mirror of
https://github.com/material-components/material-components-android.git
synced 2026-01-09 07:11:07 +08:00
[Snapshots] Add note about required scope for accessing snapshot repo
Resolves https://github.com/material-components/material-components-android/pull/1809 GIT_ORIGIN_REV_ID=8be49f3880de2691d85faabcde809e878f83b498 PiperOrigin-RevId: 340224359
This commit is contained in:
parent
191a48bd8a
commit
dc1a7fb7c1
@ -14,16 +14,18 @@ that are published daily via
|
||||
[GitHub Packages](https://help.github.com/en/packages/publishing-and-managing-packages/about-github-packages).
|
||||
|
||||
To do so, you need to
|
||||
[create a GitHub access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line#creating-a-token),
|
||||
and add the following to your `build.gradle` Maven repositories:
|
||||
[create a GitHub access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line#creating-a-token)
|
||||
with the `read:packages` scope, and add the following to your `build.gradle`
|
||||
Maven repositories, replacing `<github_username>` and `<github_access_token>`
|
||||
with your credentials:
|
||||
|
||||
```groovy
|
||||
maven {
|
||||
name = "MaterialSnapshots"
|
||||
url = uri("https://maven.pkg.github.com/material-components/material-components-android")
|
||||
credentials {
|
||||
username = <github_username>
|
||||
password = <github_access_token>
|
||||
username = "<github_username>"
|
||||
password = "<github_access_token>"
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -46,6 +48,26 @@ If you prefer to depend on a specific snapshot version, you can add
|
||||
all versions
|
||||
[here](https://github.com/material-components/material-components-android/packages/81484/versions)).
|
||||
|
||||
You can also find the list of versions through the
|
||||
[GraphQL explorer](https://developer.github.com/v4/explorer/) with the following
|
||||
query:
|
||||
|
||||
```graphql
|
||||
{
|
||||
node(id: "MDE0OlBhY2thZ2VWZXJzaW9uMjMyNDc2OQ==") {
|
||||
... on PackageVersion {
|
||||
id
|
||||
version
|
||||
files(last: 12, orderBy: {field: CREATED_AT, direction: ASC}) {
|
||||
nodes {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Alternatively, you could use
|
||||
[JitPack](https://jitpack.io/#material-components/material-components-android)
|
||||
to generate library releases based on specific commits.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user