File tree 3 files changed +8
-1
lines changed
src/main/groovy/com/github/eirnym/js2p
3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -130,4 +130,6 @@ jsonSchema2Pojo {
130
130
131
131
// Whether to initialize Set and List fields as empty collections, or leave them as null.
132
132
boolean initializeCollections = true
133
+ // Include @Generated annotation
134
+ boolean includeGeneratedAnnotation = true
133
135
}
Original file line number Diff line number Diff line change 1
- rootProject. name = ' js2p -gradle sample'
1
+ rootProject. name = ' js2d -gradle Android sample'
2
2
3
3
include ' :app'
4
4
include ' :lib'
Original file line number Diff line number Diff line change @@ -71,6 +71,11 @@ class JsonSchemaPlugin implements Plugin<Project> {
71
71
}
72
72
73
73
JsonSchemaExtension config = project. extensions. getByType(JsonSchemaExtension )
74
+
75
+ if (System . getProperty(' java.specification.version' ). toFloat() >= 9 ) {
76
+ config. includeGeneratedAnnotation = false // Temporary fixes #71 and upstream issue #1212 (used Generated annotation is not compatible with AGP 7+)
77
+ }
78
+
74
79
ConfigurableFileCollection sourceFiles
75
80
76
81
if (config. source. isEmpty()) {
You can’t perform that action at this time.
0 commit comments