-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathbuild.gradle
130 lines (117 loc) · 4.82 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
/*
* Copyright 2018 LinkedIn Corp.
* Licensed under the BSD 2-Clause License (the "License").
* See License in the project root for license information.
*/
plugins {
id "java-library"
id "checkstyle"
id "jacoco"
}
dependencies {
api project(":parser")
implementation project(":helper:helper")
implementation "com.squareup:javapoet:1.13.0"
implementation "commons-io:commons-io:2.6"
implementation "org.apache.logging.log4j:log4j-api:2.17.1"
implementation "org.slf4j:slf4j-api:1.7.14"
implementation "com.beust:jcommander:1.78"
implementation "org.apache.ant:ant:1.10.7"
testImplementation "com.fasterxml.jackson.core:jackson-core:2.10.2"
testImplementation "com.fasterxml.jackson.core:jackson-databind:2.10.2"
compileOnly ("org.apache.avro:avro:1.4.1") {
exclude group: "org.mortbay.jetty"
exclude group: "org.apache.velocity"
exclude group: "commons-lang"
exclude group: "org.jboss.netty"
exclude group: "com.thoughtworks.paranamer", module: "paranamer-ant"
exclude group: "org.slf4j"
}
testImplementation project(":test-common")
testImplementation ("org.apache.avro:avro:1.4.1") {
exclude group: "org.mortbay.jetty"
exclude group: "org.apache.velocity"
exclude group: "commons-lang"
exclude group: "org.jboss.netty"
exclude group: "com.thoughtworks.paranamer", module: "paranamer-ant"
exclude group: "org.slf4j"
}
testImplementation 'net.openhft:compiler:2.4.1'
}
publishing {
publications {
"$project.name"(MavenPublication) {
groupId project.group
artifactId project.name
version project.version
from components.java
artifact sourceJar
artifact javadocJar
//we strive to meet https://central.sonatype.org/pages/requirements.html
pom {
name = 'Avro Util'
description = 'utilities for writing code that works across major avro versions'
url = 'https://github.com/linkedin/avro-util'
licenses {
license {
name = 'BSD 2-Clause'
url = 'https://raw.githubusercontent.com/linkedin/avro-util/master/LICENSE'
}
}
developers {
developer {
id = 'radai-rosenblatt'
name = 'Radai Rosenblatt'
email = '[email protected]'
organization = 'LinkedIn'
organizationUrl = 'linkedin.com'
}
developer {
id = 'abhishekmendhekar'
name = 'Abhishek Mendhekar'
organization = 'LinkedIn'
organizationUrl = 'linkedin.com'
}
developer {
id = 'jimhe'
name = 'Jim He'
email = '[email protected]'
organization = 'LinkedIn'
organizationUrl = 'linkedin.com'
}
developer {
id = 'ghosthack'
name = 'Adrian Fernandez'
email = '[email protected]'
organization = 'LinkedIn'
organizationUrl = 'linkedin.com'
}
}
scm {
connection = 'scm:git:git://github.com:linkedin/avro-util.git'
developerConnection = 'scm:git:ssh://github.com:linkedin/avro-util.git'
url = 'https://github.com/linkedin/avro-util'
}
}
//remove the dependency on helper, and replace with one on helper-all
pom.withXml {
Node dependenciesNode = (Node) (asNode().dependencies[0])
Collection<Node> dependencyNodes = dependenciesNode.children()
List<Node> toRemove = new ArrayList<>()
for (Node o : dependencyNodes) {
if ("$project.group" == o.groupId[0].text() && "helper" == o.artifactId[0].text()) {
toRemove.add(o)
}
}
for (Node o : toRemove) {
dependencyNodes.remove(o)
}
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', "$project.group")
dependencyNode.appendNode('artifactId', "helper-all")
dependencyNode.appendNode('version', "$project.version")
dependencyNode.appendNode('scope', "compile")
}
}
}
}