forked from gchq/event-logging-schema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
86 lines (70 loc) · 2.12 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
import java.util.regex.Pattern
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'ca.cutterslade.gradle', name: 'gradle-dependency-analyze', version: '1.2.0'
}
}
plugins {
id "com.github.johnrengelman.shadow" version "6.1.0" apply false
}
def projectGroup = "event-logging-transformer"
//must be applied to all projects including root
apply plugin: 'ca.cutterslade.analyze'
//if the project has a value for the passed property (i.e from the cmd line via -PpropName=xxx)
//use that, else use a default value
ext.getPropertyOrDefault = { propName, defaultValue ->
def val;
if (project.hasProperty(propName) && project.getProperty(propName) != "unspecified" && project.getProperty(propName) != "") {
val = project.getProperty(propName)
println "Using propery [${propName}] with value [${val}]"
} else {
val = defaultValue
println "Propery [${propName}] has no value, using default value [${val}]"
}
return val;
}
ext.versions = [
//------event-logging--------------
eventLogging: getPropertyOrDefault('version', 'SNAPSHOT'),
//------------3rd-party------------
assertj: '3.6.2',
javaDiffUtils: '4.0',
jackson: '2.8.9',
junit: '4.12',
logback: '1.2.3',
saxon: '9.6.0-6',
slf4j: '1.7.22',
systemRules: '1.19.0',
zzDUMMYzz: 'makes sorting easier'
]
allprojects {
version versions.eventLogging
}
subprojects {
apply plugin: 'java'
apply plugin: 'ca.cutterslade.analyze'
apply plugin: 'idea'
group "$projectGroup"
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
mavenLocal()
}
configurations {
all {
exclude group: "org.slf4j", module: "slf4j-log4j12"
exclude group: "log4j", module: "log4j"
resolutionStrategy {
dependencySubstitution {
substitute module('log4j:log4j') with module('org.slf4j:log4j-over-slf4j:$versions.slf4j')
}
forcedModules = [
]
}
}
}
}