-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
98 lines (94 loc) · 3.41 KB
/
build.gradle
File metadata and controls
98 lines (94 loc) · 3.41 KB
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
if (gradle.parent != null) {
tasks.register("updateVersion") {
doLast {
var fVersion = new File(projectDir, "version");
var v = fVersion.getText('UTF-8').toInteger();
v++;
fVersion.write(v.toString());
rootProject.version '0.0.' + v
subprojects {
version rootProject.version
}
}
}
tasks.register("publishAll") {
dependsOn("updateVersion")
dependsOn(":client:publish")
dependsOn(":pointToPoint:publish")
dependsOn(":cli:publish")
dependsOn(":chat:publish")
}
}
group 'io.aether'
version '0.0.' + (new File(projectDir, "version").getText('UTF-8'))
subprojects {
group rootProject.group
version rootProject.version
repositories {
mavenLocal()
mavenCentral()
maven {
url = 'http://nexus.aethernet.io/maven/releases/'
allowInsecureProtocol = true
}
}
afterEvaluate {
if (gradle.parent != null) {
if (it.plugins.hasPlugin('maven-publish')) {
publishing {
repositories {
maven {
def releasesUrl = uri("http://nexus.aethernet.io/maven/releases/")
def snapshotsUrl = uri("http://nexus.aethernet.io/maven/snapshots/")
if (version.toString().endsWith("SNAPSHOT")) {
url(snapshotsUrl)
} else {
url(releasesUrl)
}
allowInsecureProtocol = true
credentials {
username gradle.parent.rootProject.properties["aetherRepoUser"] as String
password gradle.parent.rootProject.properties["aetherRepoPassword"] as String
}
}
}
}
}
}
if (it.plugins.hasPlugin('java')) {
java {
withJavadocJar()
withSourcesJar()
}
def isLib = it.plugins.hasPlugin('java-library')
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
dependencies {
if (isLib) {
api 'org.jetbrains:annotations:24.0.1'
api 'it.unimi.dsi:fastutil:8.5.12'
} else {
implementation 'org.jetbrains:annotations:24.0.1'
implementation 'it.unimi.dsi:fastutil:8.5.12'
}
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
test {
useJUnitPlatform()
testLogging.showStandardStreams = true
enableAssertions = true
}
compileTestJava {
options.compilerArgs += ['-parameters']
}
compileJava {
options.compilerArgs += ['-parameters',
'-Xlint:unchecked',
'-Xlint:deprecation'
]
}
}
}
}