This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
147 lines (118 loc) · 3.96 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
buildscript {
repositories {
jcenter();
mavenCentral();
}
ext {
springBootVersion = '1.3.3.RELEASE'
}
dependencies {
classpath "io.spring.gradle:dependency-management-plugin:0.5.4.RELEASE"
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath 'org.springframework:springloaded:1.2.5.RELEASE'
}
}
allprojects {
apply plugin: "io.spring.dependency-management"
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: "jacoco"
apply plugin: "maven"
// apply plugin: 'findbugs'
// apply plugin: 'checkstyle'
// apply plugin: 'pmd'
idea {
module {
inheritOutputDirs = false
outputDir = file("$buildDir/classes/main/")
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
group 'com.pungwe.cms'
version '0.0.1-SNAPSHOT'
tasks.withType(JavaCompile) {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
task wrapper(type: Wrapper) {
gradleVersion = '2.12'
}
eclipse {
classpath {
containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
}
}
}
subprojects {
repositories {
jcenter()
mavenCentral();
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
ext {
springPlatformVersion = "2.0.1.RELEASE"
hibernateVersion = "5.0.5.Final"
jacksonVersion = "2.6.3"
}
// task copyDependencies(type: Copy) {
// from configurations.runtime
// from configurations.testRuntime
// into new File(buildDir, "dependencies")
// }
//
// task writeAtomClasspath {
// new File("${projectDir}/.atom-classpath").text = "${buildDir}/classes/main:${buildDir}/classes/test:${buildDir}/dependencies/*"
// }
dependencyManagement {
imports {
mavenBom "io.spring.platform:platform-bom:${springPlatformVersion}"
}
dependencies {
// MongoDB
dependency "org.mongodb:mongodb-driver:3.1.1"
// JPA
dependency "org.hibernate:hibernate-core:${hibernateVersion}"
dependency "org.hibernate:hibernate-entitymanager:${hibernateVersion}"
dependency 'mysql:mysql-connector-java:5.1.37'
dependency "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
dependency "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
dependency "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
dependency "com.fasterxml.jackson.dataformat:jackson-dataformat-smile:${jacksonVersion}"
// Templating
dependency 'com.lyncode:jtwig-spring:3.1.1'
// Test
dependency 'com.h2database:h2:1.4.182'
dependency 'mysql:mysql-connector-java:5.1.6'
dependency 'net.sourceforge.htmlunit:htmlunit:2.19'
dependency 'org.jsoup:jsoup:1.8.3'
dependency 'joda-time:joda-time:2.9.2'
}
}
dependencies {
// Include joda in everything!
compile 'joda-time:joda-time:2.9.2'
compile("org.springframework.boot:spring-boot-devtools")
// Test stuff
testCompile 'junit:junit:4.12'
testCompile 'org.springframework:spring-test'
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination "${buildDir}/jacocoHtml"
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: ['com/pungwe/cms/core/application/**'])
})
}
}
}
project(':webapp') {
apply plugin: 'spring-boot'
}