-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathbuild.gradle
53 lines (46 loc) · 1.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
plugins {
id "com.github.imflog.kafka-schema-registry-gradle-plugin"
}
import com.github.imflog.schema.registry.Subject
import com.github.imflog.schema.registry.tasks.download.MetadataExtension
Subject locationAddressSubject = new Subject('location-address', 'schemas/json/location-address.json', 'JSON')
Subject locationCoordSubject = new Subject('location-latlong', 'schemas/json/location-latlong.json', 'JSON')
schemaRegistry {
url = 'http://localhost:8081'
quiet = false
outputDirectory = 'schemas/json/results/'
pretty = true
failFast = true
register {
subject('company', 'schemas/json/company.json', 'JSON')
.addLocalReference('Address', 'schemas/json/location-address.json')
subject('user', 'schemas/json/user.json', 'JSON')
.addReference('company', 'company', -1)
subject(locationAddressSubject)
subject(locationCoordSubject)
subject('my-record','schemas/json/my-record.json','JSON')
.setMetadata('extra/metadata.json')
.setRuleSet('extra/ruleSet.json')
.setNormalized(true)
}
config {
subject('company', 'BACKWARD')
subject('user', 'FULL_TRANSITIVE')
subject('location-address', 'FULL_TRANSITIVE')
subject('location-latlong', 'FULL_TRANSITIVE')
}
download {
metadata = new MetadataExtension(true)
// subject('company', 'schemas/json/downloaded') // Retrieved via reference from the user subject
subject('user', 'schemas/json/downloaded', true)
subjectPattern('location.*', 'schemas/json/downloaded/location')
}
compatibility {
subject('company', 'schemas/json/company_v2.json', 'JSON')
.addLocalReference("address", "schemas/json/location-address.json")
subject('user', 'schemas/json/user.json', 'JSON')
.addReference('company', 'company', -1)
subject(locationAddressSubject)
subject(locationCoordSubject)
}
}