-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
115 lines (98 loc) · 2.94 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
/*
* Copyright 2015 Karel Hübl <[email protected]>.
*
* This file is part of disl.
*
* Disl is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Disl is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see <http://www.gnu.org/licenses/>.
*/
plugins {
id "com.github.hierynomus.license" version "0.11.0"
}
apply plugin: 'eclipse'
apply plugin: 'groovy'
apply plugin: 'application'
sourceCompatibility = 1.7
targetCompatibility = 1.7
mainClassName='org.disl.workflow.DislLauncher'
repositories {
mavenCentral()
}
dependencies {
compile ('org.codehaus.groovy:groovy-all:2.3.10')
compile ('com.github.kaja78:disl:1.0.1')
testCompile ('junit:junit:4.12')
runtime ('org.hsqldb:hsqldb:2.3.2')
runtime 'org.slf4j:slf4j-simple:1.7.21'
}
license {
header rootProject.file('HEADER.txt')
skipExistingHeaders = true
ext.year = Calendar.getInstance().get(Calendar.YEAR)
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
task deployDataModel (type:JavaExec) {
group 'disl'
main=mainClassName
classpath = sourceSets.main.runtimeClasspath
args=['org.disl.sample.dataModel.DeployDataModel']
}
task loadTargetTables (type:JavaExec) {
group 'disl'
main=mainClassName
classpath = sourceSets.main.runtimeClasspath
args=['org.disl.sample.dataMapping.LoadTargetTables']
}
task startLocalDb (type:JavaExec) {
group 'disl'
main='org.hsqldb.server.Server'
classpath = sourceSets.main.runtimeClasspath
args=['--database.0','mem:xdb','--dbname.0','hsqldb']
}
task startDbClient (type:JavaExec) {
group 'disl'
main='org.hsqldb.util.DatabaseManagerSwing'
classpath = sourceSets.main.runtimeClasspath
args=['--url','jdbc:hsqldb:hsql://localhost/hsqldb']
}
task startLocalHugoServer {
group = 'documentation'
doLast {
'cmd /c start /d "./site" cmd /c hugo server -p 1212 --baseUrl=http://localhost:1212/site/ --noHTTPCache'.execute()
'cmd /c start http://localhost:1212/site'.execute()
}
}
task generateGithubSite {
group = 'documentation'
doLast {
'hugo --baseUrl=https://kaja78.github.com/site-hsqldb-sample/'.execute(null,new File('./hugo/site'))
}
}
task updateSite (type:JavaExec){
description = 'Update site folder with generated content.'
main = 'org.disl.workflow.DislLauncher'
args=['org.disl.sample.scripts.generateDocumentation']
classpath = sourceSets.main.runtimeClasspath
}
task disldoc(dependsOn: 'updateSite') {
group = 'documentation'
doLast {
'hugo -s site -d ../build/site'.execute()
}
}