2018-09-06 13:47:33 +00:00
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'checkstyle'
|
2023-07-26 14:44:39 +00:00
|
|
|
apply plugin: 'maven'
|
|
|
|
apply plugin: 'signing'
|
2018-09-06 13:47:33 +00:00
|
|
|
|
|
|
|
sourceCompatibility = 1.8
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile libs.commons_lang
|
|
|
|
|
|
|
|
testCompile libs.mockito
|
|
|
|
testCompile libs.testng
|
|
|
|
}
|
|
|
|
|
|
|
|
ext.configDir = new File(projectDir, 'config')
|
|
|
|
ext.checkstyleConfigDir = "$configDir/checkstyle"
|
|
|
|
|
|
|
|
checkstyle {
|
2023-07-21 14:37:11 +00:00
|
|
|
toolVersion = '8.45.1'
|
2018-09-06 13:47:33 +00:00
|
|
|
configFile = checkstyleConfigFile
|
|
|
|
configProperties.put('basedir', checkstyleConfigDir)
|
|
|
|
ignoreFailures = false
|
|
|
|
showViolations = true
|
|
|
|
}
|
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
maven(MavenPublication) {
|
|
|
|
artifactId 'hirs-structs'
|
|
|
|
from components.java
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-12 01:11:32 +00:00
|
|
|
// Maven packaging and signing
|
|
|
|
group = 'io.github.nsacyber.hirs'
|
2023-07-27 19:42:50 +00:00
|
|
|
version = '2.2.0'
|
2023-07-26 14:44:39 +00:00
|
|
|
project.gradle.taskGraph.whenReady { graph ->
|
|
|
|
project.tasks.findAll().forEach { task ->
|
|
|
|
if (task.name.contains("signArchives") || task.name.contains("uploadArchives")) {
|
|
|
|
// If this is set to true, the signing and maven
|
|
|
|
// properties in gradle.properties must be set.
|
|
|
|
task.enabled = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-12 01:11:32 +00:00
|
|
|
tasks.withType(Javadoc) {
|
|
|
|
failOnError false
|
|
|
|
}
|
|
|
|
task javadocJar(type: Jar) {
|
|
|
|
classifier = 'javadoc'
|
|
|
|
from javadoc
|
|
|
|
}
|
|
|
|
|
|
|
|
task sourcesJar(type: Jar) {
|
|
|
|
classifier = 'sources'
|
|
|
|
from sourceSets.main.allSource
|
|
|
|
}
|
2018-09-06 13:47:33 +00:00
|
|
|
|
2023-07-12 01:11:32 +00:00
|
|
|
artifacts {
|
|
|
|
archives javadocJar, sourcesJar
|
|
|
|
}
|
|
|
|
|
|
|
|
signing {
|
|
|
|
sign configurations.archives
|
|
|
|
}
|
|
|
|
|
|
|
|
uploadArchives {
|
|
|
|
repositories {
|
|
|
|
mavenDeployer {
|
|
|
|
pom.project {
|
|
|
|
name 'HIRS_Structs'
|
|
|
|
packaging 'jar'
|
|
|
|
// optionally artifactId can be defined here
|
|
|
|
description 'Basic structures for the HIRS ACA.'
|
|
|
|
url 'https://github.com/nsacyber/hirs'
|
|
|
|
|
|
|
|
scm {
|
|
|
|
connection 'scm:git:git://github.com:nsacyber/hirs.git'
|
|
|
|
developerConnection 'scm:git:git://github.com:nsacyber/hirs.git'
|
|
|
|
url 'https://github.com/nsacyber/hirs'
|
|
|
|
}
|
|
|
|
licenses {
|
|
|
|
license {
|
|
|
|
name 'The Apache Software License, Version 2.0'
|
|
|
|
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
|
|
|
distribution 'repo'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
developers {
|
|
|
|
developer {
|
|
|
|
id 'iadgovuser29'
|
|
|
|
name 'iadgovuser29'
|
|
|
|
email '33426478+iadgovuser29@users.noreply.github.com'
|
|
|
|
organization 'NSA Cybersecurity Directorate'
|
|
|
|
organizationUrl 'https://github.com/nsacyber'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
|
|
|
|
|
|
|
repository(url: "https://${sonatypeDomain}/service/local/staging/deploy/maven2/") {
|
|
|
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
|
|
|
}
|
|
|
|
snapshotRepository(url: "https://${sonatypeDomain}/content/repositories/snapshots/") {
|
|
|
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|