Skip to content

Commit

Permalink
Failed to generate openapi when the project using jackson-module-kotlin.
Browse files Browse the repository at this point in the history
- add kotlin-reflect to maven generated file
- for existing projects dependency must be added manually
- Fix #3278
  • Loading branch information
Edgar Espina committed Feb 18, 2024
1 parent 4ebfe00 commit 966a00c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/jooby-cli/src/main/resources/cli/build.gradle.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ buildscript {
plugins {
id "application"
{{#if kotlin}}
id "org.jetbrains.kotlin.jvm" version "{{kotlinVersion}}"
id "org.jetbrains.kotlin.jvm" version "${kotlinVersion}"
{{/if}}
{{#if kapt}}
id "org.jetbrains.kotlin.kapt" version "{{kotlinVersion}}"
id "org.jetbrains.kotlin.kapt" version "${kotlinVersion}"
{{/if}}
{{#if openapi}}
id "io.jooby.openAPI" version "${joobyVersion}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
9 changes: 9 additions & 0 deletions modules/jooby-cli/src/main/resources/cli/pom.xml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@
</execution>
</executions>
{{/if}}
{{#if kotlin}}
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>${kotlin.version}</version>
</dependency>
</dependencies>
{{/if}}
</plugin>
{{#if stork}}
<plugin>
Expand Down
6 changes: 5 additions & 1 deletion modules/jooby-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repositories {
mavenCentral()
}

def pom = new XmlSlurper().parse(projectDir.toPath().getParent().resolve("pom.xml").toFile())
def pom = new groovy.xml.XmlSlurper().parse(projectDir.toPath().getParent().resolve("pom.xml").toFile())
//noinspection GroovyAccessibility
def joobyVersion = project.properties['joobyVersion'] ?: pom.parent.version

Expand All @@ -39,6 +39,10 @@ gradlePlugin {
openAPI {
id = 'io.jooby.openAPI'
implementationClass = 'io.jooby.gradle.JoobyPlugin'

dependencies {

}
}
}
}
Expand Down

0 comments on commit 966a00c

Please sign in to comment.