2021-12-20 03:19:33 +00:00
|
|
|
plugins {
|
|
|
|
id 'java-library'
|
2021-12-22 01:36:51 +00:00
|
|
|
id 'maven-publish'
|
|
|
|
id 'signing'
|
2021-12-20 03:19:33 +00:00
|
|
|
}
|
|
|
|
|
2021-12-22 02:31:20 +00:00
|
|
|
ext.isSnapshotVersion = version.endsWith("SNAPSHOT")
|
|
|
|
ext.isReleaseVersion = !ext.isSnapshotVersion
|
|
|
|
|
2022-03-07 03:17:12 +00:00
|
|
|
sourceCompatibility = 11
|
|
|
|
targetCompatibility = 11
|
2022-01-04 00:24:39 +00:00
|
|
|
|
2021-12-20 03:19:33 +00:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation "net.sf.applecommander:ShrinkItArchive:$shkVersion"
|
2022-03-06 20:32:10 +00:00
|
|
|
implementation "net.sf.applecommander:acdasm:$acdasmVersion"
|
2022-03-09 03:44:15 +00:00
|
|
|
implementation "net.sf.applecommander:bastools-api:$btVersion"
|
2021-12-20 03:19:33 +00:00
|
|
|
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) {
|
2021-12-22 01:36:51 +00:00
|
|
|
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
|
|
|
|
2022-01-23 02:55:06 +00:00
|
|
|
task javadocJar(type: Jar) {
|
|
|
|
classifier = 'javadoc'
|
|
|
|
from javadoc
|
2021-12-20 04:27:40 +00:00
|
|
|
}
|
2021-12-22 01:36:51 +00:00
|
|
|
|
2022-01-23 02:55:06 +00:00
|
|
|
task sourcesJar(type: Jar) {
|
|
|
|
classifier = 'sources'
|
|
|
|
from sourceSets.main.allSource
|
2021-12-22 01:36:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
from components.java
|
2022-01-23 02:55:06 +00:00
|
|
|
artifact sourcesJar
|
|
|
|
artifact javadocJar
|
2021-12-22 01:36:51 +00:00
|
|
|
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/"
|
2021-12-22 02:31:20 +00:00
|
|
|
url = isSnapshotVersion ? snapshotsRepoUrl : releasesRepoUrl
|
2021-12-22 01:36:51 +00:00
|
|
|
credentials {
|
|
|
|
username = findProperty('ossrhUsername')
|
|
|
|
password = findProperty('ossrhPassword')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-01-23 02:55:06 +00:00
|
|
|
|
|
|
|
signing {
|
|
|
|
sign publishing.publications.mavenJava
|
|
|
|
}
|