How to Update dependencies in build.gradle.kts and Reflect Changes to gradle.lockfile in Gradle

Tadashi Shigeoka ·  Thu, September 22, 2022

This post introduces how to update dependencies in build.gradle.kts and reflect the changes to gradle.lockfile in Gradle.

Gradle | グレイドル

Background: Want to use software.amazon.awssdk:sesv2

I investigated how to add entries to build.gradle.kts with Gradle and reflect them to gradle.lockfile in order to use SES in an existing Kotlin project.

Step1. Add to dependencies in build.gradle.kts

Add the following to the dependencies in build.gradle.kts:

 dependencies {
+    implementation("software.amazon.awssdk:sesv2")
 }

Step2. Reflect to gradle.lockfile

./gradlew dependencies --write-locks

That’s all about adding entries to build.gradle.kts with Gradle and reflecting them to gradle.lockfile. That’s all from the Gemba.

参考情報