-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
80 lines (64 loc) · 2.13 KB
/
build.gradle
File metadata and controls
80 lines (64 loc) · 2.13 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
ext {
// lambda to generate the artifact name from a project instance
artifactName = { project -> "$rootProject.name-${project.name.replaceAll("\\p{Upper}") { "-${it.toLowerCase()}" }}" }
}
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
repositories {
mavenCentral()
}
dependencies {
if (project.hasProperty('voltdbJar')) {
implementation project.parent.files(voltdbJar)
} else {
print('In order to build against a local voltdb jar set the property: -PvoltdbJar=<path>')
implementation 'org.voltdb:voltdb:9.3.2'
}
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testImplementation 'org.mockito:mockito-junit-jupiter:3.7.7'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
}
java {
withJavadocJar()
withSourcesJar()
}
test {
useJUnitPlatform()
}
archivesBaseName = artifactName(project)
eclipse {
project {
name = archivesBaseName
}
}
jar.manifest {
attributes('Implementation-Title': archivesBaseName, 'Implementation-Version': version)
}
}
// Create "all" jars for classes, sources and javadoc
task jar(type: Jar, dependsOn: subprojects.tasks['classes']) {
archiveVersion = project.version
archiveBaseName = "$project.name-all"
destinationDirectory = file("$project.buildDir/libs")
from subprojects.sourceSets.main.output
}
task sourceJar(type: Jar) {
archiveVersion = project.version
archiveBaseName = "$project.name-all"
archiveClassifier = 'sources'
destinationDirectory = file("$project.buildDir/libs")
from subprojects.sourceSets.main.java
}
task javadocJar(type: Jar, dependsOn: subprojects.tasks['javadoc']) {
archiveVersion = project.version
archiveBaseName = "$project.name-all"
archiveClassifier = 'javadoc'
destinationDirectory = file("$project.buildDir/libs")
from subprojects.tasks['javadoc']
}
task clean(type: Delete) {
delete project.buildDir
}
task build(dependsOn: [jar, sourceJar, javadocJar])