-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
101 lines (83 loc) · 2.68 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
99
100
101
plugins {
id 'java'
id 'maven-publish'
id 'signing'
}
group = 'org.owasp.netryx'
version = '1.0.1'
repositories {
mavenCentral()
}
java {
withJavadocJar()
withSourcesJar()
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
implementation 'net.java.dev.jna:jna:5.14.0'
}
def isReleaseVersion = !version.endsWith("SNAPSHOT")
jar {
setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
from(configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }) {
exclude 'META-INF/*.RSA', 'META-INF/*.SF', 'META-INF/*.DSA'
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact sourcesJar
artifact javadocJar
artifact jar
pom {
groupId = 'org.owasp.netryx'
artifactId = 'memory'
version = '1.0.1'
name = 'memory'
description = 'Secure memory regions for Java applications'
url = 'https://github.com/OWASP/www-project-netryx'
licenses {
license {
name = 'BSD-2 Clause License'
url = 'https://github.com/OWASP/www-project-netryx?tab=BSD-2-Clause-1-ov-file'
}
}
scm {
url = 'https://github.com/OWASP/www-project-netryx'
connection = 'scm:git:git://github.com/OWASP/www-project-netryx.git'
developerConnection = 'scm:git:git://github.com/OWASP/www-project-netryx.git'
}
developers {
developer {
id = 'satira'
name = 'Rauf Aliyev'
email = '[email protected]'
organizationUrl = 'https://exploit.org'
}
}
}
}
}
repositories {
maven {
def releaseRepo = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotRepo = "https://oss.sonatype.org/content/repositories/snapshots/"
name = "OSSRH"
url = isReleaseVersion ? releaseRepo : snapshotRepo
credentials {
username = findProperty("ossrhUsername") ?: System.getenv("OSSRH_USERNAME")
password = findProperty("ossrhPassword") ?: System.getenv("OSSRH_PASSWORD")
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
tasks.withType(Sign).configureEach {
onlyIf { isReleaseVersion }
}
test {
useJUnitPlatform()
}