-
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.
Merge pull request #10 from mauritssilvis/java_darts_cli_deployment
Set up Java darts CLI deployment
- Loading branch information
Showing
3 changed files
with
66 additions
and
8 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 |
---|---|---|
|
@@ -5,10 +5,13 @@ | |
|
||
plugins { | ||
application | ||
`maven-publish` | ||
signing | ||
id("io.github.gradle-nexus.publish-plugin") version "1.3.0" | ||
} | ||
|
||
group = "nl.mauritssilvis.darts.java" | ||
version = "0.2.0-SNAPSHOT" | ||
version = "0.3.0" | ||
|
||
repositories { | ||
mavenCentral() | ||
|
@@ -43,6 +46,55 @@ application { | |
mainClass.set("nl.mauritssilvis.darts.java.cli.DartsApp") | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("mavenJava") { | ||
from(components["java"]) | ||
|
||
pom { | ||
name.set("Java darts CLI") | ||
description.set("A Java-based command-line toolbox aimed at the game of darts") | ||
url.set("https://github.com/mauritssilvis/darts") | ||
|
||
licenses { | ||
license { | ||
name.set("GNU General Public License v3.0 or later") | ||
url.set("https://spdx.org/licenses/GPL-3.0-or-later.html") | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set("mauritssilvis") | ||
name.set("Maurits Silvis") | ||
email.set("[email protected]") | ||
} | ||
} | ||
|
||
scm { | ||
connection.set("scm:git:ssh://[email protected]:mauritssilvis/darts.git") | ||
developerConnection.set("scm:git:ssh://[email protected]:mauritssilvis/darts.git") | ||
url.set("https://github.com/mauritssilvis/darts") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
useGpgCmd() // Use the local gpg command | ||
sign(publishing.publications["mavenJava"]) | ||
} | ||
|
||
tasks { | ||
compileJava { | ||
// Set the location for files generated by picocli | ||
|
@@ -71,11 +123,9 @@ tasks { | |
} | ||
} | ||
} | ||
} | ||
|
||
clean { | ||
doLast { | ||
file("bin").deleteRecursively() | ||
file("lib").deleteRecursively() | ||
} | ||
} | ||
tasks.register<Delete>("cleanDist") { | ||
file("bin").deleteRecursively() | ||
file("lib").deleteRecursively() | ||
} |
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