-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
91 lines (80 loc) · 1.95 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
import com.github.spotbugs.SpotBugsTask
plugins {
id 'java'
id 'com.diffplug.gradle.spotless' version '3.24.0'
id 'com.github.spotbugs' version '2.0.0'
id 'idea'
id 'nu.studer.jooq' version '3.0.3'
id 'maven-publish'
}
repositories {
mavenCentral()
mavenLocal()
}
ext {
jooqVersion = '3.11.11'
}
spotless {
java {
googleJavaFormat('1.7')
}
}
tasks.withType(SpotBugsTask) {
reports {
xml.enabled = false
html.enabled = true
}
}
idea {
module {
outputDir file('build/classes/main')
testOutputDir file('build/classes/test')
}
}
jooq {
version = jooqVersion
edition = 'OSS'
sample(sourceSets.main) {
jdbc {
driver = 'org.postgresql.Driver'
url = 'jdbc:postgresql://localhost:5432/discogs'
user = 'discogs'
password = 'discogs'
}
generator {
name = 'org.jooq.codegen.DefaultGenerator'
database {
name = 'org.jooq.meta.postgres.PostgresDatabase'
inputSchema = 'discogs'
}
generate {
relations = true
deprecated = false
records = true
fluentSetters = true
}
target {
packageName = 'tslic.discogs'
directory = 'src/generated/jooq'
}
}
}
}
// removes the task dependency from compileJava to generateSampleJooqSchemaSource
project.tasks.getByName('compileJava').dependsOn -= 'generateSampleJooqSchemaSource'
dependencies {
jooqRuntime 'org.postgresql:postgresql:42.2.6'
compile "org.jooq:jooq:$jooqVersion"
compile 'javax.annotation:javax.annotation-api:1.3.2'
}
group = 'tslic.discogs'
version = '1.0'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}