This repository has been archived by the owner on Jul 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
87 lines (73 loc) · 2.48 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
plugins {
id 'java'
id 'io.freefair.git-version' version '5.1.0'
id 'io.freefair.lombok' version '5.1.0'
id 'io.freefair.javadoc-utf-8' version '5.1.0'
id 'io.freefair.javadoc-links' version '5.1.0'
id 'checkstyle'
}
group 'net.getnova.backend'
version version.toString().startsWith('v') ? version.toString().substring(1) : version
sourceCompatibility = JavaVersion.VERSION_14
targetCompatibility = JavaVersion.VERSION_14
repositories {
maven {
url "https://repo.rubidium.ml/repository/snapshots/"
}
mavenCentral()
jcenter()
}
dependencies {
implementation 'net.getnova.backend:nova-logging:+'
implementation 'net.getnova.backend:nova-service:+'
implementation 'net.getnova.backend:nova-injection:+'
implementation 'net.getnova.backend:nova-config:+'
implementation 'net.getnova.backend:nova-codec-http:+'
runtimeOnly 'net.getnova.backend:nova-bootstrap:+'
}
jar {
manifest {
attributes([
"Specification-Title" : project.name,
"Specification-Vendor" : "Nova Project (https://github.com/getnova)",
"Specification-Version" : project.version,
"Implementation-Title" : project.name,
"Implementation-Version" : project.version,
"Implementation-Vendor" : "Nova Project (https://github.com/getnova)",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"Module-Name" : project.name,
"Module-Version" : project.version,
"Module-Services" : "net.getnova.backend.maven.MavenServer"
])
}
from {
configurations.compile.collect { it.isDirectory() || it.getName().toLowerCase().endsWith(".pom") ? it : zipTree(it) }
}
}
lombok {
config.put('lombok.equalsandhashcode.callsuper', 'CALL')
}
def checkstyleDir = "${rootDir}/config/checkstyle"
tasks.withType(Checkstyle) {
reports {
xml.enabled false
html.enabled true
}
}
checkstyleMain {
configFile = file("${checkstyleDir}/main.xml")
}
checkstyleTest {
configFile = file("${checkstyleDir}/test.xml")
}
task copyJavaDocStyles(type: Copy) {
from "$rootDir/gradle/javadoc.css"
rename "javadoc.css", "stylesheet.css"
into "$buildDir/docs/aggregateJavadoc/"
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
finalizedBy copyJavaDocStyles
}