-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
3 changed files
with
106 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,23 +45,15 @@ allprojects { | |
} | ||
|
||
fun configurePublishedProject(project: Project) { | ||
project.java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
project.tasks.withType<Javadoc>() { | ||
options { | ||
(this as CoreJavadocOptions).addStringOption("Xdoclint:none", "-quiet") | ||
} | ||
} | ||
|
||
project.signing { | ||
sign(publishing.publications) | ||
} | ||
project.apply(plugin = "signing") | ||
|
||
project.publishing { | ||
publications.withType<MavenPublication>().forEach() { configureMavenPublication(it) } | ||
repositories { | ||
maven { | ||
name = "ghPackages" | ||
|
@@ -81,42 +73,4 @@ fun configurePublishedProject(project: Project) { | |
} | ||
} | ||
} | ||
} | ||
|
||
|
||
fun configureMavenPublication(publication: MavenPublication) { | ||
publication.pom { | ||
url = "https://github.com/SuduIDE/protogen" | ||
organization { | ||
name = "com.github.SuduIDE" | ||
url = "https://github.com/SuduIDE" | ||
} | ||
issueManagement { | ||
system = "GitHub" | ||
url = "https://github.com/SuduIDE/protogen/issues" | ||
} | ||
licenses { | ||
license { | ||
name = "The Apache License, Version 2.0" | ||
url = "https://www.apache.org/licenses/LICENSE-2.0.txt" | ||
} | ||
} | ||
scm { | ||
url = "https://github.com/SuduIDE/protogen" | ||
connection = "scm:https://github.com/SuduIDE/protogen.git" | ||
developerConnection = "scm:git://github.com/SuduIDE/protogen.git" | ||
} | ||
developers { | ||
developer { | ||
id = "Duzhinsky" | ||
name = "Dmitrii Duzhinskii" | ||
email = "[email protected]" | ||
} | ||
} | ||
} | ||
|
||
publication.groupId = project.group.toString() | ||
publication.version = project.version.toString() | ||
publication.artifact(tasks.findByName("sourcesJar")) | ||
publication.artifact(tasks.findByName("javadocJar")) | ||
} | ||
} |
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 |
---|---|---|
|
@@ -4,19 +4,79 @@ plugins { | |
id("com.github.johnrengelman.shadow") version "8.1.1" | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
signing { | ||
sign(publishing.publications) | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("maven") { | ||
pom { | ||
description = "protoc plugin of protogen" | ||
name = "protoc-gen-protogen" | ||
url = "https://github.com/SuduIDE/protogen" | ||
organization { | ||
name = "com.github.SuduIDE" | ||
url = "https://github.com/SuduIDE" | ||
} | ||
issueManagement { | ||
system = "GitHub" | ||
url = "https://github.com/SuduIDE/protogen/issues" | ||
} | ||
licenses { | ||
license { | ||
name = "The Apache License, Version 2.0" | ||
url = "https://www.apache.org/licenses/LICENSE-2.0.txt" | ||
} | ||
} | ||
scm { | ||
url = "https://github.com/SuduIDE/protogen" | ||
connection = "scm:https://github.com/SuduIDE/protogen.git" | ||
developerConnection = "scm:git://github.com/SuduIDE/protogen.git" | ||
} | ||
developers { | ||
developer { | ||
id = "Duzhinsky" | ||
name = "Dmitrii Duzhinskii" | ||
email = "[email protected]" | ||
} | ||
} | ||
} | ||
|
||
groupId = project.group.toString() | ||
artifactId = "protoc-gen-protogen" | ||
version = project.version.toString() | ||
artifact(tasks.findByName("sourcesJar")) | ||
artifact(tasks.findByName("javadocJar")) | ||
artifact(tasks.shadowJar) { | ||
classifier = "jvm" | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "ghPackages" | ||
url = uri("https://maven.pkg.github.com/SuduIDE/protogen") | ||
credentials { | ||
username = System.getenv("GITHUB_ACTOR") | ||
password = System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
maven { | ||
name = "sonatype" | ||
url = uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2") | ||
credentials { | ||
username = System.getenv("SONATYPE_USERNAME") | ||
password = System.getenv("SONATYPE_PASSWORD") | ||
} | ||
} | ||
} | ||
} | ||
|
||
tasks.shadowJar { | ||
|
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 |
---|---|---|
|
@@ -4,9 +4,53 @@ plugins { | |
signing | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
signing { | ||
sign(publishing.publications) | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("maven") { | ||
pom { | ||
url = "https://github.com/SuduIDE/protogen" | ||
organization { | ||
name = "com.github.SuduIDE" | ||
url = "https://github.com/SuduIDE" | ||
} | ||
issueManagement { | ||
system = "GitHub" | ||
url = "https://github.com/SuduIDE/protogen/issues" | ||
} | ||
licenses { | ||
license { | ||
name = "The Apache License, Version 2.0" | ||
url = "https://www.apache.org/licenses/LICENSE-2.0.txt" | ||
} | ||
} | ||
scm { | ||
url = "https://github.com/SuduIDE/protogen" | ||
connection = "scm:https://github.com/SuduIDE/protogen.git" | ||
developerConnection = "scm:git://github.com/SuduIDE/protogen.git" | ||
} | ||
developers { | ||
developer { | ||
id = "Duzhinsky" | ||
name = "Dmitrii Duzhinskii" | ||
email = "[email protected]" | ||
} | ||
} | ||
} | ||
|
||
groupId = project.group.toString() | ||
version = project.version.toString() | ||
artifact(tasks.findByName("sourcesJar")) | ||
artifact(tasks.findByName("javadocJar")) | ||
|
||
pom { | ||
description = "Options for protogen tool. Use it as protogen scope dependency" | ||
name = "protogen-options" | ||
|