-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
97 lines (90 loc) · 2.92 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
plugins {
id 'application'
id 'signing'
id 'maven-publish'
id 'com.github.ben-manes.versions' version '0.36.0'
id 'net.nemerosa.versioning' version '2.14.0'
id 'org.owasp.dependencycheck' version '6.1.1'
}
group = 'org.adoptopenjdk'
java {
modularity.inferModulePath = true
sourceCompatibility = JavaVersion.VERSION_11
withJavadocJar()
withSourcesJar()
}
application {
mainClass = "jdk.jsplitpkgscan.Main"
mainModule = "jdk.jsplitpkgscan"
}
// Uncomment the section below if you want to just ./gradlew publishToMavenLocal locally
/*
repositories {
mavenLocal()
}
*/
jar {
manifest {
metaInf {
from file('.')
include 'LICENSE'
}
}
}
signing {
required { project.hasProperty('signing.password') && !project.version.contains('-SNAPSHOT') }
sign configurations.archives
}
/*
* Comment out this whole section if you don't want to upload the artifact on
* a ./gradlew install
*/
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'Split package scanner'
description = 'Tool to scan existing JAR/WAR files for split packages'
url = 'https://github.com/AdoptOpenJDK/jsplitpkgscan'
scm {
connection = 'scm:git://github.com/AdoptOpenJDK/jsplitpkgscan.git'
developerConnection = 'scm:git://github.com/AdoptOpenJDK/jsplitpkgscan.git'
url = 'https://github.com/AdoptOpenJDK/jsplitpkgscan'
}
licenses {
license {
name = 'GNU General Public License, version 2, with the Classpath Exception'
url = 'http://openjdk.java.net/legal/gplv2+ce.html'
distribution = 'repo'
}
}
developers {
developer {
id = 'reinhapa'
name = 'Patrick Reinhart'
email = 'patrick@reini.net'
}
developer {
id = 'ohumbel'
name = 'Otmar Humbel'
email = 'ohumbel@gmail.com'
}
}
}
}
}
repositories {
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
maven {
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
}