-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.gradle
142 lines (119 loc) · 3.58 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
buildscript {
ext {
kotlinVersion = '1.3.61'
springBootVersion = '1.5.9.RELEASE'
cmarkVersion = '0.13.1'
}
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath "org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}"
classpath "org.jetbrains.kotlin:kotlin-noarg:${kotlinVersion}"
}
}
plugins {
id "com.eriwen.gradle.css" version "2.14.0"
id "com.eriwen.gradle.js" version "2.14.1"
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'org.springframework.boot'
apply plugin: "kotlin-allopen"
apply plugin: "kotlin-spring"
apply plugin: "kotlin-noarg"
jar {
baseName = 'sage'
version = '2.0-SNAPSHOT'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.compilerArgs.add '-parameters'
compileTestJava.options.compilerArgs.add '-parameters'
compileKotlin.kotlinOptions.jvmTarget = '1.8'
compileTestKotlin.kotlinOptions.jvmTarget = '1.8'
springBoot {
mainClass = 'sage.ApplicationKt'
}
noArg {
annotation("sage.annotation.KotlinNoArg")
}
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}"
compile "org.springframework.boot:spring-boot-starter-aop:${springBootVersion}"
compile "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
compile 'com.github.httl:httl:1.0.11'
compile 'com.github.httl:httl-springmvc:1.0.11'
compile ('org.avaje.ebeanorm:avaje-ebeanorm:7.9.1') {
exclude group: 'org.slf4j', module: 'slf4j-api'
exclude group: 'ch.qos.logback', module: 'logback-classic'
}
compile 'org.avaje.ebeanorm:avaje-ebeanorm-agent:4.9.2'
compile 'org.avaje:avaje-agentloader:2.1.2'
compile 'org.jasypt:jasypt:1.9.3'
compile 'com.google.guava:guava:27.1-jre'
compile 'org.apache.commons:commons-lang3:3.9'
compile 'commons-fileupload:commons-fileupload:1.3.3'
compile 'org.jsoup:jsoup:1.11.3'
compile "com.atlassian.commonmark:commonmark:${cmarkVersion}"
compile "com.atlassian.commonmark:commonmark-ext-autolink:${cmarkVersion}"
compile "com.atlassian.commonmark:commonmark-ext-gfm-strikethrough:${cmarkVersion}"
compile "com.atlassian.commonmark:commonmark-ext-gfm-tables:${cmarkVersion}"
compile "com.atlassian.commonmark:commonmark-ext-heading-anchor:${cmarkVersion}"
compile 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.5.1'
compile 'org.elasticsearch.client:elasticsearch-rest-client:7.5.1'
compile 'org.elasticsearch:elasticsearch:7.5.1'
runtime 'mysql:mysql-connector-java:5.1.38'
testCompile "org.springframework.boot:spring-boot-starter-test:${springBootVersion}"
}
ext {
staticSrc = 'src/main/webapp/static'
}
css.source {
dev {
css {
srcDir "${staticSrc}/css"
include "*.css"
}
}
}
combineCss {
source = css.source.dev.css.files
dest = "${staticSrc}/css-bin/all.css"
}
minifyCss {
source = combineCss
dest = "${staticSrc}/css-bin/all.css"
}
javascript.source {
dev {
js {
srcDir "src/main/webapp/static/js"
include "*.js"
}
}
}
task combinejs(type: com.eriwen.gradle.js.tasks.CombineJsTask) {
source = javascript.source.dev.js.files
dest = file("${staticSrc}/js-bin/all.js")
}
task minifyjs(type: com.eriwen.gradle.js.tasks.MinifyJsTask) {
source = combinejs
dest = file("${staticSrc}/js-bin/all.js")
closure {
warningLevel = 'QUIET'
}
}
task web {
dependsOn 'combineCss'
dependsOn 'combinejs'
}
task webmin {
dependsOn 'minifyCss'
dependsOn 'minifyjs'
}