-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
144 lines (135 loc) · 6.05 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
132
133
134
135
136
137
138
139
140
141
142
143
144
apply plugin: 'java'
//apply plugin: 'jsonschema2pojo'
version = '1.0'
def dropwizardVersion = '0.8.1'
// jar name is required, because project name starts with ../ this causes the buildscript to fail
archivesBaseName = 'fablab-common'
//buildscript {
// repositories {
// jcenter()
// mavenLocal()
// }
// dependencies {
// classpath 'org.jsonschema2pojo:jsonschema2pojo-gradle-plugin:latest.integration'
// }
//}
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
// jackson is required for the generated POJOs
compile 'com.fasterxml.jackson.core:jackson-databind:2.1.4'
compile 'commons-lang:commons-lang:2.6'
compile 'javax.ws.rs:javax.ws.rs-api:2.0'
compile 'org.eclipse.persistence:javax.persistence:2.1.0'
compile 'io.dropwizard:dropwizard-hibernate:' + dropwizardVersion
compile 'io.dropwizard:dropwizard-auth:' + dropwizardVersion
compile 'com.j256.ormlite:ormlite-core:4.48'
}
compileJava {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
sourceSets {
main {
java {
srcDir 'src/main/java-gen'
}
}
}
//// Each configuration is set to the default value
//jsonSchema2Pojo {
// // Whether to generate builder-style methods of the form withXxx(value) (that return this),
// // alongside the standard, void-return setters.
// generateBuilders = false
//
// // Whether to use primitives (long, double, boolean) instead of wrapper types where possible
// // when generating bean properties (has the side-effect of making those properties non-null).
// usePrimitives = false
//
// // Location of the JSON Schema file(s). This may refer to a single file or a directory of files.
// source = files("${project.projectDir}/json")
//
// // Target directory for generated Java source files. The plugin will add this directory to the
// // java source set so the compiler will find and compile the newly generated source files.
// targetDirectory = file("${project.buildDir}/generated-sources/js2p")
// //targetDirectory = file("${project.buildDir}/src/main/java")
//
// // Package name used for generated Java classes (for types where a fully qualified name has not
// // been supplied in the schema using the 'javaType' property).
// targetPackage = ''
//
// // The characters that should be considered as word delimiters when creating Java Bean property
// // names from JSON property names. If blank or not set, JSON properties will be considered to
// // contain a single word when creating Java Bean property names.
// propertyWordDelimiters = [] as char[]
//
// // Whether to use the java type long (or Long) instead of int (or Integer) when representing the
// // JSON Schema type 'integer'.
// useLongIntegers = false
//
// // Whether to use the java type double (or Double) instead of float (or Float) when representing
// // the JSON Schema type 'number'.
// useDoubleNumbers = true
//
// // Whether to include hashCode and equals methods in generated Java types.
// includeHashcodeAndEquals = true
//
// // Whether to include a toString method in generated Java types.
// includeToString = true
//
// // The style of annotations to use in the generated Java types. Supported values:
// // - jackson (alias of jackson2)
// // - jackson2 (apply annotations from the Jackson 2.x library)
// // - jackson1 (apply annotations from the Jackson 1.x library)
// // - gson (apply annotations from the Gson library)
// // - none (apply no annotations at all)
// annotationStyle = 'jackson2'
//
// // A fully qualified class name, referring to a custom annotator class that implements
// // org.jsonschema2pojo.NoopAnnotator and will be used in addition to the one chosen
// // by annotationStyle. If you want to use the custom annotator alone, set annotationStyle to none.
// customAnnotator = 'org.jsonschema2pojo.NoopAnnotator'
//
// // Whether to include JSR-303/349 annotations (for schema rules like minimum, maximum, etc) in
// // generated Java types. Schema rules and the annotation they produce:
// // - maximum = @DecimalMax
// // - minimum = @DecimalMin
// // - minItems,maxItems = @Size
// // - minLength,maxLength = @Size
// // - pattern = @Pattern
// // - required = @NotNull
// // Any Java fields which are an object or array of objects will be annotated with @Valid to
// // support validation of an entire document tree.
// includeJsr303Annotations = false
//
// // The type of input documents that will be read. Supported values:
// // - jsonschema (schema documents, containing formal rules that describe the structure of json data)
// // - json (documents that represent an example of the kind of json data that the generated Java types
// // will be mapped to)
// sourceType = 'jsonschema'
//
// // Whether to empty the target directory before generation occurs, to clear out all source files
// // that have been generated previously. <strong>Be warned</strong>, when activated this option
// // will cause jsonschema2pojo to <strong>indiscriminately delete the entire contents of the target
// // directory (all files and folders)</strong> before it begins generating sources.
// removeOldOutput = false
//
// // The character encoding that should be used when writing the generated Java source files
// outputEncoding = 'ASCII'
//
// // Whether to use {@link org.joda.time.DateTime} instead of {@link java.util.Date} when adding
// // date type fields to generated Java types.
// useJodaDates = false
//
// // Whether to use commons-lang 3.x imports instead of commons-lang 2.x imports when adding equals,
// // hashCode and toString methods.
// useCommonsLang3 = false
//
// // Whether to initialize Set and List fields as empty collections, or leave them as null.
// initializeCollections = true
//
// // **EXPERIMENTAL** Whether to make the generated types Parcelable for Android
// parcelable = false
//}