Skip to content

Commit 966a00c

Browse files
author
Edgar Espina
committed
Failed to generate openapi when the project using jackson-module-kotlin.
- add kotlin-reflect to maven generated file - for existing projects dependency must be added manually - Fix #3278
1 parent 4ebfe00 commit 966a00c

4 files changed

Lines changed: 17 additions & 4 deletions

File tree

modules/jooby-cli/src/main/resources/cli/build.gradle.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ buildscript {
88
plugins {
99
id "application"
1010
{{#if kotlin}}
11-
id "org.jetbrains.kotlin.jvm" version "{{kotlinVersion}}"
11+
id "org.jetbrains.kotlin.jvm" version "${kotlinVersion}"
1212
{{/if}}
1313
{{#if kapt}}
14-
id "org.jetbrains.kotlin.kapt" version "{{kotlinVersion}}"
14+
id "org.jetbrains.kotlin.kapt" version "${kotlinVersion}"
1515
{{/if}}
1616
{{#if openapi}}
1717
id "io.jooby.openAPI" version "${joobyVersion}"

modules/jooby-cli/src/main/resources/cli/gradle/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip

modules/jooby-cli/src/main/resources/cli/pom.xml.hbs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,15 @@
161161
</execution>
162162
</executions>
163163
{{/if}}
164+
{{#if kotlin}}
165+
<dependencies>
166+
<dependency>
167+
<groupId>org.jetbrains.kotlin</groupId>
168+
<artifactId>kotlin-reflect</artifactId>
169+
<version>${kotlin.version}</version>
170+
</dependency>
171+
</dependencies>
172+
{{/if}}
164173
</plugin>
165174
{{#if stork}}
166175
<plugin>

modules/jooby-gradle-plugin/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repositories {
1414
mavenCentral()
1515
}
1616

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

@@ -39,6 +39,10 @@ gradlePlugin {
3939
openAPI {
4040
id = 'io.jooby.openAPI'
4141
implementationClass = 'io.jooby.gradle.JoobyPlugin'
42+
43+
dependencies {
44+
45+
}
4246
}
4347
}
4448
}

0 commit comments

Comments
 (0)