-
Notifications
You must be signed in to change notification settings - Fork 39
/
build.gradle
69 lines (62 loc) · 1.71 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
apply plugin: 'java-library'
buildscript {
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
classpath 'se.bjurr.gradle:gradle-scripts:2.+'
classpath 'org.jsonschema2pojo:jsonschema2pojo-gradle-plugin:1.2.1'
}
}
project.ext.buildConfig = [
publishing: [
relocate: [
'com.google',
'com.jakewharton'
]
],
violations: [
updateReadme: true
],
staticCodeAnalysis: [
maxViolations: 5
],
]
apply from: project.buildscript.classLoader.getResource('main.gradle').toURI()
/*
apply plugin: 'jsonschema2pojo'
// A bit ugly: https://github.com/joelittlejohn/jsonschema2pojo/issues/1594
[
// [
// from: "${rootDir}/src/main/resources/json/sarif-schema.json",
// to: "se.bjurr.violations.lib.model.generated.sarif"
// ],
// [
// from: "${rootDir}/src/main/resources/json/coverity-schema.json",
// to: "se.bjurr.violations.lib.model.generated.coverity"
// ]
].each { codeGen ->
logger.lifecycle("Generating ${codeGen.from} to ${codeGen.to}")
jsonSchema2Pojo {
source = files(codeGen.from)
targetDirectory = file("src/gen/java")
targetPackage = codeGen.to
generateBuilders = true
annotationStyle = 'none'
includeGeneratedAnnotation = false
removeOldOutput = false
}
}
spotlessJava.dependsOn generateJsonSchema2Pojo
sourcesJar.dependsOn generateJsonSchema2Pojo
javadocJar.dependsOn generateJsonSchema2Pojo
*/
dependencies {
api 'com.google.code.gson:gson:2.10.1'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.assertj:assertj-core:3.25.3'
testImplementation 'uk.co.jemos.podam:podam:8.0.1.RELEASE'
testImplementation 'com.approvaltests:approvaltests:23.0.1'
testImplementation 'com.networknt:json-schema-validator:1.4.0'
}