Skip to content

Commit

Permalink
Merge pull request #10 from mauritssilvis/java_darts_cli_deployment
Browse files Browse the repository at this point in the history
Set up Java darts CLI deployment
  • Loading branch information
mauritssilvis authored Mar 17, 2023
2 parents 55b0c73 + 84dc39a commit 6935753
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 8 deletions.
8 changes: 8 additions & 0 deletions cli/java/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to the `java-darts-cli` project (see [darts](https://github.
The file format is based on [keep a changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [semantic versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.0] - 2023-03-17

### Added

#### Deployment

- Set up Maven Central deployment.

## [0.2.0] - 2023-03-15

### Changed
Expand Down
64 changes: 57 additions & 7 deletions cli/java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -71,11 +123,9 @@ tasks {
}
}
}
}

clean {
doLast {
file("bin").deleteRecursively()
file("lib").deleteRecursively()
}
}
tasks.register<Delete>("cleanDist") {
file("bin").deleteRecursively()
file("lib").deleteRecursively()
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Version implements IVersionProvider {
@Override
public String[] getVersion() {
return new String[]{
"java-darts-cli 0.2.0",
"java-darts-cli 0.3.0",
"Copyright © 2023 Maurits Silvis",
"SPDX-License-Identifier: GPL-3.0-or-later"
};
Expand Down

0 comments on commit 6935753

Please sign in to comment.