Skip to content

Commit 8f6add2

Browse files
committed
publishing works with new publishing infrastructure
1 parent 52b034c commit 8f6add2

File tree

3 files changed

+33
-22
lines changed

3 files changed

+33
-22
lines changed
+11
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
1+
arguments=
2+
auto.sync=false
3+
build.scans.enabled=false
4+
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
15
connection.project.dir=
26
eclipse.preferences.version=1
7+
gradle.user.home=
8+
java.home=C\:/Users/miho/.jdks/openjdk-15.0.1
9+
jvm.arguments=
10+
offline.mode=false
11+
override.workspace.settings=true
12+
show.console.view=true
13+
show.executions.view=true

gradle/project-info.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ ext.publishingInfo.websiteUrl = 'https://github.com/miho/MonacoFX'
1818
ext.publishingInfo.issueTrackerUrl = 'https://github.com/miho/MonacoFX/issues'
1919
ext.publishingInfo.vcsUrl = 'https://github.com/miho/MonacoFX.git'
2020

21-
ext.publishingInfo.pomName = ext.publishing.artifactId
21+
ext.publishingInfo.pomName = ext.publishingInfo.artifactId

gradle/publishing.gradle

+21-21
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jar {
4242
'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")",
4343
'Build-Date': project.buildDate,
4444
'Build-Time': project.buildTime,
45-
'Build-Revision': versioning.info.commit,
45+
// 'Build-Revision': versioning.info.commit,
4646
'Specification-Title': project.name,
4747
'Specification-Version': project.version,
4848
'Implementation-Title': project.name,
@@ -86,26 +86,26 @@ publishing {
8686
// Destination Repository 'GitHubPackages'
8787
// -> call task 'publishMavenJavaPublicationToGitHubPackagesRepository' to publish
8888
// --------------------------------------------------------------------------------
89-
maven {
90-
name = "GitHubPackages"
91-
// see https://levelup.gitconnected.com/publish-a-maven-package-to-github-with-gradle-fabc6de24d6
92-
// Replace OWNER and REPOSITORY with your GitHub username/repository
93-
// (must be both lowercase according to the documenations)
94-
// url = uri("https://maven.pkg.github.com/OWNER/REPOSITORY")
95-
url = uri(project.findProperty('publishingInfo').gitHubMavenRepo)
96-
credentials {
97-
// Make sure to generate a token with write-packages and read-packages permission:
98-
// https://github.com/settings/tokens/new
99-
// You can either store the username and token in
100-
// ~/.gradle/gradle.properties (use the gpr.user and gpr.key keys)
101-
// Or you can store them as environment variables e.g. in ~/.bash_profile or ~/.zsh
102-
// depending on your shell (GITHUB_USERNAME and GITHUB_TOKEN keys)
103-
// Or you pass them via CLI: gradle publish -Pgpr.user=username -Pgpr.key=token
104-
// See at EOF for examples on how to store the credentials
105-
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
106-
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
107-
}
108-
}
89+
// maven {
90+
// name = "GitHubPackages"
91+
// // see https://levelup.gitconnected.com/publish-a-maven-package-to-github-with-gradle-fabc6de24d6
92+
// // Replace OWNER and REPOSITORY with your GitHub username/repository
93+
// // (must be both lowercase according to the documenations)
94+
// // url = uri("https://maven.pkg.github.com/OWNER/REPOSITORY")
95+
// url = uri(project.findProperty('publishingInfo').gitHubMavenRepo)
96+
// credentials {
97+
// // Make sure to generate a token with write-packages and read-packages permission:
98+
// // https://github.com/settings/tokens/new
99+
// // You can either store the username and token in
100+
// // ~/.gradle/gradle.properties (use the gpr.user and gpr.key keys)
101+
// // Or you can store them as environment variables e.g. in ~/.bash_profile or ~/.zsh
102+
// // depending on your shell (GITHUB_USERNAME and GITHUB_TOKEN keys)
103+
// // Or you pass them via CLI: gradle publish -Pgpr.user=username -Pgpr.key=token
104+
// // See at EOF for examples on how to store the credentials
105+
// username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
106+
// password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
107+
// }
108+
// }
109109

110110
// --------------------------------------------------------------------------------
111111
// Destination Repository 'OSSRH'

0 commit comments

Comments
 (0)