forked from d3ledger/chain-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
98 lines (86 loc) · 2.78 KB
/
build.gradle
File metadata and controls
98 lines (86 loc) · 2.78 KB
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
buildscript {
ext.kotlin_version = '1.3.10'
ext.notary_version = '7bc1c156b5'
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.1'
}
}
repositories {
mavenCentral()
jcenter()
maven { url = 'https://dl.bintray.com/kotlin/ktor' }
maven { url 'https://jitpack.io' }
}
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'maven'
apply plugin: 'application'
mainClassName='com.d3.chainadapter.ChainAdapterMain'
shadowDistZip.classifier = 'shadow'
shadowDistTar.classifier = 'shadow'
shadowJar.archiveName = 'chain-adapter-all.jar'
sourceSets {
integrationTest {
kotlin {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDirs += 'src/integration-test/kotlin'
}
resources {
srcDirs = ["src/integration-test/resources"]
}
}
}
wrapper {
gradleVersion = 4.10
}
task integrationTest(type: Test) {
group = LifecycleBasePlugin.VERIFICATION_GROUP
description = 'Runs chain-adapter integration tests'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
// Enable JUnit5 tests
useJUnitPlatform {
}
mustRunAfter test
}
check.dependsOn integrationTest
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
task runIrohaChainAdapter(type: JavaExec) {
main = 'com.d3.chainadapter.ChainAdapterMain'
classpath = sourceSets.main.runtimeClasspath
}
dependencies {
//TODO change version after D3 release
compile "com.github.d3ledger.notary:notary-commons:$notary_version"
testCompile "com.github.d3ledger.notary:notary-iroha-integration-test:$notary_version"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compile "com.rabbitmq:amqp-client:5.6.0"
// 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")
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}