更新 springboot 版本后,修复 build.gradle 的bug
diff --git a/ynrcc-agent/build.gradle b/ynrcc-agent/build.gradle
index 54fab87..01a06b5 100644
--- a/ynrcc-agent/build.gradle
+++ b/ynrcc-agent/build.gradle
@@ -1,30 +1,37 @@
 plugins {
-    id 'java'
+    id "java"
     id 'org.springframework.boot'
-    id "com.palantir.git-version"
+    id "org.jetbrains.kotlin.jvm"
+    id "org.jetbrains.kotlin.plugin.spring"
     id 'com.palantir.docker'
 }
 
-apply plugin: 'java'
 apply plugin: 'io.spring.dependency-management'
+apply plugin: 'kotlin'
 
-def ynrccVersion = buildVersion
-def details = versionDetails()
+def ynrccStartClass = "com.supwisdom.agent.YnrccAgentApplication"
 
-sourceCompatibility = jdkVersion
-def ynrccStartClass = 'com.supwisdom.agent.YnrccAgentApplication'
-
-println("Build version: $ynrccVersion")
+println("Build version: $buildVersion")
 
 bootJar {
     mainClassName = ynrccStartClass
     manifest {
-        attributes('YnrccAgent-Version': ynrccVersion)
+        attributes('YnrccAgent-Version': buildVersion)
     }
 }
 
-jar {
-    baseName = 'ynrcc-agent'
+compileKotlin {
+    kotlinOptions {
+        freeCompilerArgs = ["-Xjsr305=strict"]
+        jvmTarget = jdkVersion
+    }
+}
+
+compileTestKotlin {
+    kotlinOptions {
+        freeCompilerArgs = ["-Xjsr305=strict"]
+        jvmTarget = jdkVersion
+    }
 }
 
 docker {
@@ -34,10 +41,10 @@
     } else {
         imageVersion = details.lastTag
     }
-    println("Docker image tag : " + imageVersion)
-    name 'harbor.supwisdom.com/dali/ynrcc:' + imageVersion
-    println(jar.archivePath)
-    files jar.archivePath
+    println("Docker image tag : ${imageVersion}")
+    name "${dockerRegistry}/ynrcc:${imageVersion}"
+    println(jar.archiveFile.get())
+    files jar.archiveFile.get()
 }
 
 docker.dependsOn(jar)
@@ -54,5 +61,6 @@
     implementation "commons-beanutils:commons-beanutils:${beanutilsVersion}"
     implementation "commons-net:commons-net:${commonNetVersion}"
 
+    runtime("org.springframework.boot:spring-boot-devtools")
 }