-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
66 lines (59 loc) · 1.76 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
group 'com.asakusafw.example.jdbc'
buildscript {
repositories {
maven { url 'https://asakusafw.s3.amazonaws.com/maven/releases' }
maven { url 'https://asakusafw.s3.amazonaws.com/maven/snapshots' }
mavenCentral()
}
dependencies {
classpath group: 'com.asakusafw.gradle', name: 'asakusa-distribution', version: '0.10.5-SNAPSHOT'
classpath group: 'com.h2database', name: 'h2', version: '1.4.192'
}
}
apply plugin: 'asakusafw-sdk'
apply plugin: 'asakusafw-organizer'
apply plugin: 'asakusafw-mapreduce'
apply plugin: 'asakusafw-spark'
apply plugin: 'eclipse'
configurations {
pgsqlJdbcDriver
h2JdbcDriver
}
dependencies {
pgsqlJdbcDriver group: 'postgresql', name: 'postgresql', version: '9.1-901-1.jdbc4'
h2JdbcDriver group: 'com.h2database', name: 'h2', version: '1.4.192'
}
asakusafwOrganizer {
profiles.dev {
assembly.into('') {
put 'src/dist/dev'
}
assembly.into('windgate/plugin') {
put configurations.h2JdbcDriver
}
}
profiles.prod {
windgate.retryableEnabled true
assembly.into('') {
put 'src/dist/prod'
}
assembly.into('windgate/plugin') {
put configurations.pgsqlJdbcDriver
}
}
}
task stopH2 {
doLast {
println 'Stop H2...'
org.h2.tools.Server.main("-tcpShutdown", "tcp://localhost:9092")
}
}
test {
doFirst {
println 'Start H2...'
delete "${buildDir}/h2"
org.h2.tools.Server.main("-tcp", "-baseDir", "${buildDir}/h2")
org.h2.tools.RunScript.execute("jdbc:h2:tcp://localhost:9092/asakusa", "asakusa", "asakusa", "src/main/sql/model_ddl.sql", java.nio.charset.StandardCharsets.UTF_8, false)
}
finalizedBy stopH2
}