blob: ed8ce9b15d5ed510513e64974cd786a3154d39a9 [file] [log] [blame]
Tang Chenge7d3a0e2019-07-08 16:27:33 +08001plugins {
2 id 'java'
Tang Cheng22731312019-07-12 11:19:30 +08003 id 'org.springframework.boot'
4 id 'org.jetbrains.kotlin.jvm'
Tang Chenge7d3a0e2019-07-08 16:27:33 +08005 id 'org.jetbrains.kotlin.plugin.jpa' version '1.3.31'
Tang Cheng22731312019-07-12 11:19:30 +08006 id 'org.jetbrains.kotlin.plugin.spring'
7 id "com.palantir.git-version"
8 id 'com.palantir.docker'
Tang Chenge7d3a0e2019-07-08 16:27:33 +08009}
10
11apply plugin: 'java'
12apply plugin: 'io.spring.dependency-management'
13
14payapiVersion = gitVersion()
Tang Cheng1b745242019-07-25 09:28:16 +080015def details = versionDetails()
Tang Chenge7d3a0e2019-07-08 16:27:33 +080016
Tang Cheng40993e12019-07-08 16:38:51 +080017group = rootProject.group
Tang Chenge7d3a0e2019-07-08 16:27:33 +080018version = '1'
19sourceCompatibility = jdkVersion
Tang Cheng8beabcd2019-07-12 11:48:01 +080020def payapiStartClass = 'com.supwisdom.dlpay.PayApiApplicationKt'
Tang Chenge7d3a0e2019-07-08 16:27:33 +080021
22println("Build version: $payapiVersion")
Tang Chenge7d3a0e2019-07-08 16:27:33 +080023
24bootJar {
Tang Cheng8beabcd2019-07-12 11:48:01 +080025 mainClassName = payapiStartClass
Tang Chenge7d3a0e2019-07-08 16:27:33 +080026 manifest {
27 attributes('Payapi-Version': payapiVersion)
28 }
29}
30
31jar {
32 baseName = 'payapi'
33}
34
35docker {
Tang Cheng1b745242019-07-25 09:28:16 +080036 def imageVersion
Tang Cheng20b53b52019-07-25 09:35:41 +080037 if (details.commitDistance > 0 || !details.isCleanTag) {
Tang Cheng1b745242019-07-25 09:28:16 +080038 imageVersion = 'dev'
39 } else {
40 imageVersion = details.lastTag
41 }
Tang Cheng20b53b52019-07-25 09:35:41 +080042 name 'harbor.supwisdom.com/dali/payapi:' + imageVersion
Tang Chenge7d3a0e2019-07-08 16:27:33 +080043 println(jar.archivePath)
44 files jar.archivePath
45}
46
47docker.dependsOn(jar)
48
49dependencies {
50 implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
51 implementation 'org.springframework.boot:spring-boot-starter-data-redis'
52 implementation 'org.springframework.boot:spring-boot-starter-web'
53 implementation 'org.springframework.boot:spring-boot-starter-security'
54 implementation 'org.springframework.boot:spring-boot-starter-cache'
55 implementation 'org.springframework.boot:spring-boot-autoconfigure'
56 implementation 'org.springframework.security:spring-security-oauth2-jose'
57 implementation 'org.springframework.security:spring-security-oauth2-client'
58 implementation 'org.springframework.security:spring-security-oauth2-jose'
59 implementation 'org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.1.5.RELEASE'
60 implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
61 implementation 'org.springframework.session:spring-session-data-redis'
62 implementation 'org.springframework.boot:spring-boot-starter-cache'
63 implementation 'org.springframework.social:spring-social-web:1.1.6.RELEASE'
64 implementation 'org.jetbrains.kotlin:kotlin-reflect'
65 implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
66 implementation 'commons-codec:commons-codec:1.12'
Tang Chenge7436342019-07-11 16:04:58 +080067 implementation 'org.apache.commons:commons-lang3:3.9'
Tang Chengacb93a62019-07-18 22:04:48 +080068 implementation 'net.javacrumbs.shedlock:shedlock-spring:2.5.0'
69 implementation 'net.javacrumbs.shedlock:shedlock-provider-redis-spring:2.5.0'
Tang Chenge7d3a0e2019-07-08 16:27:33 +080070
71 implementation 'org.springframework.cloud:spring-cloud-starter-consul-discovery:2.1.2.RELEASE'
72
73 implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5'
74
75 runtime("org.springframework.boot:spring-boot-devtools")
76
77 implementation 'org.postgresql:postgresql:42.2.5'
78 implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
79 implementation 'com.jcabi:jcabi-manifests:1.1'
Tang Chenge0537a72019-07-13 12:52:07 +080080 implementation 'org.bitbucket.b_c:jose4j:0.6.5'
Tang Chenge7d3a0e2019-07-08 16:27:33 +080081 implementation 'io.github.microutils:kotlin-logging:1.6.26'
82 implementation 'org.slf4j:slf4j-parent:1.7.26'
83 implementation 'com.github.penggle:kaptcha:2.3.2'
84 implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
85 implementation group: 'com.sun.jersey', name: 'jersey-client', version: '1.19'
86 implementation group: 'javax.servlet', name: 'jstl', version: '1.2'
87 implementation group: 'taglibs', name: 'standard', version: '1.1.2'
Tang Cheng5f834db2019-07-29 11:00:13 +080088 implementation group: 'commons-codec', name: 'commons-codec', version: '1.13'
qiaowei249b37b2019-07-29 10:07:11 +080089 implementation files('libs/sms.jar')
Tang Cheng5f834db2019-07-29 11:00:13 +080090// implementation files('libs/ojdbc6.jar')
Tang Chenge7d3a0e2019-07-08 16:27:33 +080091 implementation 'commons-dbcp:commons-dbcp:1.4'
92
Tang Cheng13911f92019-07-10 09:38:32 +080093 implementation project(':payapi-common')
qiaowei1657eef2019-07-22 17:50:33 +080094 /*支付宝SDK*/
95 implementation group: 'com.alipay.sdk', name: 'alipay-sdk-java', version: '3.7.110.ALL'
Tang Chenge7d3a0e2019-07-08 16:27:33 +080096
97 annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
98 annotationProcessor 'org.projectlombok:lombok:1.18.8'
99 compileOnly 'org.projectlombok:lombok:1.18.8'
100
101// providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
102 testImplementation 'org.springframework.boot:spring-boot-starter-test'
103 testImplementation 'io.rest-assured:rest-assured:3.3.0'
104 testImplementation 'io.rest-assured:spring-mock-mvc:3.3.0'
105 testImplementation 'org.hamcrest:hamcrest:2.1'
106}
107
108compileKotlin {
109 kotlinOptions {
110 freeCompilerArgs = ['-Xjsr305=strict']
111 jvmTarget = jdkVersion
112 }
113}
114
115compileTestKotlin {
116 kotlinOptions {
117 freeCompilerArgs = ['-Xjsr305=strict']
118 jvmTarget = jdkVersion
119 }
120}