Skip to content

Commit

Permalink
Exclude all unnecessary dependencies from openapi-generator module.
Browse files Browse the repository at this point in the history
Update openapi-generator dependencies versions.
Improve tests execution performance

OpenAPI Explorer 2.2.728
Rapidoc 9.3.5
  • Loading branch information
altro3 committed Sep 18, 2024
1 parent 067fd50 commit 2d4b9b4
Show file tree
Hide file tree
Showing 15 changed files with 901 additions and 864 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ repositories {
}

tasks.withType(Test).configureEach {
useJUnitPlatform()
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import io.micronaut.build.internal.openapi.OpenApiGeneratorTask

plugins {
id 'io.micronaut.minimal.application'
id("io.micronaut.build.internal.openapi-base")
id("io.micronaut.minimal.application")
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import io.micronaut.build.internal.openapi.OpenApiGeneratorTask

plugins {
id 'io.micronaut.minimal.application'
id("io.micronaut.minimal.application")
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import io.micronaut.build.internal.openapi.OpenApiGeneratorTask

plugins {
id 'io.micronaut.minimal.application'
id("io.micronaut.minimal.application")
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'io.micronaut.build.internal.openapi-base'
id 'io.micronaut.build.internal.module'
id("io.micronaut.build.internal.openapi-base")
id("io.micronaut.build.internal.module")
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'io.micronaut.build.internal.openapi-base'
id 'io.micronaut.build.internal.base-module'
id 'java-test-fixtures'
id("io.micronaut.build.internal.openapi-base")
id("io.micronaut.build.internal.base-module")
id("java-test-fixtures")
}

components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@ dependencies {
testRuntimeOnly(mnTest.junit.jupiter.engine)
testRuntimeOnly(mnLogging.logback.classic)
}
tasks.test {
useJUnitPlatform()
}
3 changes: 1 addition & 2 deletions docs-examples/example-groovy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ test {
jvmArgs '-Duser.country=US'
jvmArgs '-Duser.language=en'
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
}
failFast = true
}

tasks.withType(GroovyCompile) {
tasks.withType(GroovyCompile).configureEach {
groovyOptions.forkOptions.jvmArgs.add('-Dgroovy.parameters=true')
}

Expand Down
4 changes: 1 addition & 3 deletions docs-examples/example-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ compileJava.options.compilerArgs += '-parameters'
compileTestJava.options.compilerArgs += '-parameters'

test {
useJUnitPlatform()

jvmArgs '-Duser.country=US'
jvmArgs '-Duser.language=en'
useJUnitPlatform()
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
}
failFast = true
Expand Down
4 changes: 1 addition & 3 deletions docs-examples/example-kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ ksp {
}

test {
useJUnitPlatform()

jvmArgs '-Duser.country=US'
jvmArgs '-Duser.language=en'
useJUnitPlatform()
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
}
failFast = true
Expand Down
10 changes: 10 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ openapi-generator = "7.8.0"
swagger-parser = "1.0.71"
swagger-parser-v3 = "2.1.22"
javaparser = "3.26.2"
commons-lang3 = "3.17.0"
commons-codec = "1.17.1"
commons-io = "2.16.1"
commons-text = "1.12.0"
guava = "33.3.0-jre"
jmustache = "1.15"
commonmark = "0.23.0"

micronaut = "4.6.5"
micronaut-platform = "4.6.2"
Expand Down Expand Up @@ -78,8 +83,13 @@ jdt-annotation = { module = "org.eclipse.jdt:org.eclipse.jdt.annotation", versio
android-annotation = { module = "androidx.annotation:annotation", version.ref = "android-annotation" }
javaparser = { module = "com.github.javaparser:javaparser-symbol-solver-core", version.ref = "javaparser" }
commons-codec = { module = "commons-codec:commons-codec", version.ref = "commons-codec" }
commons-io = { module = "commons-io:commons-io", version.ref = "commons-io" }
commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commons-lang3" }
commons-text = { module = "org.apache.commons:commons-text", version.ref = "commons-text" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
commonmark = { module = "org.commonmark:commonmark", version.ref = "commonmark" }

openapi-generator = { module = "org.openapitools:openapi-generator", version.ref = "openapi-generator" }
swagger-parser = { module = "io.swagger:swagger-parser", version.ref = "swagger-parser" }
swagger-parser-v3 = { module = "io.swagger.parser.v3:swagger-parser-v3", version.ref = "swagger-parser-v3" }
jmustache = { module = "com.samskivert:jmustache", version.ref = "jmustache" }
48 changes: 37 additions & 11 deletions openapi-generator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ plugins {
}

dependencies {
constraints {
api(libs.swagger.parser) {
because("OpenAPI generator depends on older release which isn't compatible with SnakeYAML")
}
api(libs.swagger.parser.v3) {
because("OpenAPI generator depends on older release which isn't compatible with SnakeYAML")
}
}
api(libs.openapi.generator) {
exclude group: "org.projectlombok"
}
api libs.openapi.generator
api libs.swagger.parser
api libs.swagger.parser.v3
api libs.commons.lang3
api libs.commons.text
api libs.commons.codec
api libs.commons.io
api libs.managed.evo.inflector
api libs.jmustache
api libs.commonmark
api libs.guava
api mnLogging.slf4j.ext
api mn.snakeyaml

testImplementation mnTest.micronaut.test.junit5
testImplementation mnTest.junit.jupiter.params
Expand All @@ -28,3 +28,29 @@ dependencies {

testRuntimeOnly mnTest.junit.jupiter.engine
}

configurations.configureEach {
exclude group: "com.google.code.findbugs", module: "jsr305"
exclude group: "javax.validation", module: "validation-api"
exclude group: "org.slf4j", module: "slf4j-simple"
exclude group: "org.projectlombok"
exclude group: "com.google.guava", module: "listenablefuture"
exclude group: "com.google.guava", module: "failureaccess"
exclude group: "com.google.errorprone", module: "error_prone_annotations"
exclude group: "com.google.j2objc", module: "j2objc-annotations"
exclude group: "org.checkerframework", module: "checker-qual"
exclude group: "com.github.jknack"
exclude group: "org.apache.maven.resolver"
exclude group: "com.github.mifmif", module: "generex"
exclude group: "com.github.curious-odd-man", module: "rgxgen"
exclude group: "net.java.dev.jna", module: "jna"
exclude group: "commons-cli", module: "commons-cli"
exclude group: "com.github.joschi.jackson", module: "jackson-datatype-threetenbp"
exclude group: "com.fasterxml.jackson.datatype", module: "jackson-datatype-guava"
exclude group: "com.fasterxml.jackson.datatype", module: "jackson-datatype-joda"
}

test {
maxParallelForks = Runtime.runtime.availableProcessors()
maxHeapSize = "2048m"
}
14 changes: 9 additions & 5 deletions openapi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ dependencies {
compileOnly(mn.micronaut.core.processor)
compileOnly(projects.micronautOpenapiAdoc)

implementation(mn.micronaut.http)
implementation(mn.micronaut.http) {
exclude group: "io.micronaut", module: "micronaut-core-reactive"
exclude group: "io.micronaut", module: "micronaut-context"
exclude group: "io.micronaut", module: "micronaut-context-propagation"
exclude group: "io.projectreactor", module: "reactor-core"
}

api(projects.micronautOpenapiAnnotations)
api(projects.micronautOpenapiCommon)
Expand Down Expand Up @@ -46,11 +51,10 @@ dependencies {
}

configurations.configureEach {
all*.exclude group: "ch.qos.logback"
exclude group: "ch.qos.logback"
}

test {
useJUnitPlatform()

maxHeapSize = "1024m"
maxParallelForks = Runtime.runtime.availableProcessors()
maxHeapSize = "2048m"
}

Large diffs are not rendered by default.

1,656 changes: 830 additions & 826 deletions openapi/src/main/resources/templates/rapidoc/res/rapidoc-min.js

Large diffs are not rendered by default.

0 comments on commit 2d4b9b4

Please sign in to comment.