mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-03 19:49:39 +00:00
Re-introducing the publish to maven capability.
This commit is contained in:
parent
7d4aa1a4c6
commit
5fbaa95ed0
@ -24,24 +24,35 @@ Extract secret key for the Gradle signing plugin:
|
||||
$ gpg2 --export-secret-keys > secring.gpg
|
||||
```
|
||||
|
||||
## Build and publish to Central Repository
|
||||
## Gradle build and publish to Central Repository
|
||||
|
||||
> NOTE: The build has been updated to allow snapshots to be published. These appear to be automatically available.
|
||||
|
||||
Ensure full build passes:
|
||||
|
||||
```bash
|
||||
$ ./gradlew clean test javadoc assemble
|
||||
<...lots of stuff, primarily Javadoc issues...>
|
||||
BUILD SUCCESSFUL in 3s
|
||||
13 actionable tasks: 13 executed
|
||||
./gradlew clean build
|
||||
|
||||
BUILD SUCCESSFUL in 8s
|
||||
91 actionable tasks: 91 executed
|
||||
```
|
||||
|
||||
Upload:
|
||||
Publish:
|
||||
|
||||
```bash
|
||||
$ ./gradlew uploadArchives
|
||||
$ ./gradlew publish
|
||||
|
||||
BUILD SUCCESSFUL in 10s
|
||||
10 actionable tasks: 1 executed, 9 up-to-date
|
||||
BUILD SUCCESSFUL in 8s
|
||||
2 actionable tasks: 2 executed
|
||||
```
|
||||
|
||||
The can also be combined:
|
||||
|
||||
```bash
|
||||
$ ./gradlew clean build publish
|
||||
|
||||
BUILD SUCCESSFUL in 16s
|
||||
93 actionable tasks: 93 executed
|
||||
```
|
||||
|
||||
Then follow "releasing the deployment" below.
|
||||
@ -52,6 +63,7 @@ Just a reminder!
|
||||
|
||||
# References
|
||||
|
||||
* http://central.sonatype.org/pages/gradle.html
|
||||
* http://central.sonatype.org/pages/gradle.html (NOTE: Documentation is out of date)
|
||||
* http://central.sonatype.org/pages/releasing-the-deployment.html
|
||||
* https://docs.gradle.org/current/userguide/publishing_maven.html
|
||||
* For all the other little pieces, Google is your friend. ;-)
|
||||
|
@ -23,6 +23,8 @@ application {
|
||||
}
|
||||
|
||||
bootJar {
|
||||
archiveBaseName = 'AppleCommander'
|
||||
archiveAppendix = 'ac'
|
||||
manifest {
|
||||
attributes 'Implementation-Title': "AppleCommander 'ac'",
|
||||
'Implementation-Version': archiveVersion
|
||||
|
@ -16,6 +16,8 @@ application {
|
||||
}
|
||||
|
||||
bootJar {
|
||||
archiveBaseName = 'AppleCommander'
|
||||
archiveAppendix = 'swing-ui'
|
||||
manifest {
|
||||
attributes 'Implementation-Title': 'AppleCommander (Swing)',
|
||||
'Implementation-Version': archiveVersion
|
||||
|
@ -20,6 +20,8 @@ application {
|
||||
}
|
||||
|
||||
bootJar {
|
||||
archiveBaseName = 'AppleCommander'
|
||||
archiveAppendix = 'linux-aarch64'
|
||||
manifest {
|
||||
attributes 'Implementation-Title': 'AppleCommander (Linux Arm)',
|
||||
'Implementation-Version': archiveVersion
|
||||
|
@ -20,6 +20,8 @@ application {
|
||||
}
|
||||
|
||||
bootJar {
|
||||
archiveBaseName = 'AppleCommander'
|
||||
archiveAppendix = 'linux-x86_64'
|
||||
manifest {
|
||||
attributes 'Implementation-Title': 'AppleCommander (Linux)',
|
||||
'Implementation-Version': archiveVersion
|
||||
|
@ -20,6 +20,8 @@ application {
|
||||
}
|
||||
|
||||
bootJar {
|
||||
archiveBaseName = 'AppleCommander'
|
||||
archiveAppendix = 'macosx-aarch64'
|
||||
manifest {
|
||||
attributes 'Implementation-Title': 'AppleCommander (Mac Arm)',
|
||||
'Implementation-Version': archiveVersion
|
||||
|
@ -20,6 +20,8 @@ application {
|
||||
}
|
||||
|
||||
bootJar {
|
||||
archiveBaseName = 'AppleCommander'
|
||||
archiveAppendix = 'macosx-x86_64'
|
||||
manifest {
|
||||
attributes 'Implementation-Title': 'AppleCommander (Mac)',
|
||||
'Implementation-Version': archiveVersion
|
||||
|
@ -20,6 +20,8 @@ application {
|
||||
}
|
||||
|
||||
bootJar {
|
||||
archiveBaseName = 'AppleCommander'
|
||||
archiveAppendix = 'win32-x86_64'
|
||||
manifest {
|
||||
attributes 'Implementation-Title': 'AppleCommander (Windows)',
|
||||
'Implementation-Version': archiveVersion
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Universal AppleCommander version number. Used for:
|
||||
# - Naming JAR file.
|
||||
# - The build will insert this into a file that is read at run time as well.
|
||||
version=1.7.0pre
|
||||
version=1.7.0-SNAPSHOT
|
||||
|
||||
# Dependency versions
|
||||
shkVersion=1.2.2
|
||||
@ -13,7 +13,3 @@ antVersion=1.8.2
|
||||
commonsLang3Version=3.7
|
||||
commonsCsvVersion=1.8
|
||||
gsonVersion=2.8.6
|
||||
|
||||
# Maven Central Repository G and A of GAV coordinate. :-)
|
||||
group=net.sf.applecommander
|
||||
archivesBaseName=AppleCommander
|
||||
|
@ -1,5 +1,7 @@
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'maven-publish'
|
||||
id 'signing'
|
||||
}
|
||||
|
||||
repositories {
|
||||
@ -15,6 +17,8 @@ dependencies {
|
||||
}
|
||||
|
||||
tasks.withType(Jar) {
|
||||
archiveBaseName = 'AppleCommander'
|
||||
archiveAppendix = 'api'
|
||||
manifest {
|
||||
attributes 'Implementation-Title': 'AppleCommander',
|
||||
'Implementation-Version': archiveVersion
|
||||
@ -32,3 +36,51 @@ java {
|
||||
withSourcesJar()
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
signing {
|
||||
sign configurations.archives
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
pom {
|
||||
groupId = "net.sf.applecommander"
|
||||
artifactId = "AppleCommander"
|
||||
name = 'AppleCommander'
|
||||
description = 'AppleCommander is a general utility for Apple II disk images.'
|
||||
url = 'https://applecommander.github.io/'
|
||||
licenses {
|
||||
license {
|
||||
name = 'The GNU General Public License (GPL) Version 2, June 1991'
|
||||
url = 'https://www.gnu.org/licenses/gpl-2.0.html'
|
||||
}
|
||||
}
|
||||
developers {
|
||||
developer {
|
||||
id = 'robgreene'
|
||||
name = 'Rob Greene'
|
||||
email = 'robgreene@gmail.com'
|
||||
}
|
||||
}
|
||||
scm {
|
||||
connection = 'scm:git:https://github.com/AppleCommander/AppleCommander.git'
|
||||
developerConnection = 'scm:git:git@github.com:AppleCommander/AppleCommander.git'
|
||||
url = 'https://github.com/AppleCommander/AppleCommander'
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
|
||||
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
|
||||
credentials {
|
||||
username = findProperty('ossrhUsername')
|
||||
password = findProperty('ossrhPassword')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,3 +41,8 @@ test {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(Jar) {
|
||||
archiveBaseName = 'AppleCommander'
|
||||
archiveAppendix = 'swt-common'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user