forked from burst-apps-team/burstpool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
96 lines (83 loc) · 2.74 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
buildscript {
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4'
classpath 'nu.studer:gradle-jooq-plugin:3.0.3'
}
repositories {
mavenCentral()
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
}
}
plugins {
id "org.flywaydb.flyway" version "6.0.0-beta"
}
repositories {
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'nu.studer.jooq'
sourceCompatibility = 1.8
targetCompatibility = 1.8
def dburl = "jdbc:mariadb://localhost:3306/pooldb"
def dbusername = "root"
dependencies {
implementation 'org.apache.poi:poi-ooxml:4.1.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.9'
implementation 'com.github.burst-apps-team:burstkit4j:0.10-beta4.1'
implementation 'org.nanohttpd:nanohttpd:2.3.1'
implementation "org.flywaydb:flyway-core:5.2.4"
implementation "org.jooq:jooq"
implementation "org.jooq:jooq-meta"
implementation "org.jooq:jooq-codegen"
implementation "org.apache.logging.log4j:log4j-api:2.11.2"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.11.2"
implementation "org.slf4j:slf4j-api:1.7.26"
implementation 'com.zaxxer:HikariCP:3.3.1'
implementation group: 'org.ehcache', name: 'ehcache', version: '3.7.1'
// Needed for build script so "compile" needed
//compile "com.h2database:h2:1.4.197"
//jooqRuntime "com.h2database:h2:1.4.197"
compile group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.4.1'
jooqRuntime group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.4.1'
}
flyway {
url = "${dburl}"
user = "${dbusername}"
locations = ["filesystem:"+project.projectDir.toString()+"/src/main/resources/db/migration"]
}
jooq {
version = "3.11.9"
edition = "OSS"
burstPool(sourceSets.main) {
jdbc {
url = "${dburl}"
user = "${dbusername}"
}
generator {
name = 'org.jooq.codegen.JavaGenerator'
database {
includes = ".*"
name = "org.jooq.meta.mariadb.MariaDBDatabase"
inputSchema = "pooldb"
outputSchemaToDefault = true
}
target {
packageName = "burst.pool.db"
directory = "src/main/java"
}
}
}
}
generateBurstPoolJooqSchemaSource.dependsOn flywayMigrate
generateBurstPoolJooqSchemaSource.onlyIf {System.getProperty("generateSchema") == "true"}
flywayMigrate.onlyIf {System.getProperty("generateSchema") == "true"}
task buildJar(dependsOn: shadowJar)
jar {
manifest {
attributes 'Main-Class': 'burst.pool.Launcher'
}
}