Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -120,32 +120,32 @@ publishing {

##### Example using Kotlin DSL for multiple packages in the same repository

```shell
plugins {
`maven-publish` apply false
}
subprojects {
apply(plugin = "maven-publish")
configure<PublishingExtension> {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://{% if currentVersion == "free-pro-team@latest" %}maven.pkg.github.com{% else %}<em>REGISTRY-URL</em>{% endif %}/<em>OWNER</em>/<em>REPOSITORY</em>")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("<em>USERNAME</em>")
password = project.findProperty("gpr.key") as String? ?: System.getenv("<em>TOKEN</em>")
}
}
}
publications {
register<MavenPublication>("gpr") {
from(components["java"])
}
}
}
}
```
```shell
plugins {
`maven-publish` apply false
}

subprojects {
apply(plugin = "maven-publish")
configure<PublishingExtension> {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://{% if currentVersion == "free-pro-team@latest" %}maven.pkg.github.com{% else %}<em>REGISTRY-URL</em>{% endif %}/<em>OWNER</em>/<em>REPOSITORY</em>")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("<em>USERNAME</em>")
password = project.findProperty("gpr.key") as String? ?: System.getenv("<em>TOKEN</em>")
}
}
}
publications {
register<MavenPublication>("gpr") {
from(components["java"])
}
}
}
}
```

#### Authenticating with the `GITHUB_TOKEN`

Expand Down Expand Up @@ -176,13 +176,13 @@ You can install a package by adding the package as a dependency to your project.
Example using Grady Groovy:
```shell
dependencies {
implementation 'com.example:package'
implementation 'com.example:package'
}
```
Example using Kotlin DSL:
```shell
dependencies {
implementation("com.example:package")
implementation("com.example:package")
}
```

Expand All @@ -191,13 +191,13 @@ You can install a package by adding the package as a dependency to your project.
Example using Grady Groovy:
```shell
plugins {
id 'maven'
id 'maven'
}
```
Example using Kotlin DSL:
```shell
plugins {
`maven`
`maven`
}
```

Expand Down