-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
131 lines (110 loc) · 3.58 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
plugins {
id 'java'
id 'maven-publish'
id 'signing'
}
group 'co.navdeep'
version '2.0.0'
archivesBaseName = "kafkaer"
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven{ url "https://packages.confluent.io/maven/"}
}
dependencies {
implementation "org.apache.kafka:kafka-clients:3.6.1"
implementation "com.fasterxml.jackson.core:jackson-databind:2.14.0-rc1"
implementation "org.apache.commons:commons-text:1.10.0"
implementation "commons-io:commons-io:2.11.0"
implementation "org.apache.commons:commons-configuration2:2.8.0"
implementation "commons-beanutils:commons-beanutils:1.9.4"
implementation "args4j:args4j:2.33"
implementation "org.slf4j:slf4j-simple:1.7.30"
implementation "io.confluent:kafka-schema-registry-client:7.5.3"
compileOnly "org.projectlombok:lombok:1.18.20"
annotationProcessor "org.projectlombok:lombok:1.18.20"
testImplementation "junit:junit:4.12"
testImplementation "org.mockito:mockito-core:3.4.0"
}
task execJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'kafkaer',
'Implementation-Version': version,
'Main-Class': 'co.navdeep.kafkaer.App'
}
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes 'Implementation-Title': 'kafkaer',
'Implementation-Version': version,
'Main-Class': 'co.navdeep.kafkaer.App'
}
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
}
signing {
sign configurations.archives
}
def usr = ''
def pwd = ''
if(project.hasProperty("nexusUsername")){
usr = nexusUsername
pwd = nexusPassword
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = 'kafkaer'
packaging = 'jar'
description = 'Deployment automation utility for apache kafka. Automate kafka cluster configurations for topics, brokers, ACLs. This jar can be used as an executable as well as a maven dependecy'
url = 'https://github.com/navdeepsekhon/kafkaer'
scm {
connection = 'git@github.com:navdeepsekhon/kafkaer.git'
developerConnection = 'git@github.com:navdeepsekhon/kafkaer.git'
url = 'https://github.com/navdeepsekhon/kafkaer'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'navdeep'
name = 'Navdeep Sekhon'
email = 'hi@navdeep.co'
}
}
}
}
}
repositories {
maven {
// change URLs to point to your repos, e.g. http://my.org/repo
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials{
username = usr
password= pwd
}
}
}
}
signing {
sign publishing.publications.mavenJava
}