-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
104 lines (92 loc) · 3.36 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
buildscript {
ext.kotlin_version = '1.3.21'
ext.ktor_version = '1.0.0'
ext.notary_version = 'c862dcf06552eea3e9b1f52a2c7871a704d1708e'
ext.chain_adapter_client_version= '0dccefacf28b75b9e52022d785f57fe9f41638ae'
ext.reverse_chain_adapter_version='83162b66c99b2821be326477e9c78a2c5e50efeb'
repositories {
mavenCentral()
jcenter()
// gradle plugins repository
gradlePluginPortal()
}
configurations.maybeCreate("pitest")
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.3.0'
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.1'
pitest 'org.pitest:pitest-junit5-plugin:0.3'
}
}
plugins {
id "org.sonarqube" version "2.7.1"
id "com.github.dolgopolovwork.testreport" version "1"
}
group = 'd3'
version = '1.0-SNAPSHOT'
apply plugin: 'info.solidsoft.pitest'
apply plugin: 'com.github.johnrengelman.shadow'
testReport {
testFolders = Arrays.asList("notary-btc-integration-test")
}
allprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven'
repositories {
mavenCentral()
// for Ktor
jcenter()
maven { url = 'https://dl.bintray.com/kotlin/ktor' }
maven { url 'https://jitpack.io' }
}
}
sourceCompatibility = 1.8
// ------------------| Test dependencies |------------------
allprojects {
dependencies {
// unit tests
testCompile('org.junit.jupiter:junit-jupiter-api:5.2.0')
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.2.0')
// https://mvnrepository.com/artifact/org.mockito/mockito-all
testCompile group: 'org.mockito', name: 'mockito-all', version: '2.0.2-beta'
testCompile('com.nhaarman:mockito-kotlin:1.5.0') {
exclude group: 'org.jetbrains.kotlin'
exclude group: 'org.mockito'
}
// to run both junit4 and junit5 tests
testRuntime("org.junit.vintage:junit-vintage-engine:5.2.0")
}
}
allprojects {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}
allprojects{
sonarqube {
properties {
property "sonar.github.repository", "d3ledger/d3-btc"
property "sonar.projectKey", "d3:d3-btc"
property "sonar.java.binaries", "${project.projectDir}/build/classes"
property "sonar.java.libraries", "${project.projectDir}/build/libs"
property "sonar.java.test.binaries", "${project.projectDir}/build/test-results/test/binary"
property "sonar.exclusions", "notary-btc-integration-test/**"
}
}
}
// -------------------------| PIT mutation testing |-------------------------
pitest {
pitestVersion = "1.3.0"
testPlugin = "junit5"
targetClasses = ['util.*', 'notary.*', 'registration.*', 'withdrawalservice.*']
excludedClasses = ['notary.db.*', '*Test*']
targetTests = ['util.*', 'notary.*', 'registration.*', 'withdrawalservice.*']
avoidCallsTo = ['kotlin.jvm.internal', 'mu']
mutators = ['CONDITIONALS_BOUNDARY', 'NEGATE_CONDITIONALS', 'REMOVE_CONDITIONALS', 'MATH', 'INCREMENTS',
'INVERT_NEGS', 'INLINE_CONSTS', 'VOID_METHOD_CALLS']
}