-
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.
add pom metadata and ossrh repository for publishing
- Loading branch information
Martin Azpillaga Aldalur
committed
Feb 9, 2024
1 parent
9c7e013
commit 80553ab
Showing
1 changed file
with
54 additions
and
10 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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import java.net.URI | ||
|
||
plugins { | ||
id("org.jetbrains.kotlin.jvm") version "1.8.22" | ||
id("org.jlleitschuh.gradle.ktlint") version "11.6.0" | ||
id("maven-publish") | ||
id("signing") | ||
} | ||
|
||
repositories { | ||
|
@@ -24,28 +27,69 @@ tasks.register<Jar>("jarTest") { | |
archiveBaseName = "library-test" | ||
} | ||
|
||
java { | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
|
||
group = "com.strumenta.kolasu" | ||
version = "1.0.0" | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
url = uri("https://maven.pkg.github.com/Strumenta/kolasu-languageserver-library") | ||
name = "OSSRH" | ||
url = URI("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials { | ||
username = (if (extra.has("starlasu.github.user")) extra["starlasu.github.user"] else System.getenv("STRUMENTA_PACKAGES_USER")) as String? | ||
password = (if (extra.has("starlasu.github.token")) extra["starlasu.github.token"] else System.getenv("STRUMENTA_PACKAGES_TOKEN")) as String? | ||
username = project.properties["ossrhUser"] as String | ||
password = project.properties["osshrPassword"] as String | ||
} | ||
} | ||
} | ||
publications { | ||
create<MavenPublication>("language-server") { | ||
groupId = "com.strumenta.kolasu" | ||
artifactId = "language-server" | ||
version = "0.0.0" | ||
version = "1.0.0" | ||
|
||
artifact(tasks.getByName("jar")) | ||
artifact(tasks.getByName("sourcesJar")) | ||
artifact(tasks.getByName("javadocJar")) | ||
|
||
pom { | ||
name = "Kolasu language server" | ||
description = "Create a language server for parsers created with Kolasu" | ||
inceptionYear = "2023" | ||
url = "https://github.com/Strumenta/kolasu-languageserver-library" | ||
licenses { | ||
license { | ||
name = "Apache License, Version 2.0" | ||
url = "https://opensource.org/license/apache-2-0/" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = "martin-azpillaga" | ||
name = "Martin Azpillaga Aldalur" | ||
email = "[email protected]" | ||
} | ||
} | ||
scm { | ||
url = "https://github.com/Strumenta/kolasu-languageserver-library.git" | ||
connection = "scm:git:git:github.com/Strumenta/kolasu-languageserver-library.git" | ||
developerConnection = "scm:git:ssh:github.com/Strumenta/kolasu-languageserver-library.git" | ||
} | ||
} | ||
} | ||
create<MavenPublication>("language-server-test") { | ||
groupId = "com.strumenta.kolasu" | ||
artifactId = "language-server-test" | ||
version = "0.0.0" | ||
artifact(tasks.getByName("jarTest")) | ||
} | ||
// create<MavenPublication>("language-server-test") { | ||
// groupId = "com.strumenta.kolasu" | ||
// artifactId = "language-server-test" | ||
// version = "0.0.0" | ||
// artifact(tasks.getByName("jarTest")) | ||
// } | ||
} | ||
} | ||
|
||
signing { | ||
sign(publishing.publications.getByName("language-server")) | ||
} |