-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
10488e3
commit 510acf0
Showing
7 changed files
with
129 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 45 additions & 55 deletions
100
convention-plugins/src/main/kotlin/module.publication.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,45 @@ | ||
import org.gradle.api.publish.maven.MavenPublication | ||
import org.gradle.api.tasks.bundling.Jar | ||
import org.gradle.kotlin.dsl.`maven-publish` | ||
|
||
plugins { | ||
`maven-publish` | ||
signing | ||
} | ||
|
||
publishing { | ||
// Configure all publications | ||
publications.withType<MavenPublication> { | ||
// Stub javadoc.jar artifact | ||
artifact(tasks.register("${name}JavadocJar", Jar::class) { | ||
archiveClassifier.set("javadoc") | ||
archiveAppendix.set(this@withType.name) | ||
}) | ||
|
||
// Provide artifacts information required by Maven Central | ||
pom { | ||
name.set("KotlinPaymongo") | ||
description.set("Paymongo Kotlin Client") | ||
licenses { | ||
license { | ||
name.set("MIT") | ||
url.set("https://opensource.org/licenses/MIT") | ||
} | ||
} | ||
url.set("https://ronjunevaldoz.github.io/KotlinPaymongo") | ||
issueManagement { | ||
system.set("Github") | ||
url.set("https://github.com/ronjunevaldoz/KotlinPaymongo/issues") | ||
} | ||
scm { | ||
connection.set("https://github.com/ronjunevaldoz/KotlinPaymongo.git") | ||
url.set("https://github.com/ronjunevaldoz/KotlinPaymongo") | ||
} | ||
developers { | ||
developer { | ||
name.set("Ron June Valdoz") | ||
email.set("ronjune.lopez@gmail.com") | ||
organization.set("Ron June Valdoz") // TODO update real org | ||
organizationUrl.set("https://github.com/ronjunevaldoz") // TODO update real org url | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
if (project.hasProperty("signing.gnupg.keyName")) { | ||
useGpgCmd() | ||
sign(publishing.publications) | ||
} | ||
} | ||
//import gradle.kotlin.dsl.accessors._8edd1b0c1852f0ac869e9c414c462ba9.mavenPublishing | ||
//import org.gradle.api.publish.maven.MavenPublication | ||
//import org.gradle.api.tasks.bundling.Jar | ||
//import org.gradle.kotlin.dsl.`maven-publish` | ||
// | ||
//plugins { | ||
// com.vanniktech.maven.publish | ||
//} | ||
// | ||
//mavenPublishing { | ||
// pom { | ||
// name.set("KotlinPaymongo") | ||
// description.set("Paymongo Kotlin Client") | ||
// licenses { | ||
// license { | ||
// name.set("MIT") | ||
// url.set("https://opensource.org/licenses/MIT") | ||
// } | ||
// } | ||
// url.set("https://ronjunevaldoz.github.io/KotlinPaymongo") | ||
// issueManagement { | ||
// system.set("Github") | ||
// url.set("https://github.com/ronjunevaldoz/KotlinPaymongo/issues") | ||
// } | ||
// scm { | ||
// connection.set("https://github.com/ronjunevaldoz/KotlinPaymongo.git") | ||
// url.set("https://github.com/ronjunevaldoz/KotlinPaymongo") | ||
// } | ||
// developers { | ||
// developer { | ||
// name.set("Ron June Valdoz") | ||
// email.set("ronjune.lopez@gmail.com") | ||
// organization.set("Ron June Valdoz") // TODO update real org | ||
// organizationUrl.set("https://github.com/ronjunevaldoz") // TODO update real org url | ||
// } | ||
// } | ||
// } | ||
//} | ||
// | ||
//signing { | ||
// if (project.hasProperty("signing.gnupg.keyName")) { | ||
// useGpgCmd() | ||
// sign(publishing.publications) | ||
// } | ||
//} |
50 changes: 41 additions & 9 deletions
50
convention-plugins/src/main/kotlin/root.publication.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,51 @@ | ||
import gradle.kotlin.dsl.accessors._8edd1b0c1852f0ac869e9c414c462ba9.mavenPublishing | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
|
||
plugins { | ||
id("io.github.gradle-nexus.publish-plugin") | ||
id("com.vanniktech.maven.publish") | ||
} | ||
|
||
allprojects { | ||
group = "io.github.ronjunevaldoz" | ||
version = "1.0.0-SNAPSHOT" | ||
} | ||
|
||
nexusPublishing { | ||
// Configure maven central repository | ||
// https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-ossrh | ||
repositories { | ||
sonatype { //only for users registered in Sonatype after 24 Feb 2021 | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
mavenPublishing { | ||
coordinates( | ||
groupId = "io.github.ronjunevaldoz", | ||
artifactId = "paymongo-kotlin", | ||
version = "1.0.0-SNAPSHOT" | ||
) | ||
// Configure publishing to Maven Central | ||
publishToMavenCentral(SonatypeHost.S01) | ||
// Enable GPG signing for all publications | ||
signAllPublications() | ||
|
||
pom { | ||
name.set("KotlinPaymongo") | ||
description.set("Paymongo Kotlin Client") | ||
licenses { | ||
license { | ||
name.set("MIT") | ||
url.set("https://opensource.org/licenses/MIT") | ||
} | ||
} | ||
url.set("https://ronjunevaldoz.github.io/KotlinPaymongo") | ||
issueManagement { | ||
system.set("Github") | ||
url.set("https://github.com/ronjunevaldoz/KotlinPaymongo/issues") | ||
} | ||
scm { | ||
connection.set("https://github.com/ronjunevaldoz/KotlinPaymongo.git") | ||
url.set("https://github.com/ronjunevaldoz/KotlinPaymongo") | ||
} | ||
developers { | ||
developer { | ||
name.set("Ron June Valdoz") | ||
email.set("ronjune.lopez@gmail.com") | ||
organization.set("Ron June Valdoz") // TODO update real org | ||
organizationUrl.set("https://github.com/ronjunevaldoz") // TODO update real org url | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters