-
Notifications
You must be signed in to change notification settings - Fork 0
Update readme to describe the fork and add gradle task for Nosto internal publishing #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,14 @@ apply plugin: 'biz.aQute.bnd.builder' | |
| apply plugin: 'maven-publish' | ||
|
|
||
|
|
||
| // The upstream project build releases seem to be compiled with Java 11 so keeping compatibility so that our changes can be applied to the upstream project | ||
| compileJava { | ||
| options.release = 11 | ||
| } | ||
| compileTestJava { | ||
| options.release = 11 | ||
| } | ||
|
|
||
| // custom tasks for creating source/javadoc jars | ||
| tasks.register('sourcesJar', Jar) { | ||
| dependsOn classes | ||
|
|
@@ -143,7 +151,29 @@ publishing { | |
| } | ||
| } | ||
| } | ||
|
|
||
| repositories { | ||
| maven { | ||
| url 'https://repo.nos.to/content/repositories/NostoDependencies/' | ||
| credentials { | ||
| username = project.hasProperty('mavenUser') ? project.mavenUser : "" | ||
| password = project.hasProperty('mavenPassword') ? project.mavenPassword : "" | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| tasks.register('publishToNostoRepo') { | ||
| dependsOn 'publishMavenPublicationToMavenRepository' | ||
|
Comment on lines
+166
to
+167
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this needed?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes because with the normal publish-task it would try to upload to the sonatype repo that upstream also uses. |
||
| } | ||
| gradle.taskGraph.whenReady { taskGraph -> | ||
| if (taskGraph.hasTask(':publishToNostoRepo')) { | ||
| if (!project.hasProperty('mavenUser') || !project.hasProperty('mavenPassword')) { | ||
| throw new GradleException("mavenUser and mavenPassword must be defined for publishToNostoRepo task") | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
| afterReleaseBuild.dependsOn nexusPublishing | ||
|
|
||
|
|
@@ -158,6 +188,7 @@ nexusPublishing { | |
|
|
||
| // to publish to local maven repo skip signing: ./gradlew publishToMavenLocal -x signGraphqlJavaPublication | ||
| signing { | ||
| required = { !version.endsWith("nosto") } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. interesting
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's coming from the signing-plugin and activates when publishing. I disabled it now for our own release version as it requires key setup for signing. |
||
| def signingKey = System.getenv("MAVEN_CENTRAL_PGP_KEY") | ||
| useInMemoryPgpKeys(signingKey, "") | ||
| sign publishing.publications | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add a comment expressing we want to keep it as
v11so the changes we apply can be also applied to the original project?