This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 89
/
Copy pathbuild.gradle
60 lines (52 loc) · 1.84 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
subprojects {
apply plugin: 'maven'
apply plugin: 'signing'
group = 'org.owasp.passfault'
version = '0.9.0-SNAPSHOT' //using SNAPSHOT in the version will trigger a different uploadArchives behavior
archivesBaseName = rootProject.name + '-' + project.name
repositories {
mavenCentral()
}
}
if (project.hasProperty('sonatypeUsername')){
subprojects {
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
ext.snapshotRepo = "https://oss.sonatype.org/content/repositories/snapshots/"
ext.stagingRepo = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
ext.repo = ext.snapshotRepo
if (!version.endsWith('SNAPSHOT')){
ext.repo = ext.stagingRepo
}
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: ext.repo){
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.project {
name archivesBaseName
packaging 'jar'
description 'OWASP Passfault evaluates password strength and enforces password policy'
url 'https://passfault.com/'
scm {
url 'scm:[email protected]:owasp/passfault'
connection 'scm:[email protected]:owasp/passfault/passfault.git'
developerConnection 'scm:[email protected]:owasp/passfault/passfault.git'
}
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 'c-a-m'; name 'Cam Morris' } }
}//pom.project
}//maven deployer
}//repositories
}//uploadArchives
}//subprojects
}//if snapshot url