-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
180 lines (139 loc) · 5.23 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
buildscript {
ext.kotlin_version = '1.9.0'
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
}
}
plugins {
id 'com.google.cloud.tools.jib' version '3.3.0'
id "org.jetbrains.kotlin.jvm" version "1.9.0"
id "nebula.ospackage" version "9.1.1"
id "nebula.ospackage-application" version "9.1.1"
id "org.jlleitschuh.gradle.ktlint" version "12.1.2"
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'
group 'com.rustyrazorblade'
sourceCompatibility = 11
application {
applicationName = "easy-cass-stress"
mainClassName = "com.rustyrazorblade.easycassstress.MainKt"
}
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10"
implementation group: 'com.beust', name: 'jcommander', version: '1.82'
// https://mvnrepository.com/artifact/org.apache.commons/commons-text
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.3'
// https://mvnrepository.com/artifact/com.datastax.cassandra/cassandra-driver-core
implementation "org.apache.cassandra:cassandra-driver-core:3.12.1"
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.13.4'
// https://mvnrepository.com/artifact/org.reflections/reflections
implementation group: 'org.reflections', name: 'reflections', version: '0.9.11'
implementation group: "org.apache.logging.log4j", name: "log4j-api", version: "2.17.1"
implementation group: "org.apache.logging.log4j", name: "log4j-core", version:"2.17.1"
implementation 'org.apache.logging.log4j:log4j-api-kotlin:1.2.0'
// https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j18-impl
// maps the datastax driver slf4j calls to log4j
implementation 'org.apache.logging.log4j:log4j-slf4j18-impl:2.18.0'
// needed for yaml logging configurations
implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.1'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.4'
// https://mvnrepository.com/artifact/io.dropwizard.metrics/metrics-core
// need to use the same version as datastax driver
implementation group: 'io.dropwizard.metrics', name: 'metrics-core', version: '3.2.2'
// https://mvnrepository.com/artifact/com.google.guava/guava
implementation group: 'com.google.guava', name: 'guava', version: '32.1.3-jre'
// https://mvnrepository.com/artifact/com.github.ajalt/mordant
implementation group: 'com.github.ajalt', name: 'mordant', version: '1.1.0'
implementation 'io.prometheus:simpleclient:0.16.0'
implementation 'io.prometheus:simpleclient_dropwizard:0.16.0'
implementation 'io.prometheus:simpleclient_httpserver:0.16.0'
implementation group: 'me.tongfei', name: 'progressbar', version: '0.7.2'
implementation 'org.apache.commons:commons-math3:3.6.1'
implementation 'org.hdrhistogram:HdrHistogram:2.1.12'
// exporting dropwizard metrics
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.1.0'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.9.1'
testImplementation "org.jetbrains.kotlin:kotlin-test-junit"
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.4.0'
testImplementation 'io.mockk:mockk:1.12.7'
}
compileKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_11
}
compileTestKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_11
}
sourceSets {
main.java.srcDirs += "src/main/kotlin"
test.java.srcDirs += "src/test/kotlin"
}
test {
useJUnitPlatform()
}
task docs(type:Exec) {
dependsOn("shadowJar")
dependsOn("generateExamples")
environment "EASY_CASS_STRESS_VERSION", "${version}"
commandLine 'docker-compose', 'up', 'docs'
group = "Documentation"
description = "Build website documentation"
}
task generateExamples(type: Exec) {
dependsOn("shadowJar")
commandLine "manual/generate_examples.sh"
group = "Documentation"
description = "Generate examples for documentation"
}
jib {
to {
image = "rustyrazorblade/easy-cass-stress"
tags = [version, "latest"]
}
}
ospackage {
os = LINUX
link("/usr/local/bin/easy-cass-stress", "/opt/easy-cass-stress/bin/easy-cass-stress" )
packager "Jon Haddad"
maintainer "Jon Haddad"
vendor "Rustyrazorblade Consulting"
url "http://rustyrazorblade.com/easy-cass-stress/"
license "Apache License 2.0"
description "Stress Tool for Apache Cassandra by Rustyrazorblade Consulting"
}
buildDeb {
distribution "weezy,bionic,xenial,jessie"
requires("openjdk-8-jre")
group = "build"
}
buildRpm {
requires("java-1.8.0-openjdk")
user "root"
group = "build"
}
task buildAll {
group = "build"
dependsOn "buildDeb"
dependsOn "buildRpm"
dependsOn "distTar"
}
tasks.distTar {
compression = Compression.GZIP
archiveExtension.set("tar.gz")
}
assemble.mustRunAfter clean
applicationDistribution.from("LICENSE.txt") {
into ""
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
}
targetCompatibility = JavaVersion.VERSION_11