-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
107 lines (87 loc) · 2.84 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
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* user guide available at https://docs.gradle.org/4.6/userguide/tutorial_java_projects.html
*/
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
}
}
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building an application
id 'application'
//Shadow
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
// Define the main class for the application
mainClassName = 'es.uned.yauesc.App'
test {
useJUnitPlatform()
}
sourceSets {
intTest {
java.srcDir file('src/intTest/java')
resources.srcDir file('src/intTest/resources')
compileClasspath += sourceSets.main.output + configurations.testRuntime
runtimeClasspath += output + compileClasspath
}
}
configurations {
intTestImplementation.extendsFrom implementation
}
sourceCompatibility = 1.8
version = '1.1'
jar {
manifest {
attributes 'Implementation-Title': 'yauesc',
'Implementation-Version': version,
'Main-Class': mainClassName
}
}
dependencies {
// This dependency is found on compile classpath of this component and consumers.
//compile 'com.google.guava:guava:23.0'
//OpenCsv
compile 'com.opencsv:opencsv:4.1'
//Unit Test
//Junit
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.1.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
//Mockito
testImplementation "org.mockito:mockito-core:2.+"
testRuntimeOnly "org.mockito:mockito-core:2.+"
//AssertJ Fluent Assertions
testImplementation "org.assertj:assertj-core:3.9.0"
testRuntimeOnly "org.assertj:assertj-core:3.9.0"
//Integration Test
//Junit
intTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.1.0'
intTestRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.1.0'
//AssertJ Fluent Assertions
intTestImplementation "org.assertj:assertj-core:3.9.0"
intTestRuntimeOnly "org.assertj:assertj-core:3.9.0"
}
task integrationTest(type: Test) {
description = 'Runs integration tests.'
group = 'verification'
useJUnitPlatform()
testClassesDirs = sourceSets.intTest.output.classesDirs
classpath = sourceSets.intTest.runtimeClasspath
mustRunAfter test
}
check.dependsOn integrationTest
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
mavenCentral()
}