-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
57 lines (51 loc) · 1.4 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
plugins {
id 'java'
id 'nu.studer.jooq' version '3.0.2'
id 'application'
}
group 'me.mupu'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
//run the properties.gradle script
apply from: 'properties.gradle'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
jooqRuntime 'mysql:mysql-connector-java:8.0.12'
implementation 'org.jooq:jooq:3.11.5'
implementation 'org.jooq:jooq-meta:3.11.5'
implementation 'org.jooq:jooq-codegen:3.11.5'
implementation 'mysql:mysql-connector-java:8.0.12'
}
jooq {
version = '3.11.5'
sample(sourceSets.main) {
jdbc {
user = puser
password = ppassword
url = purl
driver = pdriver
}
generator {
database {
name = 'org.jooq.meta.mysql.MySQLDatabase'
inputSchema = pdatabaseName
}
target {
packageName = 'jooq'
}
}
}
}
task runMain(type: JavaExec) {
classpath sourceSets.main.runtimeClasspath
main = "me.mupu.Application"
// add system properties so the java programm can get this data
System.setProperty("user", "$puser")
System.setProperty("password", "$ppassword")
System.setProperty("url", "$purl")
System.setProperty("driver", "$pdriver")
systemProperties(System.getProperties().subMap(["user","password","url","driver"]))
}