forked from jvm-bloggers/jvm-bloggers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
158 lines (131 loc) · 4.11 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
148
149
150
151
152
153
154
155
156
157
buildscript {
ext {
springBootVersion = '1.3.2'
}
repositories {
jcenter()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.2.RELEASE")
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.4.0'
classpath 'se.transmode.gradle:gradle-docker:1.2'
classpath 'com.ofg:uptodate-gradle-plugin:+'
}
}
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'application'
apply plugin: 'docker'
apply plugin: 'com.ofg.uptodate'
jar {
baseName = 'jvm-bloggers'
version = '0.8.0'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
ext {
wicketVersion = '7.2.0'
}
dependencies {
// Spring Boot stuff
compile "org.springframework.boot:spring-boot-starter-data-jpa"
compile "org.springframework.boot:spring-boot-starter-web"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile 'com.github.ulisesbocchio:jasypt-spring-boot:1.6'
compile 'org.springframework.boot:spring-boot-devtools'
// Logic
compile 'com.typesafe.akka:akka-actor_2.10:2.3.14'
compile 'com.typesafe.akka:akka-slf4j_2.10:2.3.14'
compile 'com.rometools:rome:1.5.1'
// View
compile 'com.giffing.wicket.spring.boot.starter:wicket-spring-boot-starter:0.0.13'
compile "org.apache.wicket:wicket-devutils:$wicketVersion"
compile "org.apache.wicket:wicket-auth-roles:$wicketVersion"
compile "com.googlecode.wicket-jquery-ui:wicket-jquery-ui:$wicketVersion"
compile "com.googlecode.wicket-jquery-ui:wicket-jquery-ui-plugins:$wicketVersion"
// Utils and helpers
compile "org.projectlombok:lombok:1.16.8"
compile 'com.google.guava:guava:19.0'
compile 'io.reactivex:rxjava:1.1.2'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'org.antlr:ST4:4.0.8'
compile 'org.glassfish.jersey.core:jersey-client:2.22.2'
compile 'net.jcip:jcip-annotations:1.0'
compile 'org.objenesis:objenesis:2.2'
compile 'commons-validator:commons-validator:1.3.1'
// Database related
compile "org.postgresql:postgresql:9.4.1208.jre7"
compile 'org.liquibase:liquibase-core:3.4.2'
// Test dependencies
testCompile "org.springframework.boot:spring-boot-starter-test"
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'org.spockframework:spock-spring:1.0-groovy-2.4'
testCompile 'cglib:cglib-nodep:3.2.1'
testCompile 'org.codehaus.groovy:groovy:2.4.6'
testCompile 'com.typesafe.akka:akka-testkit_2.10:2.3.14'
runtime 'com.h2database:h2'
}
checkstyle {
toolVersion = "6.16.1"
}
jacoco {
toolVersion = "0.7.6.201602180812"
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
tasks.coveralls {
dependsOn 'check'
}
group = 'tdziurko'
task buildDocker(type: Docker, dependsOn: build) {
push = true
applicationName = jar.baseName
dockerfile = file('src/main/docker/Dockerfile')
tagVersion = jar.version + '-' + getTimestampWithGitHash()
doFirst {
copy {
from jar
into stageDir
}
}
}
bootRun {
systemProperties = System.properties
}
test {
systemProperty "file.encoding", "utf-8"
}
check.dependsOn 'uptodate'
String getTimestampWithGitHash() {
String timeStamp = new Date().format('yyyyMMdd-HHmmss')
String cmd = "git log --pretty=format:%h -n 1"
def proc = cmd.execute()
proc.waitFor()
return timeStamp + '-' + proc.in.text
}
task stage(dependsOn: ['build', 'clean'])
build.mustRunAfter clean
wrapper {
gradleVersion "2.12"
}
sourceSets.main.resources.srcDir 'src/main/java'