Skip to content

Commit

Permalink
publishing works with new publishing infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
miho committed Aug 14, 2022
1 parent 52b034c commit 8f6add2
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 22 deletions.
11 changes: 11 additions & 0 deletions .settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=C\:/Users/miho/.jdks/openjdk-15.0.1
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true
2 changes: 1 addition & 1 deletion gradle/project-info.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ ext.publishingInfo.websiteUrl = 'https://github.com/miho/MonacoFX'
ext.publishingInfo.issueTrackerUrl = 'https://github.com/miho/MonacoFX/issues'
ext.publishingInfo.vcsUrl = 'https://github.com/miho/MonacoFX.git'

ext.publishingInfo.pomName = ext.publishing.artifactId
ext.publishingInfo.pomName = ext.publishingInfo.artifactId
42 changes: 21 additions & 21 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jar {
'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")",
'Build-Date': project.buildDate,
'Build-Time': project.buildTime,
'Build-Revision': versioning.info.commit,
// 'Build-Revision': versioning.info.commit,
'Specification-Title': project.name,
'Specification-Version': project.version,
'Implementation-Title': project.name,
Expand Down Expand Up @@ -86,26 +86,26 @@ publishing {
// Destination Repository 'GitHubPackages'
// -> call task 'publishMavenJavaPublicationToGitHubPackagesRepository' to publish
// --------------------------------------------------------------------------------
maven {
name = "GitHubPackages"
// see https://levelup.gitconnected.com/publish-a-maven-package-to-github-with-gradle-fabc6de24d6
// Replace OWNER and REPOSITORY with your GitHub username/repository
// (must be both lowercase according to the documenations)
// url = uri("https://maven.pkg.github.com/OWNER/REPOSITORY")
url = uri(project.findProperty('publishingInfo').gitHubMavenRepo)
credentials {
// Make sure to generate a token with write-packages and read-packages permission:
// https://github.com/settings/tokens/new
// You can either store the username and token in
// ~/.gradle/gradle.properties (use the gpr.user and gpr.key keys)
// Or you can store them as environment variables e.g. in ~/.bash_profile or ~/.zsh
// depending on your shell (GITHUB_USERNAME and GITHUB_TOKEN keys)
// Or you pass them via CLI: gradle publish -Pgpr.user=username -Pgpr.key=token
// See at EOF for examples on how to store the credentials
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
// maven {
// name = "GitHubPackages"
// // see https://levelup.gitconnected.com/publish-a-maven-package-to-github-with-gradle-fabc6de24d6
// // Replace OWNER and REPOSITORY with your GitHub username/repository
// // (must be both lowercase according to the documenations)
// // url = uri("https://maven.pkg.github.com/OWNER/REPOSITORY")
// url = uri(project.findProperty('publishingInfo').gitHubMavenRepo)
// credentials {
// // Make sure to generate a token with write-packages and read-packages permission:
// // https://github.com/settings/tokens/new
// // You can either store the username and token in
// // ~/.gradle/gradle.properties (use the gpr.user and gpr.key keys)
// // Or you can store them as environment variables e.g. in ~/.bash_profile or ~/.zsh
// // depending on your shell (GITHUB_USERNAME and GITHUB_TOKEN keys)
// // Or you pass them via CLI: gradle publish -Pgpr.user=username -Pgpr.key=token
// // See at EOF for examples on how to store the credentials
// username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
// password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
// }
// }

// --------------------------------------------------------------------------------
// Destination Repository 'OSSRH'
Expand Down

0 comments on commit 8f6add2

Please sign in to comment.