-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
54 lines (50 loc) · 1.69 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
plugins {
id "com.timgroup.jarmangit" version "1.1.117" apply false
id "com.github.maiflai.scalatest" version "0.30" apply false
id "com.google.protobuf" version "0.8.15" apply false
id "scala-properties"
}
ext {
buildNumber = System.getenv("BUILD_NUMBER") ?: System.getenv("TRAVIS_BUILD_NUMBER")
mysqlJdbcVersion = "5.1.47"
protobufVersion = "3.9.2"
}
tasks.register("createDb") {
doFirst {
def mysql_exec = { db, cmd ->
project.exec {
if (db) {
commandLine("mysql", db, "-e$cmd")
}
else {
commandLine("mysql", "-e$cmd")
}
environment("MYSQL_HOST", "127.0.0.1")
}
}
mysql_exec(null, "drop database if exists sql_eventstore")
mysql_exec(null, "create database sql_eventstore")
mysql_exec("sql_eventstore", "CREATE TABLE Event(eventType VARCHAR(255), body BLOB, version INT PRIMARY KEY, effective_timestamp datetime)")
}
}
tasks.register("publishScala")
subprojects {
afterEvaluate {
if (project.plugins.hasPlugin("scala")) {
rootProject.tasks.named("publishScala").configure {
it.dependsOn(tasks.named("publish"))
}
dependencies {
constraints {
zinc("org.apache.logging.log4j:log4j-core") {
version {
strictly("[2.16, 3[")
prefer("2.16.0")
}
because("CVE-2021-44228: Log4j vulnerable to remote code execution")
}
}
}
}
}
}