-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
71 lines (60 loc) · 2.26 KB
/
build.gradle
File metadata and controls
71 lines (60 loc) · 2.26 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
/*
* This build file was created by by 'teekay' at '8/9/16 11:00 AM' with Gradle 2.14
*
* This build file is used to set up the build of a Web server accepting REST request to make
* database API calls, following the advice on this tutorial:
* http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-sql.html
*/
/*
* The Spring Boot gradle plugin provides many convenient features:
*
* 1. It collects all the jars on the classpath and builds a single, runnable "über-jar",
* which makes it more convenient to execute and transport your service.
*
* 2. It searches for the public static void main() method to flag as a runnable class.
*
* 3. It provides a built-in dependency resolver that sets the version number to match
* Spring Boot dependencies. You can override any version you wish, but it will default
* to Boot’s chosen set of versions.
*/
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.0.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
jar {
baseName = 'gs-rest-db-api'
version = '0.1.0'
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
// thymeleaf is a web templating engine (recall Jinja2)
// and spring-boot-starter-thymeleaf in itself is basically
// spring-boot-starter-web (minimum needed to do web coding) and
// add thymeleaf and other extra dependencies on top.
compile("org.springframework.boot:spring-boot-starter-thymeleaf")
// server maintenance tools
compile("org.springframework.boot:spring-boot-devtools")
// database access technology
compile("org.springframework.boot:spring-boot-starter-jdbc")
// REQUIRED for connection to mysql to be successful. Different
// connector is required for differnet database type.
compile("mysql:mysql-connector-java")
// recommended testing module, allowing more convenient testing of Spring Boot,
// already included testing frameworks like JUnit and various mocking libs
testCompile("org.springframework.boot:spring-boot-starter-test")
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}