-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
111 lines (101 loc) · 3.97 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
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'maven-publish'
id 'signing'
}
group = "com.github.grantcooksey"
archivesBaseName = "debezium-partial-snapshotter"
version = '0.2.0-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenLocal()
jcenter()
}
def prodDebeziumVersion = '1.3.0.Final'
def devDebeziumVersion = '1.4.0-SNAPSHOT'
def debeziumVersion
if (project.findProperty('env') == 'dev') {
debeziumVersion = devDebeziumVersion
} else {
debeziumVersion = prodDebeziumVersion
}
// Dependent on what version of Kafka that debezium uses. See debezium/pom.xml
def slf4jVersion = '1.7.28'
def kafkaVersion = '2.4.0'
dependencies {
compileOnly group: 'org.slf4j', name:'slf4j-api', version: slf4jVersion
compileOnly group: 'org.apache.kafka', name: 'kafka_2.12', version: kafkaVersion
compileOnly group: 'io.debezium', name: 'debezium-connector-postgres', version: debeziumVersion
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'io.debezium', name: 'debezium-api', version: debeziumVersion
testImplementation group: 'io.debezium', name: 'debezium-connector-postgres', version: debeziumVersion
testImplementation group: 'io.debezium', name: 'debezium-embedded', version: debeziumVersion
testImplementation group: 'org.slf4j', name:'slf4j-api', version: slf4jVersion
testImplementation group: 'org.apache.kafka', name: 'connect-api', version: kafkaVersion
testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '2.2'
testImplementation group: 'org.mockito', name: 'mockito-inline', version: '3.5.11'
testImplementation group: 'org.testcontainers', name: 'postgresql', version: '1.14.1'
}
test {
testLogging.showStandardStreams = false
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'debezium-partial-snapshotter'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'debezium-partial-snapshotter'
description = 'Custom snapshotter to get fine grain control over db snapshots with Debezium.'
url = 'https://github.com/grantcooksey/debezium-partial-snapshotter'
licenses {
license {
name = 'MIT License'
url = 'https://github.com/grantcooksey/debezium-partial-snapshotter/master/LICENSE'
}
}
developers {
developer {
name = 'Grant Cooksey'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/grantcooksey/debezium-partial-snapshotter.git'
developerConnection = 'scm:git:ssh://github.com:grantcooksey/debezium-partial-snapshotter.git'
url = 'https://github.com/grantcooksey/debezium-partial-snapshotter/tree/master'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
if (project.hasProperty('ossrhUsername')) {
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
}
signing {
required { gradle.taskGraph.hasTask("publish") }
sign publishing.publications.mavenJava
}