-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
98 lines (89 loc) · 2.46 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
plugins {
id 'java'
id 'idea'
id 'maven-publish'
id 'signing'
id 'io.github.gradle-nexus.publish-plugin' version '1.0.0'
id "biz.aQute.bnd.builder" version "6.4.0"
}
group 'com.fortify.plugin'
version '1.2.2320.0'
description 'Fortify Plugin API'
apply from: 'bundle.gradle'
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives(sourcesJar) {
type 'source'
}
archives(javadocJar) {
type 'javadoc'
}
}
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
// disable the crazy super-strict doclint tool in Java 8
//noinspection SpellCheckingInspection
options.addStringOption('Xdoclint:none', '-quiet')
}
}
publishing {
publications {
mavenJava(MavenPublication) {
pom {
groupId = project.group
artifactId = project.name
name = project.name
version = project.version
description = project.description
url = 'https://github.com/fortify/plugin-api'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'fortify'
name = 'Fortify'
email = 'fortify-oss@fortify.com'
organization = 'Micro Focus Fortify'
organizationUrl = 'https://www.microfocus.com/en-us/cyberres/application-security'
}
}
scm {
connection = "scm:git:https://github.com/fortify/${rootProject.name}.git"
developerConnection = "scm:git:https://github.com/fortify/${rootProject.name}.git"
url = "https://github.com/fortify/${rootProject.name}"
}
}
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
// Sign using signingKey and signingPassword properties
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
required { gradle.taskGraph.hasTask("publishToOSSRH") }
sign publishing.publications.mavenJava
}
// Publish using OSSRHUsername and OSSRHPassword properties
nexusPublishing {
repositories {
OSSRH {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}