/
build.gradle.example1
91 lines (76 loc) · 2.53 KB
/
build.gradle.example1
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
buildscript {
ext {
springBootVersion = '1.5.2.RELEASE'
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
mavenCentral()
jcenter()
gradlePluginPortal()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3'
classpath 'com.fkorotkov:gradle-libraries-plugin:0.1'
classpath "gradle.plugin.se.patrikerdes:gradle-use-latest-versions-plugin:0.2.3"
classpath 'org.apache.openjpa:openjpa:3.1.1'
classpath 'com.gradle.publish:plugin-publish-plugin:0.13.0'
}
}
configurations {
integration
integrationCompile.extendsFrom testCompile
integrationRuntime.extendsFrom testRuntime
}
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: "com.github.ben-manes.versions"
apply plugin: 'com.fkorotkov.libraries'
apply plugin: 'se.patrikerdes.use-latest-versions'
jar {
baseName = 'base'
version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.8
sourceSets {
integration {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
groovy.srcDir file('src/test/integration/groovy')
}
}
idea {
module {
scopes.TEST.plus = [configurations.integration]
}
}
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-jersey') {
exclude module: "spring-boot-starter-tomcat"
}
compile("org.springframework.boot:spring-boot-starter-jetty")
//compile('org.codehaus.groovy:groovy:2.4.9')
testCompile('org.springframework.boot:spring-boot-starter-test')
compile("org.grails:gorm-hibernate5-spring-boot:6.0.9.RELEASE")
runtime('mysql:mysql-connector-java:6.0.5')
testCompile 'org.spockframework:spock-spring:1.0-groovy-2.4'
// optional dependencies for using Spock
testCompile "org.hamcrest:hamcrest-core:1.3" // only necessary if Hamcrest matchers are used
testRuntime "cglib:cglib-nodep:3.1" // allows mocking of classes (in addition to interfaces)
dependency 'org.apache.openjpa:openjpa:3.1.1'
}
task integration(type: Test) {
testClassesDir = sourceSets.integration.output.classesDir
classpath = sourceSets.integration.runtimeClasspath
// This is not needed, but I like to see which tests have run
testLogging {
events "passed", "skipped", "failed"
}
}