blob: 3e3c2eda8fbce8c12f989c7fa0bbffb2f9e8cc2b [file] [log] [blame]
Tang Chenge7d3a0e2019-07-08 16:27:33 +08001plugins {
Tang Cheng91ca2772019-12-16 08:59:52 +08002 id "java"
3 id "org.springframework.boot"
4 id "org.jetbrains.kotlin.jvm"
5 id "org.jetbrains.kotlin.plugin.jpa"
6 id "org.jetbrains.kotlin.plugin.spring"
7 id "com.palantir.docker"
Tang Chenge7d3a0e2019-07-08 16:27:33 +08008}
9
Tang Cheng1d565842019-12-18 20:33:41 +080010apply plugin: 'io.spring.dependency-management'
11apply plugin: 'kotlin'
Tang Chenge7d3a0e2019-07-08 16:27:33 +080012
Tang Cheng91ca2772019-12-16 08:59:52 +080013def payapiStartClass = "com.supwisdom.dlpay.PayApiApplicationKt"
Tang Chenge7d3a0e2019-07-08 16:27:33 +080014
Tang Chengf36d7252019-12-17 14:14:50 +080015println("Build version: $buildVersion")
Tang Chenge7d3a0e2019-07-08 16:27:33 +080016
17bootJar {
Tang Cheng1d565842019-12-18 20:33:41 +080018 enabled = true
Tang Cheng8beabcd2019-07-12 11:48:01 +080019 mainClassName = payapiStartClass
Tang Chenge7d3a0e2019-07-08 16:27:33 +080020 manifest {
Tang Chengf36d7252019-12-17 14:14:50 +080021 attributes("Payapi-Version": buildVersion,
Tang Cheng1d565842019-12-18 20:33:41 +080022 "Payapi-Buildtime": buildTime)
Tang Chenge7d3a0e2019-07-08 16:27:33 +080023 }
24}
25
Tang Cheng91ca2772019-12-16 08:59:52 +080026compileKotlin {
27 kotlinOptions {
28 freeCompilerArgs = ["-Xjsr305=strict"]
29 jvmTarget = jdkVersion
30 }
31}
32
33compileTestKotlin {
34 kotlinOptions {
35 freeCompilerArgs = ["-Xjsr305=strict"]
36 jvmTarget = jdkVersion
37 }
Tang Cheng468da542019-09-12 11:29:48 +080038}
39
Tang Chenge7d3a0e2019-07-08 16:27:33 +080040docker {
Tang Cheng1b745242019-07-25 09:28:16 +080041 def imageVersion
Xia Kaixiang910ebfa2019-10-12 17:48:43 +080042 if (details.gitHashFull.startsWith(details.lastTag) || !details.isCleanTag) {
Tang Cheng91ca2772019-12-16 08:59:52 +080043 imageVersion = "dev"
Tang Cheng1b745242019-07-25 09:28:16 +080044 } else {
45 imageVersion = details.lastTag
46 }
Tang Cheng1d565842019-12-18 20:33:41 +080047 println("Docker image tag : ${imageVersion}")
48 name "${dockerRegistry}/payapi:${imageVersion}"
49 println(jar.archiveFile.get())
50 files jar.archiveFile.get()
Tang Chenge7d3a0e2019-07-08 16:27:33 +080051}
52
53docker.dependsOn(jar)
54
Tang Chenge4032902019-12-19 12:38:08 +080055configurations {
56 developmentOnly
57 runtimeClasspath {
58 extendsFrom developmentOnly
59 }
60}
61
Tang Cheng62d405b2019-12-24 15:39:45 +080062repositories {
63 maven {
64 url "http://ykt-nx.supwisdom.com/repository/ecard-repo/"
65 credentials {
66 username "${nxUser}"
67 password "${nxPassword}"
68 }
69 }
70}
71
Tang Chenge7d3a0e2019-07-08 16:27:33 +080072dependencies {
Tang Cheng91ca2772019-12-16 08:59:52 +080073 implementation project(":payapi-common")
Tang Chenge7d3a0e2019-07-08 16:27:33 +080074
Tang Cheng91ca2772019-12-16 08:59:52 +080075 implementation "org.springframework.boot:spring-boot-starter-web"
76 implementation "org.springframework.boot:spring-boot-starter-security"
77 implementation "org.springframework.boot:spring-boot-starter-cache"
78 implementation "org.springframework.boot:spring-boot-autoconfigure"
79 implementation "org.springframework.security:spring-security-oauth2-jose"
80 implementation "org.springframework.security:spring-security-oauth2-client"
81 implementation "org.springframework.security:spring-security-oauth2-jose"
Tang Cheng07b36f12019-12-16 11:41:58 +080082 implementation "org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure"
Tang Cheng91ca2772019-12-16 08:59:52 +080083 implementation "org.springframework.boot:spring-boot-starter-thymeleaf"
84 implementation "org.springframework.session:spring-session-data-redis"
85 implementation "org.springframework.boot:spring-boot-starter-cache"
Tang Cheng91ca2772019-12-16 08:59:52 +080086 implementation "org.springframework.social:spring-social-web:${springSocialVersion}"
Tang Cheng1d565842019-12-18 20:33:41 +080087 implementation "org.apache.kafka:kafka-streams"
88 implementation "org.springframework.kafka:spring-kafka"
Tang Chenge7d3a0e2019-07-08 16:27:33 +080089
Tang Cheng91ca2772019-12-16 08:59:52 +080090 implementation "org.springframework.cloud:spring-cloud-starter"
91 implementation "org.springframework.cloud:spring-cloud-starter-consul-discovery"
92 implementation "org.springframework.cloud:spring-cloud-starter-netflix-hystrix"
93 implementation "org.springframework.cloud:spring-cloud-starter-netflix-hystrix-dashboard"
94
Tang Chenge4032902019-12-19 12:38:08 +080095 developmentOnly("org.springframework.boot:spring-boot-devtools")
Tang Chenge7d3a0e2019-07-08 16:27:33 +080096
Tang Cheng91ca2772019-12-16 08:59:52 +080097 implementation "org.thymeleaf.extras:thymeleaf-extras-springsecurity5"
Tang Chenge7d3a0e2019-07-08 16:27:33 +080098
Tang Cheng91ca2772019-12-16 08:59:52 +080099 implementation "org.apache.commons:commons-lang3:${lang3Version}"
100 implementation "net.javacrumbs.shedlock:shedlock-spring:${shedlockVersion}"
101 implementation "net.javacrumbs.shedlock:shedlock-provider-redis-spring:${shedlockVersion}"
qiaowei38b46162019-09-09 16:35:58 +0800102
Tang Cheng62d405b2019-12-24 15:39:45 +0800103 implementation "com.supwisdom:multi-tenant-core:${multiTenantLibVersion}"
104 implementation "com.supwisdom:multi-tenant-datasource:${multiTenantLibVersion}"
105
Tang Cheng91ca2772019-12-16 08:59:52 +0800106 implementation "org.bitbucket.b_c:jose4j:${jose4jVersion}"
107 implementation files("libs/masmgc.sdk.sms-0.0.1-SNAPSHOT.jar")
108 implementation "commons-beanutils:commons-beanutils:${beanutilsVersion}"
qiaowei1657eef2019-07-22 17:50:33 +0800109 /*支付宝SDK*/
Tang Cheng91ca2772019-12-16 08:59:52 +0800110 implementation "com.alipay.sdk:alipay-sdk-java:${alipaySDKVersion}"
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800111
Tang Cheng91ca2772019-12-16 08:59:52 +0800112 implementation "com.github.penggle:kaptcha:${kaptchaVersion}"
113 implementation "com.sun.jersey:jersey-client:${jerseyClientVersion}"
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800114
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800115}
116