-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
105 lines (96 loc) · 2.79 KB
/
build.gradle
File metadata and controls
105 lines (96 loc) · 2.79 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
99
100
101
102
103
104
105
buildscript {
ext {
springBootVersion = '1.3.3.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
plugins {
id "org.sonarqube" version "2.0.1"
id "net.saliman.cobertura" version "2.3.2"
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
//apply plugin: 'war'
apply plugin: 'project-report'
apply plugin: 'net.saliman.cobertura'
apply plugin: 'application'
mainClassName = 'com.udr.SpringGradleRecordDbApplication'
//apply plugin: 'checkstyle'
//apply plugin: "org.sonarqube" //this plugin needs connection to a database
//apply plugin: "sonar"
task fatJar(type: Jar) {
dependsOn clean
// manifest {
// attributes 'Implementation-Title': 'Gradle Jar File Example',
// 'Implementation-Version': version = 'fat-SNAPSHOT' ,
// 'Main-Class': "com.udr.SpringGradleRecordDbApplication"
// }
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
jar {
baseName = 'springgradlerecorddb'
version = '1.0.0'
// manifest{
// attributes "Main-Class":"com.udr.SpringGradleRecordDbApplication"
// }
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
//
//development {
// dataSource {
// dbCreate = "create-drop" // one of 'create', 'create-drop', 'update', 'validate', ''
// url = "jdbc:h2:~/cool;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
// }
dependencies {
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.boot:spring-boot-starter-jdbc')
compile('org.springframework.boot:spring-boot-starter-thymeleaf')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('com.h2database:h2')
runtime('mysql:mysql-connector-java')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
// 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'
// }
// }
//
//
// task wrapper(type: Wrapper) {
// gradleVersion = '2.12'
// }
//task stage() {
// dependsOn clean
//}
//tasks.stage.doLast() {
// delete fileTree(dir: "build/distributions")
// delete fileTree(dir: "build/assetCompile")
// delete fileTree(dir: "build/distributions")
// delete fileTree(dir: "build/libs", exclude: "*.war")
//}
//war.mustRunAfter clean
//
//task copyToLib(type: Copy) {
// into "$buildDir/server"
// from(configurations.compile) {
// include "webapp-runner*"
// }
//}
//
//stage.dependsOn(copyToLib)