AppleCommander/lib/ac-api/build.gradle

102 lines
3.1 KiB
Groovy
Raw Normal View History

plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
ext.isSnapshotVersion = version.endsWith("SNAPSHOT")
ext.isReleaseVersion = !ext.isSnapshotVersion
2022-03-07 03:17:12 +00:00
sourceCompatibility = 11
targetCompatibility = 11
repositories {
mavenCentral()
}
dependencies {
implementation "net.sf.applecommander:ShrinkItArchive:$shkVersion"
implementation "net.sf.applecommander:acdasm:$acdasmVersion"
implementation "net.sf.applecommander:bastools-api:$btVersion"
implementation "org.apache.commons:commons-csv:$commonsCsvVersion"
implementation "com.google.code.gson:gson:$gsonVersion"
testImplementation "junit:junit:$junitVersion"
}
2021-12-20 04:11:43 +00:00
tasks.withType(Jar) {
archiveBaseName = 'AppleCommander'
archiveAppendix = 'api'
2021-12-20 04:11:43 +00:00
manifest {
attributes 'Implementation-Title': 'AppleCommander',
'Implementation-Version': archiveVersion
}
2021-12-20 04:27:40 +00:00
from('../../LICENSE')
2021-12-20 04:11:43 +00:00
}
2021-12-20 04:13:37 +00:00
javadoc {
title = "AppleCommander ${version}"
source = sourceSets.main.allJava
options.addStringOption('Xdoclint:none', '-quiet')
}
2021-12-20 04:27:40 +00:00
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
2021-12-20 04:27:40 +00:00
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
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 = isSnapshotVersion ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = findProperty('ossrhUsername')
password = findProperty('ossrhPassword')
}
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}