|  | import java.text.SimpleDateFormat | 
|  |  | 
|  | plugins { | 
|  | id "java" | 
|  | id "org.springframework.boot" | 
|  | id "org.jetbrains.kotlin.jvm" | 
|  | id "org.jetbrains.kotlin.plugin.jpa" | 
|  | id "org.jetbrains.kotlin.plugin.spring" | 
|  | id "com.palantir.docker" | 
|  | } | 
|  |  | 
|  | payapiVersion = gitVersion() | 
|  | def details = versionDetails() | 
|  |  | 
|  | def payapiStartClass = "com.supwisdom.dlpay.PayApiApplicationKt" | 
|  |  | 
|  | println("Build version: $payapiVersion") | 
|  |  | 
|  | bootJar { | 
|  | mainClassName = payapiStartClass | 
|  | manifest { | 
|  | attributes("Payapi-Version": payapiVersion, | 
|  | "Payapi-Buildtime": new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(new Date())) | 
|  | } | 
|  | } | 
|  |  | 
|  | jar { | 
|  | baseName = "payapi" | 
|  | } | 
|  |  | 
|  | compileKotlin { | 
|  | kotlinOptions { | 
|  | freeCompilerArgs = ["-Xjsr305=strict"] | 
|  | jvmTarget = jdkVersion | 
|  | } | 
|  | } | 
|  |  | 
|  | compileTestKotlin { | 
|  | kotlinOptions { | 
|  | freeCompilerArgs = ["-Xjsr305=strict"] | 
|  | jvmTarget = jdkVersion | 
|  | } | 
|  | } | 
|  |  | 
|  | docker { | 
|  | def imageVersion | 
|  | if (details.gitHashFull.startsWith(details.lastTag) || !details.isCleanTag) { | 
|  | imageVersion = "dev" | 
|  | } else { | 
|  | imageVersion = details.lastTag | 
|  | } | 
|  | println("Docker image tag : " + imageVersion) | 
|  | name "harbor.supwisdom.com/dali/payapi:" + imageVersion | 
|  | println(jar.archivePath) | 
|  | files jar.archivePath | 
|  | } | 
|  |  | 
|  | docker.dependsOn(jar) | 
|  |  | 
|  | dependencies { | 
|  | implementation project(":payapi-common") | 
|  |  | 
|  | implementation "org.springframework.boot:spring-boot-starter-web" | 
|  | implementation "org.springframework.boot:spring-boot-starter-security" | 
|  | implementation "org.springframework.boot:spring-boot-starter-cache" | 
|  | implementation "org.springframework.boot:spring-boot-autoconfigure" | 
|  | implementation "org.springframework.security:spring-security-oauth2-jose" | 
|  | implementation "org.springframework.security:spring-security-oauth2-client" | 
|  | implementation "org.springframework.security:spring-security-oauth2-jose" | 
|  | implementation "org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure" | 
|  | implementation "org.springframework.boot:spring-boot-starter-thymeleaf" | 
|  | implementation "org.springframework.session:spring-session-data-redis" | 
|  | implementation "org.springframework.boot:spring-boot-starter-cache" | 
|  | implementation "org.springframework.kafka:spring-kafka" | 
|  | implementation "org.springframework.social:spring-social-web:${springSocialVersion}" | 
|  | implementation "org.springframework.kafka:spring-kafka:${springKafkaVersion}" | 
|  |  | 
|  | implementation "org.springframework.cloud:spring-cloud-starter" | 
|  | implementation "org.springframework.cloud:spring-cloud-starter-consul-discovery" | 
|  | implementation "org.springframework.cloud:spring-cloud-starter-netflix-hystrix" | 
|  | implementation "org.springframework.cloud:spring-cloud-starter-netflix-hystrix-dashboard" | 
|  |  | 
|  | runtime("org.springframework.boot:spring-boot-devtools") | 
|  |  | 
|  | implementation "org.thymeleaf.extras:thymeleaf-extras-springsecurity5" | 
|  | implementation 'org.bitbucket.b_c:jose4j:0.6.5' | 
|  | implementation 'com.github.penggle:kaptcha:2.3.2' | 
|  | implementation group: 'com.sun.jersey', name: 'jersey-client', version: '1.19' | 
|  | implementation group: 'javax.servlet', name: 'jstl', version: '1.2' | 
|  | implementation group: 'taglibs', name: 'standard', version: '1.1.2' | 
|  | implementation files('libs/masmgc.sdk.sms-0.0.1-SNAPSHOT.jar') | 
|  | implementation 'commons-beanutils:commons-beanutils:1.9.3' | 
|  | implementation 'com.eatthepath:java-otp:0.1.0' | 
|  | implementation project(':payapi-common') | 
|  |  | 
|  | implementation "org.apache.commons:commons-lang3:${lang3Version}" | 
|  | implementation "net.javacrumbs.shedlock:shedlock-spring:${shedlockVersion}" | 
|  | implementation "net.javacrumbs.shedlock:shedlock-provider-redis-spring:${shedlockVersion}" | 
|  |  | 
|  | implementation "org.bitbucket.b_c:jose4j:${jose4jVersion}" | 
|  | implementation files("libs/masmgc.sdk.sms-0.0.1-SNAPSHOT.jar") | 
|  | implementation "commons-beanutils:commons-beanutils:${beanutilsVersion}" | 
|  | /*支付宝SDK*/ | 
|  | implementation "com.alipay.sdk:alipay-sdk-java:${alipaySDKVersion}" | 
|  |  | 
|  | implementation "com.github.penggle:kaptcha:${kaptchaVersion}" | 
|  | implementation "com.sun.jersey:jersey-client:${jerseyClientVersion}" | 
|  |  | 
|  | } | 
|  |  | 
|  | tasks.withType(JavaCompile) { | 
|  | options.encoding = "UTF-8" | 
|  | } | 
|  |  |