forked from CWTSLeiden/networkanalysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
117 lines (107 loc) · 3.51 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.palantir.git-version' version '3.0.0'
}
group = 'nl.cwts'
version = gitVersion()
repositories {
mavenCentral()
}
dependencies {
implementation 'it.unimi.dsi:fastutil-core:8.5.12'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
jar {
manifest {
attributes('Implementation-Title': project.name,
'Implementation-Version': project.version)
}
}
assemble.dependsOn shadowJar
shadowJar {
archiveBaseName.set(project.name)
archiveClassifier.set('')
archiveVersion.set(project.version)
minimize()
}
test {
useJUnitPlatform()
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/CWTSLeiden/networkanalysis"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
maven {
name = "OSSRH"
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = System.getenv("OSSRH_USERNAME")
password = System.getenv("OSSRH_PASSWORD")
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = "networkanalysis"
description = "Java package that provides data structures and algorithms for network analysis."
url = "https://github.com/CWTSLeiden/networkanalysis"
licenses {
license {
name = "MIT License"
url = "http://www.opensource.org/licenses/mit-license.php"
}
}
developers {
developer {
name = "Nees Jan van Eck"
email = "ecknjpvan@cwts.leidenuniv.nl"
url = "https://github.com/neesjanvaneck"
id = "neesjanvaneck"
}
developer {
name = "Vincent Traag"
email = "v.a.traag@cwts.leidenuniv.nl"
url = "https://github.com/vtraag"
id = "vtraag"
}
developer {
name = "Ludo Waltman"
email = "waltmanlr@cwts.leidenuniv.nl"
url = "https://github.com/ludowaltman"
id = "ludowaltman"
}
}
scm {
connection = "scm:git@github.com:CWTSLeiden/networkanalysis.git"
developerConnection = "scm:git@github.com:CWTSLeiden/networkanalysis.git"
url = "https://github.com/CWTSLeiden/networkanalysis"
}
}
}
}
}
signing {
required { gradle.taskGraph.hasTask("publish") }
def signingKey = System.getenv("GPG_SIGNING_KEY")
def signingPassword = System.getenv("GPG_SIGNING_PASSWORD")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}