-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.old
147 lines (125 loc) · 4.58 KB
/
build.gradle.old
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
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 "7.3.2"
id "distribution"
id 'com.palantir.git-version' version '0.12.2'
}
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
dependencies {
implementation 'org.apache.poi:poi-ooxml:4.1.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.10'
implementation 'com.github.signum-network:signumj:843c24020b'
//implementation files('C:/Users/73525/.gradle/caches/modules-2/files-2.1/com.github.signum-network/signumj/843c24020b/706a444600956079271aeb9da121c02ca0b4044/signumj.jar')
implementation 'org.nanohttpd:nanohttpd:2.3.1'
implementation "org.flywaydb:flyway-core:6.5.0"
implementation "com.h2database:h2:1.4.199"
implementation "org.jooq:jooq"
implementation "org.jooq:jooq-meta"
implementation "org.jooq:jooq-codegen"
implementation "org.apache.logging.log4j:log4j-api:2.16.0"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.16.0"
implementation "org.slf4j:slf4j-api:1.7.26"
implementation 'com.zaxxer:HikariCP:3.3.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation group: 'org.ehcache', name: 'ehcache', version: '3.7.1'
// https://mvnrepository.com/artifact/javax.annotation/javax.annotation-api
implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
// Needed for build script so "compile" needed
compile "com.h2database:h2:1.4.197"
compile group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.4.1'
compile group: 'com.h2database', name: 'h2', version: '1.4.199'
//jooqRuntime "com.h2database:h2:1.4.199"
jooqRuntime group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.4.1'
}
def schema_dburl = "jdbc:mariadb://localhost:3306/pooldb"
def schema_dbusername = "user"
def schema_dbpassword = "pass"
//def schema_dburl = "jdbc:h2:file:./jooq-schema;AUTO_SERVER=TRUE"
flyway {
url = "${schema_dburl}"
user = "${schema_dbusername}"
password = "${schema_dbpassword}"
locations = ["filesystem:"+project.projectDir.toString()+"/src/main/resources/db/migration"]
//locations = ["filesystem:"+project.projectDir.toString()+"/src/main/resources/db/migration_h2"]
}
jooq {
version = "3.11.9"
edition = "OSS"
burstPool(sourceSets.main) {
jdbc {
//driver = 'org.h2.Driver'
url = "${schema_dburl}"
user = "${schema_dbusername}"
password = "${schema_dbpassword}"
}
generator {
name = 'org.jooq.codegen.JavaGenerator'
database {
includes = ".*"
name = "org.jooq.meta.mariadb.MariaDBDatabase"
inputSchema = "pooldb"
//name = "org.jooq.meta.h2.H2Database"
//inputSchema = 'PUBLIC'
excludes = ''
outputSchemaToDefault = true
}
target {
packageName = "burst.pool.db"
directory = "src/main/java"
}
}
}
}
// use the following to generate the schema tables:
// ./gradlew build -DgenerateSchema=true
generateBurstPoolJooqSchemaSource.dependsOn flywayMigrate
generateBurstPoolJooqSchemaSource.onlyIf {System.getProperty("generateSchema") == "true"}
flywayMigrate.onlyIf {System.getProperty("generateSchema") == "true"}
def details = versionDetails()
task versionProp() {
doFirst {
new File(sourceSets.main.output.resourcesDir, "/version.properties").text = "version:${details.lastTag}"
}
}
task buildJar(dependsOn: shadowJar)
jar {
manifest {
attributes 'Main-Class': 'burst.pool.Launcher'
}
}
shadowJar.dependsOn versionProp
distributions {
main {
distributionBaseName = "signum-pool-${details.lastTag}"
contents {
from 'dist/icon.ico'
from 'dist/icon.png'
from 'dist/pool.properties'
from 'dist/logging.xml'
from 'License'
into('html') {
from 'react-pool/build/'
}
from project.tasks.shadowJar.outputs.files
}
}
}