Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Commit 2115cdd

Browse files
authored
Merge pull request #3 from hauner/extract
Extracted reusable core, removed spring code
2 parents a7929d7 + 07924a6 commit 2115cdd

File tree

217 files changed

+942
-6563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+942
-6563
lines changed

build.gradle

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ plugins {
44
id 'java-library'
55
id 'maven-publish'
66
id 'com.jfrog.bintray' version '1.8.5'
7-
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
87
id 'org.jetbrains.dokka' version '0.10.1'
8+
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
99
id 'org.unbroken-dome.test-sets' version '3.0.1'
1010
id "com.github.ben-manes.versions" version "0.28.0"
1111
}
@@ -20,7 +20,8 @@ java {
2020

2121

2222
ext {
23-
processorApiVersion = '1.0.0.M4'
23+
processorApiVersion = '1.0.0'
24+
jacksonVersion = '2.11.0'
2425

2526
bintrayUser = project.hasProperty ('BINTRAY_USER') ? BINTRAY_USER : 'n/a'
2627
bintrayKey = project.hasProperty ('BINTRAY_KEY') ? BINTRAY_KEY : 'n/a'
@@ -34,7 +35,7 @@ repositories {
3435
url "https://oss.sonatype.org/content/repositories/snapshots"
3536
}
3637
maven {
37-
url "https://dl.bintray.com/hauner/openapi-processor"
38+
url "https://dl.bintray.com/hauner/openapi-processor"
3839
}
3940
}
4041

@@ -64,33 +65,59 @@ compileKotlin {
6465
}
6566

6667
dependencies {
67-
implementation 'org.codehaus.groovy:groovy:2.5.10'
68-
implementation 'org.codehaus.groovy:groovy-nio:2.5.10'
68+
components.all(JacksonPlatformRule)
69+
components.all(KotlinPlatformRule)
70+
71+
implementation 'org.codehaus.groovy:groovy:2.5.12'
72+
implementation 'org.codehaus.groovy:groovy-nio:2.5.12'
6973
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
70-
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.10.2'
74+
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion"
75+
76+
compileOnly "com.github.hauner.openapi:openapi-processor-api:$processorApiVersion"
7177

72-
implementation ('io.swagger.parser.v3:swagger-parser:2.0.19') {
78+
implementation 'org.openapi4j:openapi-parser:0.9'
79+
implementation ('io.swagger.parser.v3:swagger-parser:2.0.20') {
7380
exclude group: 'io.swagger.parser.v3', module: 'swagger-parser-v2-converter'
7481
exclude group: 'io.swagger.core.v3', module: 'swagger-annotations'
7582
}
76-
implementation 'org.openapi4j:openapi-parser:0.9'
77-
implementation 'com.google.googlejavaformat:google-java-format:1.7'
78-
compileOnly "com.github.hauner.openapi:openapi-processor-api:$processorApiVersion"
7983

80-
testImplementation 'com.google.jimfs:jimfs:1.1'
84+
implementation ('com.google.googlejavaformat:google-java-format:1.8') {
85+
exclude group: 'com.google.guava'
86+
}
87+
88+
implementation ('com.google.guava:guava:28.1-jre') {
89+
exclude group: 'com.google.guava'
90+
exclude group: 'com.google.j2objc'
91+
exclude group: 'com.google.code.findbugs'
92+
exclude group: 'com.google.errorprone'
93+
exclude group: 'org.checkerframework'
94+
exclude group: 'org.codehaus.mojo'
95+
}
96+
97+
testImplementation "com.github.hauner.openapi:openapi-processor-api:$processorApiVersion"
98+
testImplementation ('com.github.hauner.openapi:openapi-processor-test:1.0.0.M1') {
99+
exclude group: 'com.google.guava'
100+
}
101+
102+
testImplementation("com.google.jimfs:jimfs:1.1") {
103+
exclude group: 'com.google.guava'
104+
}
105+
106+
testImplementation ("org.junit.jupiter:junit-jupiter-api:5.6.2")
107+
testCompileOnly ("junit:junit:4.13")
108+
testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.6.2")
109+
testRuntimeOnly ("org.junit.vintage:junit-vintage-engine:5.6.2")
110+
81111
testImplementation ('org.spockframework:spock-core:2.0-M2-groovy-2.5') {
82112
exclude group: 'org.codehaus.groovy'
113+
exclude group: 'junit'
83114
}
84115
testImplementation ('org.spockframework:spock-junit4:2.0-M2-groovy-2.5') {
85116
exclude group: 'org.codehaus.groovy'
117+
exclude group: 'junit'
86118
}
87-
testImplementation 'net.bytebuddy:byte-buddy:1.10.9'
119+
testImplementation 'net.bytebuddy:byte-buddy:1.10.11'
88120
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
89-
90-
testIntImplementation "com.github.hauner.openapi:openapi-processor-api:$processorApiVersion"
91-
testIntImplementation 'io.github.java-diff-utils:java-diff-utils:4.5'
92-
// testIntRuntimeOnly 'org.slf4j:slf4j-simple:1.7.30'
93-
// testIntRuntimeOnly 'org.slf4j:slf4j-nop:1.6.1'
94121
}
95122

96123
tasks.withType(Test) {
@@ -140,7 +167,7 @@ bintray {
140167
pkg {
141168
repo = 'openapi-processor'
142169
name = 'openapi-processor-core'
143-
//userOrg = 'openapi-generatr'
170+
//userOrg = 'openapi-processor'
144171
licenses = ['Apache-2.0']
145172
vcsUrl = 'https://github.com/hauner/openapi-processor-core'
146173

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import org.gradle.api.artifacts.ComponentMetadataRule
2+
import org.gradle.api.artifacts.ComponentMetadataContext
3+
4+
class JacksonPlatformRule implements ComponentMetadataRule {
5+
void execute (ComponentMetadataContext ctx) {
6+
ctx.details.with {
7+
if (id.group.startsWith ("com.fasterxml.jackson")) {
8+
belongsTo ("com.fasterxml.jackson:jackson-bom:${id.version}", false)
9+
}
10+
}
11+
}
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import org.gradle.api.artifacts.ComponentMetadataContext
2+
import org.gradle.api.artifacts.ComponentMetadataRule
3+
4+
class KotlinPlatformRule implements ComponentMetadataRule {
5+
void execute (ComponentMetadataContext ctx) {
6+
ctx.details.with {
7+
if (id.group.startsWith ("org.jetbrains.kotlin")) {
8+
belongsTo ("org.jetbrains.kotlin:kotlin-platform:${id.version}")
9+
}
10+
}
11+
}
12+
}

docs/README.adoc

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/antora.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.
-12.2 KB
Binary file not shown.

docs/modules/ROOT/nav.adoc

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/modules/ROOT/pages/data.adoc

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/modules/ROOT/pages/gradle.adoc

Lines changed: 0 additions & 99 deletions
This file was deleted.

docs/modules/ROOT/pages/howto/file_download.adoc

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/modules/ROOT/pages/howto/file_upload.adoc

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)