bastools/api/build.gradle

82 lines
1.8 KiB
Groovy
Raw Normal View History

repositories {
jcenter()
}
apply plugin: 'java-library'
apply plugin: 'maven'
apply plugin: 'signing'
dependencies {
testImplementation 'junit:junit:4.12'
}
2018-06-09 03:42:11 +00:00
jar {
manifest {
attributes(
'Implementation-Title': 'B/BAS Tools API',
2018-06-09 03:42:11 +00:00
'Implementation-Version': "${version} (${new Date().format('yyyy-MM-dd HH:mm')})"
)
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
// Only sign if we're uploading...
required { gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: findProperty('ossrhUsername'), password: findProperty('ossrhPassword'))
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: findProperty('ossrhUsername'), password: findProperty('ossrhPassword'))
}
pom.project {
name archivesBaseName
packaging 'jar'
description 'An Applesoft BASIC tools library.'
url 'https://applecommander.github.io/'
scm {
url 'https://github.com/AppleCommander/bastools'
}
licenses {
license {
name 'The GNU General Public License (GPL) Version 3, 29 June 2007'
url 'https://www.gnu.org/licenses/gpl-3.0.html'
}
}
developers {
developer {
id 'robgreene'
email 'robgreene@gmail.com'
}
}
}
}
}
}