diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba9a372..17677d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,11 @@ jobs: steps: - name: Checkout Code uses: actions/checkout@v3 + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '17' - name: Restore Cache uses: actions/cache@v1 with: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d425d1d..f823c91 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,6 +14,11 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '17' - name: Restore cache uses: actions/cache@v1 with: diff --git a/kotlin-asyncapi-examples/kotlin-asyncapi-spring-boot-example/pom.xml b/kotlin-asyncapi-examples/kotlin-asyncapi-spring-boot-example/pom.xml index 433e5e3..114d08c 100644 --- a/kotlin-asyncapi-examples/kotlin-asyncapi-spring-boot-example/pom.xml +++ b/kotlin-asyncapi-examples/kotlin-asyncapi-spring-boot-example/pom.xml @@ -16,9 +16,9 @@ <description>Example for Kotlin AsyncAPI Spring Boot Application</description> <properties> - <java.version>11</java.version> - <kotlin.version>1.8.22</kotlin.version> - <spring-boot.version>2.7.6</spring-boot.version> + <java.version>17</java.version> + <kotlin.version>1.9.10</kotlin.version> + <spring-boot.version>3.2.0</spring-boot.version> </properties> <dependencyManagement> diff --git a/kotlin-asyncapi-spring-web/pom.xml b/kotlin-asyncapi-spring-web/pom.xml index 4f15c87..0e1001a 100644 --- a/kotlin-asyncapi-spring-web/pom.xml +++ b/kotlin-asyncapi-spring-web/pom.xml @@ -37,7 +37,7 @@ </dependency> <dependency> <groupId>io.swagger.core.v3</groupId> - <artifactId>swagger-core</artifactId> + <artifactId>swagger-core-jakarta</artifactId> </dependency> <dependency> <groupId>io.github.classgraph</groupId> @@ -46,17 +46,17 @@ <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> - <version>[5.3.13,5.3.24]</version> + <version>[5.3.16,5.3.30], [6.1.0,)</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> - <version>[5.3.13,5.3.24]</version> + <version>[5.3.16,5.3.30], [6.1.0,)</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-autoconfigure</artifactId> - <version>[2.6.0,2.7.6]</version> + <version>[2.6.4,2.7.17], [3.2.0,)</version> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> @@ -76,14 +76,26 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> - <version>2.7.6</version> + <version>3.2.0</version> <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>spring-boot-starter-logging</artifactId> + <groupId>org.springframework.boot</groupId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> - <version>2.7.6</version> + <version>3.2.0</version> <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>spring-boot-starter-logging</artifactId> + <groupId>org.springframework.boot</groupId> + </exclusion> + </exclusions> </dependency> </dependencies> </project> diff --git a/kotlin-asyncapi-spring-web/src/main/kotlin/org/openfolder/kotlinasyncapi/springweb/AsyncApiAutoConfiguration.kt b/kotlin-asyncapi-spring-web/src/main/kotlin/org/openfolder/kotlinasyncapi/springweb/AsyncApiAutoConfiguration.kt index 22be7a9..9a90cef 100644 --- a/kotlin-asyncapi-spring-web/src/main/kotlin/org/openfolder/kotlinasyncapi/springweb/AsyncApiAutoConfiguration.kt +++ b/kotlin-asyncapi-spring-web/src/main/kotlin/org/openfolder/kotlinasyncapi/springweb/AsyncApiAutoConfiguration.kt @@ -19,6 +19,7 @@ import org.openfolder.kotlinasyncapi.springweb.service.AsyncApiSerializer import org.openfolder.kotlinasyncapi.springweb.service.AsyncApiService import org.openfolder.kotlinasyncapi.springweb.service.DefaultAsyncApiSerializer import org.openfolder.kotlinasyncapi.springweb.service.DefaultAsyncApiService +import org.springframework.boot.autoconfigure.AutoConfiguration import org.springframework.boot.autoconfigure.condition.ConditionalOnBean import org.springframework.boot.autoconfigure.condition.ConditionalOnClass import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean @@ -32,7 +33,7 @@ import kotlin.reflect.KClass import kotlin.script.experimental.host.toScriptSource import kotlin.script.experimental.jvmhost.BasicJvmScriptingHost -@Configuration +@AutoConfiguration @ConditionalOnBean(AsyncApiMarkerConfiguration.Marker::class) @Import(AsyncApiScriptAutoConfiguration::class, AsyncApiAnnotationAutoConfiguration::class) internal open class AsyncApiAutoConfiguration { diff --git a/kotlin-asyncapi-spring-web/src/main/resources/META-INF/spring.factories b/kotlin-asyncapi-spring-web/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 40fffd1..0000000 --- a/kotlin-asyncapi-spring-web/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ - org.openfolder.kotlinasyncapi.springweb.AsyncApiAutoConfiguration \ No newline at end of file diff --git a/kotlin-asyncapi-spring-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/kotlin-asyncapi-spring-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..cfd19cf --- /dev/null +++ b/kotlin-asyncapi-spring-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +org.openfolder.kotlinasyncapi.springweb.AsyncApiAutoConfiguration \ No newline at end of file diff --git a/pom.xml b/pom.xml index 90d160c..43d1696 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,15 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <kotlin.version>1.6.21</kotlin.version> + <java.version>17</java.version> + <kotlin.version>1.9.10</kotlin.version> + <jackson.version>2.15.3</jackson.version> + <swagger.version>2.2.19</swagger.version> + <classgraph.version>4.8.163</classgraph.version> + <mockk.version>1.12.3</mockk.version> + <jsonassert.version>1.5.1</jsonassert.version> + <junit-jupiter.version>5.10.1</junit-jupiter.version> + <assertj.version>3.24.2</assertj.version> </properties> <build> @@ -214,7 +222,7 @@ <dependency> <groupId>io.mockk</groupId> <artifactId>mockk</artifactId> - <version>1.12.3</version> + <version>${mockk.version}</version> <scope>test</scope> </dependency> </dependencies> @@ -244,37 +252,51 @@ <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> - <version>2.14.2</version> + <version>${jackson.version}</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.module</groupId> <artifactId>jackson-module-kotlin</artifactId> - <version>2.14.2</version> + <version>${jackson.version}</version> </dependency> <dependency> <groupId>io.swagger.core.v3</groupId> - <artifactId>swagger-core</artifactId> - <version>2.2.8</version> + <artifactId>swagger-core-jakarta</artifactId> + <version>${swagger.version}</version> </dependency> <dependency> <groupId>io.github.classgraph</groupId> <artifactId>classgraph</artifactId> - <version>4.8.157</version> + <version>${classgraph.version}</version> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-scripting-jvm-host</artifactId> <version>${kotlin.version}</version> </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>${junit-jupiter.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + <version>${junit-jupiter.version}</version> + <scope>test</scope> + </dependency> <dependency> <groupId>org.skyscreamer</groupId> <artifactId>jsonassert</artifactId> - <version>1.5.0</version> + <version>${jsonassert.version}</version> + <scope>test</scope> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> - <version>3.22.0</version> + <version>${assertj.version}</version> + <scope>test</scope> </dependency> </dependencies> </dependencyManagement>