-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathbuild.gradle
90 lines (75 loc) · 2.29 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
/**
* Copyright (c) KMG. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath group: 'org.nosphere.apache', name: 'creadur-rat-gradle', version: apacheRatVersion
classpath group: 'com.google.cloud.tools.jib', name: 'com.google.cloud.tools.jib.gradle.plugin', version: jibVersion
}
}
apply plugin: 'java-library'
apply plugin: "maven-publish"
apply plugin: "com.github.spotbugs"
apply plugin: 'com.google.cloud.tools.jib'
apply from: "$rootDir/gradle/rat.gradle"
apply from: "$rootDir/gradle/maven.gradle"
apply from: "$rootDir/gradle/spotbugs.gradle"
def SbmMainClass = "io.sbm.main.SbmMain"
version = project.version
jar {
manifest {
attributes 'Name': project.name.toUpperCase(),
'Specification-Title': "Storage Benchmark Kit",
'Specification-Version': project.version,
'Specification-Vendor': "KMG",
'Implementation-Title': project.name.toUpperCase(),
'Implementation-Version': project.version,
'Implementation-Vendor': "KMG"
}
}
application {
mainClass = SbmMainClass
applicationName = project.name
}
dependencies {
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: lombokVersion
implementation group: 'org.jetbrains', name: 'annotations', version: jetbrainVersion
api project(":sbk-api")
}
jib {
from {
image = 'openjdk:17-jdk'
}
to {
image = "${project.name}"
tags = ["latest", project.version]
}
container {
creationTime = 'USE_CURRENT_TIMESTAMP' // Useful for GitOps deployment approach
mainClass = SbmMainClass
ports = ['9717/tcp', '9719/tcp']
}
}
task updateDocs(dependsOn: javadoc) {
doLast {
println "Update $projectDir Javadocs"
delete "$projectDir/javadoc"
copy {
from "$projectDir/build/docs/javadoc"
into "$projectDir/javadoc"
}
}
}