You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/packages/using-github-packages-with-your-projects-ecosystem/configuring-gradle-for-use-with-github-packages.md
+43-43Lines changed: 43 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -120,50 +120,50 @@ publishing {
120
120
121
121
##### Example using Kotlin DSL for multiple packages in the same repository
username = project.findProperty("gpr.user") as String??: System.getenv("<em>USERNAME</em>")
137
+
password = project.findProperty("gpr.key") as String??: System.getenv("<em>TOKEN</em>")
138
+
}
139
+
}
140
+
}
141
+
publications {
142
+
register<MavenPublication>("gpr") {
143
+
from(components["java"])
144
+
}
145
+
}
146
+
}
147
+
}
148
+
```
149
+
150
+
#### Authenticating with the `GITHUB_TOKEN`
151
+
152
+
{% data reusables.package_registry.package-registry-with-github-tokens %}
153
+
154
+
For more information about using `GITHUB_TOKEN` with Maven, see "[Publishing Java packages with Maven](/actions/language-and-framework-guides/publishing-java-packages-with-maven#publishing-packages-to-github-packages)."
155
+
156
+
### Publishing a package
157
+
158
+
{% data reusables.package_registry.default-name %} For example, {% data variables.product.prodname_dotcom %} will publish a package named `com.example.test` in the `OWNER/test` {% data variables.product.prodname_registry %} repository.
159
+
160
+
{% data reusables.package_registry.viewing-packages %}
161
+
162
+
{% data reusables.package_registry.authenticate-step %}
163
+
2. After creating your package, you can publish the package.
username = project.findProperty("gpr.user") as String??: System.getenv("<em>USERNAME</em>")
137
-
password = project.findProperty("gpr.key") as String??: System.getenv("<em>TOKEN</em>")
138
-
}
139
-
}
140
-
}
141
-
publications {
142
-
register<MavenPublication>("gpr") {
143
-
from(components["java"])
144
-
}
145
-
}
146
-
}
147
-
}
148
-
```
149
-
150
-
#### Authenticating with the `GITHUB_TOKEN`
151
-
152
-
{% data reusables.package_registry.package-registry-with-github-tokens %}
153
-
154
-
For more information about using `GITHUB_TOKEN` with Maven, see "[Publishing Java packages with Maven](/actions/language-and-framework-guides/publishing-java-packages-with-maven#publishing-packages-to-github-packages)."
155
-
156
-
### Publishing a package
157
-
158
-
{% data reusables.package_registry.default-name %} For example, {% data variables.product.prodname_dotcom %} will publish a package named `com.example.test` in the `OWNER/test` {% data variables.product.prodname_registry %} repository.
159
-
160
-
{% data reusables.package_registry.viewing-packages %}
161
-
162
-
{% data reusables.package_registry.authenticate-step %}
163
-
2. After creating your package, you can publish the package.
0 commit comments