$ brew install openjdk
$ sudo ln -sfn
$(brew --prefix)/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
$ java -version
openjdk version "25.0.2" 2026-01-20 OpenJDK Runtime Environment Homebrew (build 25.0.2) OpenJDK 64-Bit Server VM Homebrew (build 25.0.2, mixed mode, sharing)$ brew install micronaut
$ mn --version
Micronaut Version: 4.10.7$ mkdir services
$ mn create-app api \
--lang=kotlin \
--build=gradle_kotlin \
--jdk=25 \
--features=serialization-jackson,validationkotlinVersion=1.9.25 $ ./gradlew run
Kotlin does not yet support 25 JDK target, falling back to Kotlin JVM_21 JVM target
Kotlin does not yet support 25 JDK target, falling back to Kotlin JVM_21 JVM target
> Task :kspKotlin
Kotlin does not yet support 25 JDK target, falling back to Kotlin JVM_21 JVM target
> Task :kspKotlin FAILED
[Incubating] Problems report is available at: file:///Users/wakabayashitoshiyuu/develop/study/reading-insight-log/frontend/services/api/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':kspKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileJava' (25) and 'kspKotlin' (21).
Consider using JVM Toolchain: https://kotl.in/gradle/jvm/toolchain
Learn more about JVM-target validation: https://kotl.in/gradle/jvm/target-validation
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to generate a Build Scan (Powered by Develocity).
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 10.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/9.1.0/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 2m 17s
2 actionable tasks: 2 executed$ brew install openjdk@21
$ sudo ln -sfn $(brew --prefix)/opt/openjdk@21/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
$ java --version
openjdk 21.0.10 2026-01-20
OpenJDK Runtime Environment Homebrew (build 21.0.10)
OpenJDK 64-Bit Server VM Homebrew (build 21.0.10, mixed mode, sharing)$ mn create-app reading-insight-api \
--lang=kotlin \
--build=gradle_kotlin \
--jdk=21 \
--features=serialization-jackson,validation./gradlew run
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
> Task :run
__ __ _ _
| \/ (_) ___ _ __ ___ _ __ __ _ _ _| |_
| |\/| | |/ __| '__/ _ \| '_ \ / _` | | | | __|
| | | | | (__| | | (_) | | | | (_| | |_| | |_
|_| |_|_|\___|_| \___/|_| |_|\__,_|\__,_|\__|
01:03:33.333 [main] INFO io.micronaut.runtime.Micronaut - Startup completed in 226ms. Server Running: http://localhost:8080
<===========--> 87% EXECUTING [12m 47s]
> IDLE
> IDLE
> :run
> IDLE
> IDLE
> IDLE
> IDLE
> IDLEこれで準備が整ったので、API実装を進めていく。

富山在住のプログラマー。
フルリモートで働いています。
Categories
AWS
Cloudflare
Docker
Github
go
html
JavaScript
Kotlin
microCMS
Monthly Archives
2026/01 (1)
2025/03 (1)
2025/01 (1)
2024/12 (4)
2024/11 (3)
2024/10 (1)
2024/09 (3)
2024/08 (7)
2024/07 (7)
2024/06 (4)
2024/05 (5)
2024/04 (6)