blob: 455aa2890898d3c9f4e39557b71111caf4e04576 [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
Tang Cheng11be1ac2020-01-10 15:31:25 +080017
Tang Chenge7d3a0e2019-07-08 16:27:33 +080018bootJar {
Tang Cheng1d565842019-12-18 20:33:41 +080019 enabled = true
Tang Cheng8beabcd2019-07-12 11:48:01 +080020 mainClassName = payapiStartClass
Tang Cheng11be1ac2020-01-10 15:31:25 +080021 archiveFileName = "${project.name}-${buildVersion}.${archiveExtension.getOrElse('.jar')}"
Tang Chenge7d3a0e2019-07-08 16:27:33 +080022 manifest {
Tang Chengf36d7252019-12-17 14:14:50 +080023 attributes("Payapi-Version": buildVersion,
Tang Cheng1d565842019-12-18 20:33:41 +080024 "Payapi-Buildtime": buildTime)
Tang Chenge7d3a0e2019-07-08 16:27:33 +080025 }
26}
27
Tang Cheng91ca2772019-12-16 08:59:52 +080028compileKotlin {
29 kotlinOptions {
30 freeCompilerArgs = ["-Xjsr305=strict"]
31 jvmTarget = jdkVersion
32 }
33}
34
35compileTestKotlin {
36 kotlinOptions {
37 freeCompilerArgs = ["-Xjsr305=strict"]
38 jvmTarget = jdkVersion
39 }
Tang Cheng468da542019-09-12 11:29:48 +080040}
41
Tang Chenge7d3a0e2019-07-08 16:27:33 +080042docker {
Tang Cheng1b745242019-07-25 09:28:16 +080043 def imageVersion
Xia Kaixiang910ebfa2019-10-12 17:48:43 +080044 if (details.gitHashFull.startsWith(details.lastTag) || !details.isCleanTag) {
Tang Cheng91ca2772019-12-16 08:59:52 +080045 imageVersion = "dev"
Tang Cheng1b745242019-07-25 09:28:16 +080046 } else {
47 imageVersion = details.lastTag
48 }
Tang Cheng1d565842019-12-18 20:33:41 +080049 println("Docker image tag : ${imageVersion}")
50 name "${dockerRegistry}/payapi:${imageVersion}"
Tang Cheng11be1ac2020-01-10 15:31:25 +080051 println(bootJar.archiveFile.get())
52 files bootJar.archiveFile.get()
53 buildArgs([BUILD_VERSION: "${buildVersion}"])
Tang Chenge7d3a0e2019-07-08 16:27:33 +080054}
55
Tang Chenge4032902019-12-19 12:38:08 +080056configurations {
57 developmentOnly
58 runtimeClasspath {
59 extendsFrom developmentOnly
60 }
61}
62
Tang Cheng62d405b2019-12-24 15:39:45 +080063repositories {
64 maven {
65 url "http://ykt-nx.supwisdom.com/repository/ecard-repo/"
66 credentials {
67 username "${nxUser}"
68 password "${nxPassword}"
69 }
70 }
71}
72
Tang Chenge7d3a0e2019-07-08 16:27:33 +080073dependencies {
Tang Cheng91ca2772019-12-16 08:59:52 +080074 implementation project(":payapi-common")
Tang Chenge7d3a0e2019-07-08 16:27:33 +080075
Tang Cheng91ca2772019-12-16 08:59:52 +080076 implementation "org.springframework.boot:spring-boot-starter-web"
77 implementation "org.springframework.boot:spring-boot-starter-security"
78 implementation "org.springframework.boot:spring-boot-starter-cache"
Tang Chengcc3f01f2020-03-17 12:53:15 +080079 runtime "org.springframework.boot:spring-boot-starter-actuator"
Tang Cheng91ca2772019-12-16 08:59:52 +080080 implementation "org.springframework.boot:spring-boot-autoconfigure"
81 implementation "org.springframework.security:spring-security-oauth2-jose"
82 implementation "org.springframework.security:spring-security-oauth2-client"
83 implementation "org.springframework.security:spring-security-oauth2-jose"
Tang Cheng07b36f12019-12-16 11:41:58 +080084 implementation "org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure"
Tang Cheng91ca2772019-12-16 08:59:52 +080085 implementation "org.springframework.boot:spring-boot-starter-thymeleaf"
86 implementation "org.springframework.session:spring-session-data-redis"
87 implementation "org.springframework.boot:spring-boot-starter-cache"
Tang Cheng91ca2772019-12-16 08:59:52 +080088 implementation "org.springframework.social:spring-social-web:${springSocialVersion}"
Tang Cheng1d565842019-12-18 20:33:41 +080089 implementation "org.apache.kafka:kafka-streams"
90 implementation "org.springframework.kafka:spring-kafka"
Tang Chenge7d3a0e2019-07-08 16:27:33 +080091
Tang Cheng91ca2772019-12-16 08:59:52 +080092 implementation "org.springframework.cloud:spring-cloud-starter"
93 implementation "org.springframework.cloud:spring-cloud-starter-consul-discovery"
94 implementation "org.springframework.cloud:spring-cloud-starter-netflix-hystrix"
95 implementation "org.springframework.cloud:spring-cloud-starter-netflix-hystrix-dashboard"
96
Tang Chenge4032902019-12-19 12:38:08 +080097 developmentOnly("org.springframework.boot:spring-boot-devtools")
Tang Chenge7d3a0e2019-07-08 16:27:33 +080098
Tang Cheng91ca2772019-12-16 08:59:52 +080099 implementation "org.thymeleaf.extras:thymeleaf-extras-springsecurity5"
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800100
Tang Chengcc4299d2020-03-12 15:55:12 +0800101 implementation group: 'io.swagger', name: 'swagger-annotations', version: swaggerVersion
102 implementation group: 'io.springfox', name: 'springfox-swagger2', version: springfoxVersion
103
Tang Cheng91ca2772019-12-16 08:59:52 +0800104 implementation "org.apache.commons:commons-lang3:${lang3Version}"
105 implementation "net.javacrumbs.shedlock:shedlock-spring:${shedlockVersion}"
106 implementation "net.javacrumbs.shedlock:shedlock-provider-redis-spring:${shedlockVersion}"
qiaowei38b46162019-09-09 16:35:58 +0800107
Tang Cheng62d405b2019-12-24 15:39:45 +0800108 implementation "com.supwisdom:multi-tenant-core:${multiTenantLibVersion}"
109 implementation "com.supwisdom:multi-tenant-datasource:${multiTenantLibVersion}"
Tang Cheng11be1ac2020-01-10 15:31:25 +0800110 implementation "com.supwisdom:multi-tenant-jwt:${multiTenantLibVersion}"
Tang Cheng7b610582020-02-18 21:28:33 +0800111 implementation "com.supwisdom:multi-tenant-task:${multiTenantLibVersion}"
Tang Cheng62d405b2019-12-24 15:39:45 +0800112
Tang Cheng91ca2772019-12-16 08:59:52 +0800113 implementation "org.bitbucket.b_c:jose4j:${jose4jVersion}"
114 implementation files("libs/masmgc.sdk.sms-0.0.1-SNAPSHOT.jar")
115 implementation "commons-beanutils:commons-beanutils:${beanutilsVersion}"
qiaowei1657eef2019-07-22 17:50:33 +0800116 /*支付宝SDK*/
Tang Cheng91ca2772019-12-16 08:59:52 +0800117 implementation "com.alipay.sdk:alipay-sdk-java:${alipaySDKVersion}"
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800118
Tang Cheng91ca2772019-12-16 08:59:52 +0800119 implementation "com.github.penggle:kaptcha:${kaptchaVersion}"
120 implementation "com.sun.jersey:jersey-client:${jerseyClientVersion}"
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800121
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800122}
123