@@ -17,6 +17,8 @@ plugins {
1717 id ' com.palantir.git-version' version ' 0.13.0'
1818 // auto release to maven central (skip sonatype manual nexus release process)
1919 id(" io.github.gradle-nexus.publish-plugin" ) version " 1.1.0"
20+ // translate json schemas to java classes
21+ // id "org.jsonschema2pojo" version "1.1.3"
2022}
2123
2224// It is important to set the group and the version to the root project
@@ -33,6 +35,9 @@ repositories {
3335}
3436
3537java {
38+ toolchain {
39+ languageVersion = JavaLanguageVersion . of(8 )
40+ }
3641 // sources are required by maven central in order to accept the package
3742 withSourcesJar()
3843 // javadoc jar is required by maven central in order to accept the package
@@ -41,22 +46,109 @@ java {
4146
4247// package dependencies
4348dependencies {
44- implementation ' ch.qos.logback:logback-classic:1.2.10'
45- implementation ' ch.qos.logback:logback-core:1.2.10'
49+ // swagger
50+ implementation ' io.swagger:swagger-annotations:1.6.5'
51+
52+ // http client
53+ implementation ' com.squareup.okhttp3:okhttp:4.9.3'
54+ implementation ' com.squareup.okhttp3:logging-interceptor:4.9.3'
55+
56+ // json serialization and deserialization
57+ implementation ' com.google.code.gson:gson:2.9.0'
58+ implementation ' io.gsonfire:gson-fire:1.8.5'
59+
60+ // openapi annotations
61+ implementation ' javax.ws.rs:jsr311-api:1.1.1'
62+ implementation ' javax.ws.rs:javax.ws.rs-api:2.1.1'
63+ implementation ' org.openapitools:jackson-databind-nullable:0.2.3'
64+ implementation group : ' org.apache.commons' , name : ' commons-lang3' , version : ' 3.12.0'
65+ implementation " jakarta.annotation:jakarta.annotation-api:1.3.5"
66+
67+ // logger
68+ implementation ' ch.qos.logback:logback-classic:1.4.12'
69+ implementation ' ch.qos.logback:logback-core:1.4.12'
4670 implementation ' org.slf4j:slf4j-api:1.7.33'
4771
72+
73+
4874 // Use JUnit Jupiter for testing.
4975 testImplementation ' org.junit.jupiter:junit-jupiter:5.7.2'
5076
5177 // These dependencies are used internally, and not exposed to consumers on their own compile classpath.
5278 // google standard java library
5379 implementation ' com.google.guava:guava:30.1.1-jre'
54- // json serialization and deserialization
55- implementation ' com.google.code.gson:gson:2.8.9'
56- // http client
57- implementation ' com.squareup.okhttp3:okhttp:4.9.3'
80+
81+
5882}
5983
84+ // jsonSchema2Pojo {
85+ // // Location of the JSON Schema file(s). This may refer to a single file or a directory of files.
86+ // source = files("schemas/")
87+ //
88+ // // Target directory for generated Java source files. The plugin will add this directory to the
89+ // // java source set so the compiler will find and compile the newly generated source files.
90+ // targetDirectory = file("src/main/java")
91+ //
92+ // // Package name used for generated Java classes (for types where a fully qualified name has not
93+ // // been supplied in the schema using the 'javaType' property).
94+ // targetPackage = 'io.permit.sdk.openapi.models'
95+ //
96+ // // Whether to allow 'additional' properties to be supported in classes by adding a map to
97+ // // hold these. This is true by default, meaning that the schema rule 'additionalProperties'
98+ // // controls whether the map is added. Set this to false to globally disable additional properties.
99+ // includeAdditionalProperties = false
100+ //
101+ // // Whether to include a javax.annotation.Generated (Java 8 and lower) or
102+ // // javax.annotation.processing.Generated (Java 9+) in on generated types (default true).
103+ // // See also: targetVersion.
104+ // includeGeneratedAnnotation = true
105+ //
106+ // // Whether to use the 'title' property of the schema to decide the class name (if not
107+ // // set to true, the filename and property names are used).
108+ // useTitleAsClassname = true
109+ //
110+ // // Whether to empty the target directory before generation occurs, to clear out all source files
111+ // // that have been generated previously. <strong>Be warned</strong>, when activated this option
112+ // // will cause jsonschema2pojo to <strong>indiscriminately delete the entire contents of the target
113+ // // directory (all files and folders)</strong> before it begins generating sources.
114+ // removeOldOutput = false
115+ //
116+ // // Whether to generate builder-style methods of the form withXxx(value) (that return this),
117+ // // alongside the standard, void-return setters.
118+ // generateBuilders = true
119+ //
120+ // // If set to true, then the gang of four builder pattern will be used to generate builders on
121+ // // generated classes. Note: This property works in collaboration with generateBuilders.
122+ // // If generateBuilders is false then this property will not do anything.
123+ // useInnerClassBuilders = false
124+ //
125+ // // Whether to include hashCode and equals methods in generated Java types.
126+ // includeHashcodeAndEquals = false
127+ //
128+ // // Whether to include a toString method in generated Java types.
129+ // includeToString = false
130+ //
131+ // // Whether to include getters or to omit these accessor methods and create public fields instead.
132+ // includeGetters = false
133+ //
134+ // // Whether to include setters or to omit these accessor methods and create public fields instead.
135+ // includeSetters = false
136+ //
137+ // // Whether to use java.util.Optional for getters on properties that are not required
138+ // useOptionalForGetters = true
139+ //
140+ // // Whether to generate constructors or not.
141+ // includeConstructors = true
142+ //
143+ // // Whether to include only 'required' fields in generated constructors
144+ // constructorsRequiredPropertiesOnly = true
145+ //
146+ // annotationStyle = 'gson'
147+ //
148+ // // Whether to initialize Set and List fields as empty collections, or leave them as null.
149+ // initializeCollections = false
150+ // }
151+
60152publishing {
61153 repositories {
62154 maven {
0 commit comments