blob: 656a31980783f50b70cadb6d78bf61eb8d3eb38b [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"
79 implementation "org.springframework.boot:spring-boot-autoconfigure"
80 implementation "org.springframework.security:spring-security-oauth2-jose"
81 implementation "org.springframework.security:spring-security-oauth2-client"
82 implementation "org.springframework.security:spring-security-oauth2-jose"
Tang Cheng07b36f12019-12-16 11:41:58 +080083 implementation "org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure"
Tang Cheng91ca2772019-12-16 08:59:52 +080084 implementation "org.springframework.boot:spring-boot-starter-thymeleaf"
85 implementation "org.springframework.session:spring-session-data-redis"
86 implementation "org.springframework.boot:spring-boot-starter-cache"
Tang Cheng91ca2772019-12-16 08:59:52 +080087 implementation "org.springframework.social:spring-social-web:${springSocialVersion}"
Tang Cheng1d565842019-12-18 20:33:41 +080088 implementation "org.apache.kafka:kafka-streams"
89 implementation "org.springframework.kafka:spring-kafka"
Tang Chenge7d3a0e2019-07-08 16:27:33 +080090
Tang Cheng91ca2772019-12-16 08:59:52 +080091 implementation "org.springframework.cloud:spring-cloud-starter"
92 implementation "org.springframework.cloud:spring-cloud-starter-consul-discovery"
93 implementation "org.springframework.cloud:spring-cloud-starter-netflix-hystrix"
94 implementation "org.springframework.cloud:spring-cloud-starter-netflix-hystrix-dashboard"
95
Tang Chenge4032902019-12-19 12:38:08 +080096 developmentOnly("org.springframework.boot:spring-boot-devtools")
Tang Chenge7d3a0e2019-07-08 16:27:33 +080097
Tang Cheng91ca2772019-12-16 08:59:52 +080098 implementation "org.thymeleaf.extras:thymeleaf-extras-springsecurity5"
Tang Chenge7d3a0e2019-07-08 16:27:33 +080099
Tang Chengcc4299d2020-03-12 15:55:12 +0800100 implementation group: 'io.swagger', name: 'swagger-annotations', version: swaggerVersion
101 implementation group: 'io.springfox', name: 'springfox-swagger2', version: springfoxVersion
102
Tang Cheng91ca2772019-12-16 08:59:52 +0800103 implementation "org.apache.commons:commons-lang3:${lang3Version}"
104 implementation "net.javacrumbs.shedlock:shedlock-spring:${shedlockVersion}"
105 implementation "net.javacrumbs.shedlock:shedlock-provider-redis-spring:${shedlockVersion}"
qiaowei38b46162019-09-09 16:35:58 +0800106
Tang Cheng62d405b2019-12-24 15:39:45 +0800107 implementation "com.supwisdom:multi-tenant-core:${multiTenantLibVersion}"
108 implementation "com.supwisdom:multi-tenant-datasource:${multiTenantLibVersion}"
Tang Cheng11be1ac2020-01-10 15:31:25 +0800109 implementation "com.supwisdom:multi-tenant-jwt:${multiTenantLibVersion}"
Tang Cheng7b610582020-02-18 21:28:33 +0800110 implementation "com.supwisdom:multi-tenant-task:${multiTenantLibVersion}"
Tang Cheng62d405b2019-12-24 15:39:45 +0800111
Tang Cheng91ca2772019-12-16 08:59:52 +0800112 implementation "org.bitbucket.b_c:jose4j:${jose4jVersion}"
113 implementation files("libs/masmgc.sdk.sms-0.0.1-SNAPSHOT.jar")
114 implementation "commons-beanutils:commons-beanutils:${beanutilsVersion}"
qiaowei1657eef2019-07-22 17:50:33 +0800115 /*支付宝SDK*/
Tang Cheng91ca2772019-12-16 08:59:52 +0800116 implementation "com.alipay.sdk:alipay-sdk-java:${alipaySDKVersion}"
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800117
Tang Cheng91ca2772019-12-16 08:59:52 +0800118 implementation "com.github.penggle:kaptcha:${kaptchaVersion}"
119 implementation "com.sun.jersey:jersey-client:${jerseyClientVersion}"
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800120
Tang Chenge7d3a0e2019-07-08 16:27:33 +0800121}
122