-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
136 lines (111 loc) · 3.93 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
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
/*
* Copyright 2020 ThoughtWorks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'java'
id 'application'
id 'com.github.jk1.dependency-license-report' version '2.5'
id 'io.github.humblerookie.gradle' version '0.5.0'
}
group = 'cd.go.gocd'
version = '1.0.4'
project.ext.projectDesc = [
id : 'cd.go.gocd.gocd-database-migrator',
repo : 'gocd-database-migrator',
version : project.version,
name : 'GoCD Database Migrator',
description: 'Tool to help migrator pre-20.5.0 databases to 20.5.0 database.',
vendorName : 'GoCD Contributors',
vendorUrl : 'https://github.com/gocd/gocd-database-migrator'
]
repositories {
mavenCentral()
flatDir {
dirs 'lib'
}
}
dependencies {
implementation group: 'commons-io', name: 'commons-io', version: '2.18.0'
implementation group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.13.0'
implementation group: 'com.beust', name: 'jcommander', version: '1.82'
implementation group: 'me.tongfei', name: 'progressbar', version: '0.10.1'
implementation group: 'org.jooq', name: 'jooq', version: '3.16.23'
implementation group: 'org.liquibase', name: 'liquibase-core', version: '3.10.3'
implementation name: 'dbdeploy', version: '2.11.1'
implementation group: 'net.sf', name: 'dbdeploy', version: '2.11.1'
implementation group: 'com.mysql', name: 'mysql-connector-j', version: '9.2.0'
implementation group: 'com.h2database', name: 'h2', version: '1.4.200' // Should match version at GoCD 20.5.0 release, since H2 dont guarantee backward compatiiblity
implementation group: 'org.postgresql', name: 'postgresql', version: '42.7.5'
testImplementation platform('org.junit:junit-bom:5.11.4')
testImplementation group: "org.junit.jupiter", name: "junit-jupiter-api"
testRuntimeOnly group: "org.junit.jupiter", name: "junit-jupiter-engine"
testRuntimeOnly group: 'org.junit.platform', name: 'junit-platform-launcher'
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
application {
mainClass = 'com.thoughtworks.go.dbsync.cli.Main'
applicationDefaultJvmArgs = ['-Xmx4g']
}
tasks.withType(AbstractArchiveTask) {
reproducibleFileOrder = true
preserveFileTimestamps = false
}
test {
useJUnitPlatform()
}
jar {
manifest {
attributes(['Main-Class': application.mainClass.get()])
}
}
distributions {
main {
contents {
from("LICENSE")
from("README.md")
from(generateLicenseReport) {
into "licenses"
}
from(file('LICENSE')) {
into "licenses"
}
from("src/main/resources/h2deltas") {
into "h2deltas"
}
from("src/main/resources/pgdeltas") {
into "pgdeltas"
}
}
}
}
distTar {
compression = Compression.GZIP
}
tasks.withType(AbstractArchiveTask) { archiveTask ->
includeEmptyDirs false
duplicatesStrategy DuplicatesStrategy.EXCLUDE
preserveFileTimestamps = false
reproducibleFileOrder = true
['MD5', 'SHA1', 'SHA-256'].each { algo ->
archiveTask.outputs.files("${archiveTask.archiveFile.get()}.${algo}")
archiveTask.doLast {
ant.checksum file: archiveTask.archiveFile.get(), format: 'MD5SUM', algorithm: algo
}
}
}
apply from: 'plugin-tasks.gradle'