-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
121 lines (104 loc) · 3.88 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
apply plugin: 'base'
apply plugin: 'sonar-runner'
project.group = 'me.xyzlast.test'
project.version = '1.0.0'
ext {
javaVersion = 1.8
springVersion = "4.0.6.RELEASE"
webContainer = 'tomcat8'
}
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url 'http://repo.springsource.org/plugins-release' }
}
dependencies {
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
classpath 'org.gradle.api.plugins:gradle-cargo-plugin:1.4'
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'eclipse-wtp'
apply plugin: 'jacoco'
apply plugin: 'idea'
apply plugin: 'groovy'
apply plugin: 'propdeps'
apply plugin: 'propdeps-maven'
apply plugin: 'propdeps-idea'
apply plugin: 'propdeps-eclipse'
jacoco {
toolVersion = '0.7.1-SNAPSHOT'
reportsDir = file("${rootProject.buildDir}/reports/codecoverage")
}
jacocoTestReport {
reports {
xml.destination "${project.buildDir}/reports/codecoverage/result.xml"
xml.enabled true
csv.enabled false
html.destination "${project.buildDir}/reports/codecoverage/html"
}
}
test {
jacoco {
destinationFile = file("${project.buildDir}/jacoco/jacoco.exec")
classDumpFile = file("${project.buildDir}/jacoco/classpathdumps")
excludes = ['**/entities/**/*']
append = true
}
}
if(project.hasProperty('target')) {
sourceSets {
main.resources.srcDirs = ['src/main/resources', "src/main/resources-${project.target}"]
}
} else {
String hostname = InetAddress.getLocalHost().getHostName();
if(hostname.endsWith('.local')) { //맥의 경우, .local 이 모든 hostname에 추가됩니다.
hostname = hostname.replace(".local", '')
}
sourceSets {
main.resources.srcDirs = ['src/main/resources', "src/main/resources-" + hostname]
}
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url 'http://repo.spring.io/snapshot' }
maven { url 'https://github.com/spring-projects/spring-framework' }
maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
maven { url 'http://repo.spring.io/milestone' }
maven { url 'http://download.java.net/maven/2' }
maven { url 'https://maven.java.net/content/repositories/releases' }
}
dependencies {
compile 'org.slf4j:slf4j-api:1.7.6'
compile 'org.slf4j:jcl-over-slf4j:1.7.6'
compile 'ch.qos.logback:logback-classic:1.0.13'
compile 'ch.qos.logback:logback-core:1.0.13'
testCompile "junit:junit:4.11"
testCompile 'org.mockito:mockito-core:1.9.5'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile "org.springframework:spring-test:${rootProject.ext.springVersion}"
testCompile "org.spockframework:spock-core:1.0-groovy-2.0-SNAPSHOT"
testCompile "org.spockframework:spock-spring:1.0-groovy-2.0-SNAPSHOT"
}
sourceCompatibility = rootProject.ext.javaVersion
targetCompatibility = rootProject.ext.javaVersion
}
sonarRunner {
sonarProperties {
property "sonar.host.url", "http://192.168.13.209:9000"
property "sonar.jdbc.url", "jdbc:mysql://192.168.13.209:3306/sonar"
property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver"
property "sonar.jdbc.username", "root"
property "sonar.jdbc.password", 'qwer12#$'
}
}
task help << {
println 'gradle :privateWeb:appRun >> jetty9을 이용한 web server 구동'
println 'gradle :privateWeb:tomcatRun >> tomcat8을 이용한 web server 구동'
}