Skip to content
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

Fix failing checks of staging repository when releasing to Maven #7114

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 10 additions & 0 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ java {
withJavadocJar()
}

publishing {
publications.named('mavenJava', MavenPublication) {
from components.java
pom {
name = 'API library'
description = "$project.description"
}
}
}

tasks.named('test') {
useJUnitPlatform()
finalizedBy jacocoTestReport
Expand Down
57 changes: 24 additions & 33 deletions buildSrc/src/main/groovy/halo.publish.gradle
Original file line number Diff line number Diff line change
@@ -1,43 +1,30 @@
plugins {
id 'maven-publish'
id 'signing'
}

publishing {
publications {
def pubName = "${archivesBaseName}"
pluginManager.withPlugin('java-platform') {
pubName = pubName + 'Pom'
}
pluginManager.withPlugin('java') {
pubName = pubName + 'Library'
}
"${pubName}"(MavenPublication) {
pluginManager.withPlugin('java-platform') {
from components.javaPlatform
}
pluginManager.withPlugin('java') {
from components.java
}
pom {
licenses {
license {
name = 'The GNU General Public License v3.0'
url = 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
}
developers {
developer {
id = 'johnniang'
name = 'JohnNiang'
email = '[email protected]'
}
publications.register('mavenJava', MavenPublication) {
pom {
url = 'https://github.com/halo-dev/halo'
licenses {
license {
name = 'The GNU General Public License v3.0'
url = 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
scm {
connection = 'scm:git:https://github.com/halo-dev/halo.git'
developerConnection = 'scm:git:ssh://[email protected]:halo-dev/halo.git'
url = 'https://github.com/halo-dev/halo'
}
developers {
developer {
id = 'johnniang'
name = 'JohnNiang'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:https://github.com/halo-dev/halo.git'
developerConnection = 'scm:git:ssh://[email protected]:halo-dev/halo.git'
url = 'https://github.com/halo-dev/halo'
}
}
}

Expand All @@ -53,4 +40,8 @@ publishing {
}
}
}
}
}

signing {
sign publishing.publications.mavenJava
}
11 changes: 10 additions & 1 deletion platform/application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
id 'org.springframework.boot' apply false
id 'java-platform'
id 'halo.publish'
id 'signing'
}

group = 'run.halo.tools.platform'
Expand Down Expand Up @@ -63,3 +62,13 @@ dependencies {
}

}

publishing {
publications.named('mavenJava', MavenPublication) {
from components.javaPlatform
pom {
name = 'Application platform.'
description = "$project.description"
}
}
}
10 changes: 10 additions & 0 deletions platform/plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@ dependencies {
// e.g.: api 'halo.run.plugin:links-api:1.1.0'
}
}

publishing {
publications.named('mavenJava', MavenPublication) {
from components.javaPlatform
pom {
name = 'Plugin platform'
description = "$project.description"
}
}
}
Loading