blob: c6061a282d3297862e893d054094ed89fabcce7b [file] [log] [blame]
qiaowei41f869c2019-08-08 15:01:29 +08001import java.text.SimpleDateFormat
2
Tang Chenge7d3a0e2019-07-08 16:27:33 +08003plugins {
Tang Cheng91ca2772019-12-16 08:59:52 +08004 id "java"
5 id "org.springframework.boot"
6 id "org.jetbrains.kotlin.jvm"
7 id "org.jetbrains.kotlin.plugin.jpa"
8 id "org.jetbrains.kotlin.plugin.spring"
9 id "com.palantir.docker"
Tang Chenge7d3a0e2019-07-08 16:27:33 +080010}
11
Tang Chenge7d3a0e2019-07-08 16:27:33 +080012payapiVersion = gitVersion()
Tang Cheng1b745242019-07-25 09:28:16 +080013def details = versionDetails()
Tang Chenge7d3a0e2019-07-08 16:27:33 +080014
Tang Cheng91ca2772019-12-16 08:59:52 +080015def payapiStartClass = "com.supwisdom.dlpay.PayApiApplicationKt"
Tang Chenge7d3a0e2019-07-08 16:27:33 +080016
17println("Build version: $payapiVersion")
Tang Chenge7d3a0e2019-07-08 16:27:33 +080018
19bootJar {
Tang Cheng8beabcd2019-07-12 11:48:01 +080020 mainClassName = payapiStartClass
Tang Chenge7d3a0e2019-07-08 16:27:33 +080021 manifest {
Tang Cheng91ca2772019-12-16 08:59:52 +080022 attributes("Payapi-Version": payapiVersion,
23 "Payapi-Buildtime": new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(new Date()))
Tang Chenge7d3a0e2019-07-08 16:27:33 +080024 }
25}
26
27jar {
Tang Cheng91ca2772019-12-16 08:59:52 +080028 baseName = "payapi"
Tang Chenge7d3a0e2019-07-08 16:27:33 +080029}
30
Tang Cheng91ca2772019-12-16 08:59:52 +080031compileKotlin {
32 kotlinOptions {
33 freeCompilerArgs = ["-Xjsr305=strict"]
34 jvmTarget = jdkVersion
35 }
36}
37
38compileTestKotlin {
39 kotlinOptions {
40 freeCompilerArgs = ["-Xjsr305=strict"]
41 jvmTarget = jdkVersion
42 }
Tang Cheng468da542019-09-12 11:29:48 +080043}
44
Tang Chenge7d3a0e2019-07-08 16:27:33 +080045docker {
Tang Cheng1b745242019-07-25 09:28:16 +080046 def imageVersion
Xia Kaixiang910ebfa2019-10-12 17:48:43 +080047 if (details.gitHashFull.startsWith(details.lastTag) || !details.isCleanTag) {
Tang Cheng91ca2772019-12-16 08:59:52 +080048 imageVersion = "dev"
Tang Cheng1b745242019-07-25 09:28:16 +080049 } else {
50 imageVersion = details.lastTag
51 }
Xia Kaixiang910ebfa2019-10-12 17:48:43 +080052 println("Docker image tag : " + imageVersion)
Tang Cheng91ca2772019-12-16 08:59:52 +080053 name "harbor.supwisdom.com/dali/payapi:" + imageVersion
Tang Chenge7d3a0e2019-07-08 16:27:33 +080054 println(jar.archivePath)
55 files jar.archivePath
56}
57
58docker.dependsOn(jar)
59
kaixiang.xia03919bd2020-10-28 18:19:09 +080060repositories {
61 maven {
62 url "http://ykt-nx.supwisdom.com/repository/ecard-repo/"
63 credentials {
64 username 'ecard'
65 password 'Ecard4SUP'
66 }
67 }
68}
69
Tang Chenge7d3a0e2019-07-08 16:27:33 +080070dependencies {
71 implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
72 implementation 'org.springframework.boot:spring-boot-starter-data-redis'
73 implementation 'org.springframework.boot:spring-boot-starter-web'
74 implementation 'org.springframework.boot:spring-boot-starter-security'
75 implementation 'org.springframework.boot:spring-boot-starter-cache'
76 implementation 'org.springframework.boot:spring-boot-autoconfigure'
77 implementation 'org.springframework.security:spring-security-oauth2-jose'
78 implementation 'org.springframework.security:spring-security-oauth2-client'
79 implementation 'org.springframework.security:spring-security-oauth2-jose'
80 implementation 'org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.1.5.RELEASE'
81 implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
82 implementation 'org.springframework.session:spring-session-data-redis'
83 implementation 'org.springframework.boot:spring-boot-starter-cache'
Tang Cheng432d47c2019-08-10 13:18:36 +080084 implementation 'org.springframework.kafka:spring-kafka'
Tang Chenge7d3a0e2019-07-08 16:27:33 +080085 implementation 'org.springframework.social:spring-social-web:1.1.6.RELEASE'
Tang Cheng4f2bfd02019-09-12 11:29:48 +080086 implementation 'org.springframework.kafka:spring-kafka:2.2.8.RELEASE'
Tang Chenge7d3a0e2019-07-08 16:27:33 +080087 implementation 'org.jetbrains.kotlin:kotlin-reflect'
88 implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
89 implementation 'commons-codec:commons-codec:1.12'
Tang Chenge7436342019-07-11 16:04:58 +080090 implementation 'org.apache.commons:commons-lang3:3.9'
Tang Chengacb93a62019-07-18 22:04:48 +080091 implementation 'net.javacrumbs.shedlock:shedlock-spring:2.5.0'
92 implementation 'net.javacrumbs.shedlock:shedlock-provider-redis-spring:2.5.0'
Tang Chenge7d3a0e2019-07-08 16:27:33 +080093
Tang Cheng4f2bfd02019-09-12 11:29:48 +080094 implementation 'org.springframework.cloud:spring-cloud-starter'
95 implementation 'org.springframework.cloud:spring-cloud-starter-consul-discovery'
96 implementation 'org.springframework.cloud:spring-cloud-starter-netflix-hystrix'
97 implementation 'org.springframework.cloud:spring-cloud-starter-netflix-hystrix-dashboard'
Tang Chenge7d3a0e2019-07-08 16:27:33 +080098
99 implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5'
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800100 runtime("org.springframework.boot:spring-boot-devtools")
101
102 implementation 'org.postgresql:postgresql:42.2.5'
103 implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
104 implementation 'com.jcabi:jcabi-manifests:1.1'
Tang Chenge0537a72019-07-13 12:52:07 +0800105 implementation 'org.bitbucket.b_c:jose4j:0.6.5'
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800106 implementation 'io.github.microutils:kotlin-logging:1.6.26'
107 implementation 'org.slf4j:slf4j-parent:1.7.26'
108 implementation 'com.github.penggle:kaptcha:2.3.2'
109 implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
110 implementation group: 'com.sun.jersey', name: 'jersey-client', version: '1.19'
111 implementation group: 'javax.servlet', name: 'jstl', version: '1.2'
112 implementation group: 'taglibs', name: 'standard', version: '1.1.2'
Tang Cheng5f834db2019-07-29 11:00:13 +0800113 implementation group: 'commons-codec', name: 'commons-codec', version: '1.13'
qiaoweidc92a3b2019-09-09 16:35:58 +0800114 implementation files('libs/masmgc.sdk.sms-0.0.1-SNAPSHOT.jar')
kaixiang.xiaf5943852020-12-04 17:59:42 +0800115 // implementation files('libs/ojdbc6.jar')
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800116 implementation 'commons-dbcp:commons-dbcp:1.4'
Xia Kaixiang6c9365e2019-07-31 15:44:51 +0800117 implementation 'commons-beanutils:commons-beanutils:1.9.3'
kaixiang.xia79ce2752021-04-06 10:35:23 +0800118 implementation files('libs/ynrcc-openapi-sdk-1.1.2-RELEASE.jar')
119
120 //大理农商行sdk需求jar
121 implementation 'cn.hutool:hutool-crypto:5.4.7'
122 implementation 'org.bouncycastle:bcprov-jdk15on:1.64'
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800123
qiaoweidc92a3b2019-09-09 16:35:58 +0800124 implementation 'log4j:log4j:1.2.17'
125 implementation 'com.alibaba:fastjson:1.2.60'
126
kaixiang.xia427418f2020-11-05 14:57:08 +0800127 implementation 'com.eatthepath:java-otp:0.2.0'
Tang Cheng13911f92019-07-10 09:38:32 +0800128 implementation project(':payapi-common')
qiaowei1657eef2019-07-22 17:50:33 +0800129 /*支付宝SDK*/
130 implementation group: 'com.alipay.sdk', name: 'alipay-sdk-java', version: '3.7.110.ALL'
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800131
kaixiang.xia03919bd2020-10-28 18:19:09 +0800132 /*大理二维码jar*/
kaixiang.xia43a0bcc2021-02-01 11:10:11 +0800133 implementation 'com.supwisdom:dlsmk-qrcode:1.3.6'
kaixiang.xia03919bd2020-10-28 18:19:09 +0800134
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800135 annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
136 annotationProcessor 'org.projectlombok:lombok:1.18.8'
137 compileOnly 'org.projectlombok:lombok:1.18.8'
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800138
Tang Cheng91ca2772019-12-16 08:59:52 +0800139 implementation "org.apache.commons:commons-lang3:${lang3Version}"
140 implementation "net.javacrumbs.shedlock:shedlock-spring:${shedlockVersion}"
141 implementation "net.javacrumbs.shedlock:shedlock-provider-redis-spring:${shedlockVersion}"
qiaowei38b46162019-09-09 16:35:58 +0800142
kaixiang.xiaf5943852020-12-04 17:59:42 +0800143 // providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800144 testImplementation 'org.springframework.boot:spring-boot-starter-test'
145 testImplementation 'io.rest-assured:rest-assured:3.3.0'
146 testImplementation 'io.rest-assured:spring-mock-mvc:3.3.0'
147 testImplementation 'org.hamcrest:hamcrest:2.1'
148}
149
kaixiang.xia051c7d72020-07-08 14:46:17 +0800150tasks.withType(JavaCompile) {
151 options.encoding = "UTF-8"
Tang Cheng4f2bfd02019-09-12 11:29:48 +0800152}
153