|  | 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) | 
|  |  | 
|  | repositories { | 
|  | maven { | 
|  | url "http://ykt-nx.supwisdom.com/repository/ecard-repo/" | 
|  | credentials { | 
|  | username 'ecard' | 
|  | password 'Ecard4SUP' | 
|  | } | 
|  | } | 
|  | } | 
|  |  | 
|  | dependencies { | 
|  | implementation 'org.springframework.boot:spring-boot-starter-data-jpa' | 
|  | implementation 'org.springframework.boot:spring-boot-starter-data-redis' | 
|  | 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:2.1.5.RELEASE' | 
|  | 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:1.1.6.RELEASE' | 
|  | implementation 'org.springframework.kafka:spring-kafka:2.2.8.RELEASE' | 
|  | implementation 'org.jetbrains.kotlin:kotlin-reflect' | 
|  | implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' | 
|  | implementation 'commons-codec:commons-codec:1.12' | 
|  | implementation 'org.apache.commons:commons-lang3:3.9' | 
|  | implementation 'net.javacrumbs.shedlock:shedlock-spring:2.5.0' | 
|  | implementation 'net.javacrumbs.shedlock:shedlock-provider-redis-spring:2.5.0' | 
|  |  | 
|  | 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' | 
|  |  | 
|  | implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5' | 
|  | runtime("org.springframework.boot:spring-boot-devtools") | 
|  |  | 
|  | implementation 'org.postgresql:postgresql:42.2.5' | 
|  | implementation 'com.fasterxml.jackson.module:jackson-module-kotlin' | 
|  | implementation 'com.jcabi:jcabi-manifests:1.1' | 
|  | implementation 'org.bitbucket.b_c:jose4j:0.6.5' | 
|  | implementation 'io.github.microutils:kotlin-logging:1.6.26' | 
|  | implementation 'org.slf4j:slf4j-parent:1.7.26' | 
|  | implementation 'com.github.penggle:kaptcha:2.3.2' | 
|  | implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5' | 
|  | 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 group: 'commons-codec', name: 'commons-codec', version: '1.13' | 
|  | implementation files('libs/masmgc.sdk.sms-0.0.1-SNAPSHOT.jar') | 
|  | //    implementation files('libs/ojdbc6.jar') | 
|  | implementation 'commons-dbcp:commons-dbcp:1.4' | 
|  | implementation 'commons-beanutils:commons-beanutils:1.9.3' | 
|  | implementation files('libs/ynrcc-openapi-sdk-1.1.2-RELEASE.jar') | 
|  |  | 
|  | //大理农商行sdk需求jar | 
|  | implementation 'cn.hutool:hutool-crypto:5.4.7' | 
|  | implementation 'org.bouncycastle:bcprov-jdk15on:1.64' | 
|  |  | 
|  | implementation 'log4j:log4j:1.2.17' | 
|  | implementation 'com.alibaba:fastjson:1.2.60' | 
|  |  | 
|  | implementation 'com.eatthepath:java-otp:0.2.0' | 
|  | implementation project(':payapi-common') | 
|  | /*支付宝SDK*/ | 
|  | implementation group: 'com.alipay.sdk', name: 'alipay-sdk-java', version: '3.7.110.ALL' | 
|  |  | 
|  | /*大理二维码jar*/ | 
|  | implementation 'com.supwisdom:dlsmk-qrcode:1.3.6' | 
|  |  | 
|  | annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" | 
|  | annotationProcessor 'org.projectlombok:lombok:1.18.8' | 
|  | compileOnly 'org.projectlombok:lombok:1.18.8' | 
|  |  | 
|  | implementation "org.apache.commons:commons-lang3:${lang3Version}" | 
|  | implementation "net.javacrumbs.shedlock:shedlock-spring:${shedlockVersion}" | 
|  | implementation "net.javacrumbs.shedlock:shedlock-provider-redis-spring:${shedlockVersion}" | 
|  |  | 
|  | //    providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' | 
|  | testImplementation 'org.springframework.boot:spring-boot-starter-test' | 
|  | testImplementation 'io.rest-assured:rest-assured:3.3.0' | 
|  | testImplementation 'io.rest-assured:spring-mock-mvc:3.3.0' | 
|  | testImplementation 'org.hamcrest:hamcrest:2.1' | 
|  | } | 
|  |  | 
|  | tasks.withType(JavaCompile) { | 
|  | options.encoding = "UTF-8" | 
|  | } | 
|  |  |