forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
46 lines (37 loc) · 1.04 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
configurations {
avsc
}
apply plugin: 'com.commercehub.gradle.plugin.avro'
apply plugin: 'java'
dependencies {
compile externalDependency.avro_1_7
compile(externalDependency.avroCompiler_1_7) {
exclude group: 'org.apache.velocity', module: 'velocity'
}
constraints {
implementation('commons-collections:commons-collections:3.2.2') {
because 'Vulnerability Issue'
}
}
avsc project(':metadata-events:mxe-schemas')
}
def genDir = file("src/generated/java")
task avroCodeGen(type: com.commercehub.gradle.plugin.avro.GenerateAvroJavaTask, dependsOn: configurations.avsc) {
source("$rootDir/metadata-events/mxe-schemas/src/renamed/avro")
outputDir = genDir
dependsOn(':metadata-events:mxe-schemas:renameNamespace')
}
compileJava.source(avroCodeGen.outputs)
idea {
module {
sourceDirs += genDir
generatedSourceDirs += genDir
}
}
project.rootProject.tasks.idea.dependsOn(avroCodeGen)
// Exclude classes from avro-schemas
jar {
dependsOn classes
from sourceSets.main.output
exclude('com/linkedin/events/**')
}