-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
publish all modules to maven central and plugin to gradle plugin portal
- Loading branch information
Showing
9 changed files
with
165 additions
and
107 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
plugins { | ||
id 'com.medly.norm-maven-publish' | ||
} | ||
|
||
description = "Norm TypeMapper API" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
plugins { | ||
id 'groovy-gradle-plugin' | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() // so that external plugins can be resolved in dependencies section | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.dokka:dokka-gradle-plugin:1.4.30" | ||
} |
88 changes: 88 additions & 0 deletions
88
buildSrc/src/main/groovy/com.medly.norm-maven-publish.gradle
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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
plugins { | ||
id 'maven-publish' | ||
id 'signing' | ||
id "org.jetbrains.dokka" | ||
} | ||
|
||
|
||
repositories { | ||
mavenCentral() | ||
jcenter { | ||
content { | ||
includeModule("org.jetbrains.kotlinx", "kotlinx-html-jvm") | ||
} | ||
} | ||
} | ||
|
||
//tasks { | ||
// dokka { | ||
// outputFormat = "html" | ||
// outputDirectory = "$buildDir/javadoc" | ||
// } | ||
//} | ||
|
||
task dokkaJar(type: Jar) { | ||
group = JavaBasePlugin.DOCUMENTATION_GROUP | ||
description = "Assembles Kotlin docs with Dokka" | ||
archiveClassifier.set("javadoc") | ||
from(tasks.getByName("dokkaJavadoc")) | ||
dependsOn(tasks.getByName("dokkaJavadoc")) | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
archiveClassifier.set("sources") | ||
from(sourceSets.getByName("main").allSource) | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
artifact sourcesJar | ||
artifact dokkaJar | ||
|
||
pom { | ||
name = project.name | ||
description = project.description | ||
url.set("https://github.com/medly/norm") | ||
licenses { | ||
license { | ||
name = "MIT" | ||
url = "https://opensource.org/licenses/MIT" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = "kdabir" | ||
name = "Kunal Dabir" | ||
email = "[email protected]" | ||
} | ||
} | ||
scm { | ||
connection = "scm:git:[email protected]:medly/norm.git" | ||
developerConnection = "scm:git:ssh://github.com/medly/norm.git" | ||
url = "https://github.com/medly/norm" | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
credentials { | ||
username System.getenv("OSSRH_USERNAME") | ||
password System.getenv("OSSRH_PASSWORD") | ||
} | ||
|
||
url "https://oss.sonatype.org/service/local/staging/deploy/maven2" | ||
} | ||
} | ||
} | ||
|
||
|
||
signing { | ||
def signingKey = System.getenv("OSSRH_SIGNING_SECRET_KEY") | ||
def signingPassword = System.getenv("OSSRH_SIGNING_PASSPHRASE") | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
sign publishing.publications.mavenJava // must come after above block | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
plugins { | ||
id 'application' | ||
id 'com.medly.norm-maven-publish' | ||
} | ||
|
||
description = "Command Line Interface for Norm's Code generator" | ||
|
||
applicationName = 'norm-codegen' | ||
mainClassName = "norm.cli.NormCliKt" | ||
|
||
dependencies { | ||
implementation project(":codegen") | ||
implementation "com.github.ajalt:clikt:2.7.1" | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
plugins { | ||
id 'com.medly.norm-maven-publish' | ||
} | ||
|
||
description = "Norm's Code generator to generate data classes from SQL queries" | ||
|
||
dependencies { | ||
implementation project(":runtime") | ||
api project(":api") | ||
|
||
api 'org.postgresql:postgresql:42.2.19' | ||
implementation 'com.squareup:kotlinpoet:1.7.2' | ||
|
||
implementation 'org.atteo:evo-inflector:1.2.2' | ||
implementation 'org.apache.commons:commons-text:1.9' | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,5 @@ | ||
plugins { | ||
id 'maven-publish' | ||
id 'signing' | ||
id "org.jetbrains.dokka" version "0.10.1" | ||
id 'com.medly.norm-maven-publish' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
group = "com.medly.norm" | ||
|
||
tasks { | ||
dokka { | ||
outputFormat = "html" | ||
outputDirectory = "$buildDir/javadoc" | ||
} | ||
} | ||
|
||
task dokkaJar(type: Jar) { | ||
group = JavaBasePlugin.DOCUMENTATION_GROUP | ||
description = "Assembles Kotlin docs with Dokka" | ||
archiveClassifier.set("javadoc") | ||
from(tasks.dokka) | ||
dependsOn(tasks.dokka) | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
archiveClassifier.set("sources") | ||
from(sourceSets.getByName("main").allSource) | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
artifact sourcesJar | ||
artifact dokkaJar | ||
|
||
pom { | ||
name = "norm runtime" | ||
description = "runtime component for norm" | ||
url.set("https://github.com/medly/norm") | ||
licenses { | ||
license { | ||
name = "MIT" | ||
url = "https://opensource.org/licenses/MIT" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = "kdabir" | ||
name = "Kunal Dabir" | ||
email = "[email protected]" | ||
} | ||
} | ||
scm { | ||
connection = "scm:git:[email protected]:medly/norm.git" | ||
developerConnection = "scm:git:ssh://github.com/medly/norm.git" | ||
url = "https://github.com/medly/norm" | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
credentials { | ||
username System.getenv("OSSRH_USERNAME") | ||
password System.getenv("OSSRH_PASSWORD") | ||
} | ||
|
||
url "https://oss.sonatype.org/service/local/staging/deploy/maven2" | ||
} | ||
} | ||
} | ||
|
||
|
||
signing { | ||
def signingKey = System.getenv("OSSRH_SIGNING_SECRET_KEY") | ||
def signingPassword = System.getenv("OSSRH_SIGNING_PASSPHRASE") | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
sign publishing.publications.mavenJava // must come after above block | ||
} | ||
description = "Norm runtime layer" |