Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 1 | plugins { |
| 2 | id 'java' |
Tang Cheng | 2273131 | 2019-07-12 11:19:30 +0800 | [diff] [blame] | 3 | id 'org.springframework.boot' |
| 4 | id 'org.jetbrains.kotlin.jvm' |
Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 5 | id 'org.jetbrains.kotlin.plugin.jpa' version '1.3.31' |
Tang Cheng | 2273131 | 2019-07-12 11:19:30 +0800 | [diff] [blame] | 6 | id 'org.jetbrains.kotlin.plugin.spring' |
| 7 | id "com.palantir.git-version" |
| 8 | id 'com.palantir.docker' |
Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 9 | } |
| 10 | |
| 11 | apply plugin: 'java' |
| 12 | apply plugin: 'io.spring.dependency-management' |
| 13 | |
| 14 | payapiVersion = gitVersion() |
Tang Cheng | 1b74524 | 2019-07-25 09:28:16 +0800 | [diff] [blame] | 15 | def details = versionDetails() |
Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 16 | |
Tang Cheng | 40993e1 | 2019-07-08 16:38:51 +0800 | [diff] [blame] | 17 | group = rootProject.group |
Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 18 | version = '1' |
| 19 | sourceCompatibility = jdkVersion |
Tang Cheng | 8beabcd | 2019-07-12 11:48:01 +0800 | [diff] [blame] | 20 | def payapiStartClass = 'com.supwisdom.dlpay.PayApiApplicationKt' |
Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 21 | |
| 22 | println("Build version: $payapiVersion") |
Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 23 | |
| 24 | bootJar { |
Tang Cheng | 8beabcd | 2019-07-12 11:48:01 +0800 | [diff] [blame] | 25 | mainClassName = payapiStartClass |
Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 26 | manifest { |
| 27 | attributes('Payapi-Version': payapiVersion) |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | jar { |
| 32 | baseName = 'payapi' |
| 33 | } |
| 34 | |
| 35 | docker { |
Tang Cheng | 1b74524 | 2019-07-25 09:28:16 +0800 | [diff] [blame] | 36 | def imageVersion |
Tang Cheng | 20b53b5 | 2019-07-25 09:35:41 +0800 | [diff] [blame] | 37 | if (details.commitDistance > 0 || !details.isCleanTag) { |
Tang Cheng | 1b74524 | 2019-07-25 09:28:16 +0800 | [diff] [blame] | 38 | imageVersion = 'dev' |
| 39 | } else { |
| 40 | imageVersion = details.lastTag |
| 41 | } |
Tang Cheng | 20b53b5 | 2019-07-25 09:35:41 +0800 | [diff] [blame] | 42 | name 'harbor.supwisdom.com/dali/payapi:' + imageVersion |
Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 43 | println(jar.archivePath) |
| 44 | files jar.archivePath |
| 45 | } |
| 46 | |
| 47 | docker.dependsOn(jar) |
| 48 | |
| 49 | dependencies { |
| 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 Cheng | e743634 | 2019-07-11 16:04:58 +0800 | [diff] [blame] | 67 | implementation 'org.apache.commons:commons-lang3:3.9' |
Tang Cheng | acb93a6 | 2019-07-18 22:04:48 +0800 | [diff] [blame] | 68 | implementation 'net.javacrumbs.shedlock:shedlock-spring:2.5.0' |
| 69 | implementation 'net.javacrumbs.shedlock:shedlock-provider-redis-spring:2.5.0' |
Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 70 | |
| 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 Cheng | e0537a7 | 2019-07-13 12:52:07 +0800 | [diff] [blame] | 80 | implementation 'org.bitbucket.b_c:jose4j:0.6.5' |
Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 81 | 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' |
| 88 | implementation group: 'commons-codec', name: 'commons-codec', version: '1.6' |
qiaowei | 249b37b | 2019-07-29 10:07:11 +0800 | [diff] [blame^] | 89 | implementation files('libs/sms.jar') |
Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 90 | implementation 'commons-dbcp:commons-dbcp:1.4' |
| 91 | |
Tang Cheng | 13911f9 | 2019-07-10 09:38:32 +0800 | [diff] [blame] | 92 | implementation project(':payapi-common') |
qiaowei | 1657eef | 2019-07-22 17:50:33 +0800 | [diff] [blame] | 93 | /*支付宝SDK*/ |
| 94 | implementation group: 'com.alipay.sdk', name: 'alipay-sdk-java', version: '3.7.110.ALL' |
Tang Cheng | e7d3a0e | 2019-07-08 16:27:33 +0800 | [diff] [blame] | 95 | |
| 96 | annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" |
| 97 | annotationProcessor 'org.projectlombok:lombok:1.18.8' |
| 98 | compileOnly 'org.projectlombok:lombok:1.18.8' |
| 99 | |
| 100 | // providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' |
| 101 | testImplementation 'org.springframework.boot:spring-boot-starter-test' |
| 102 | testImplementation 'io.rest-assured:rest-assured:3.3.0' |
| 103 | testImplementation 'io.rest-assured:spring-mock-mvc:3.3.0' |
| 104 | testImplementation 'org.hamcrest:hamcrest:2.1' |
| 105 | } |
| 106 | |
| 107 | compileKotlin { |
| 108 | kotlinOptions { |
| 109 | freeCompilerArgs = ['-Xjsr305=strict'] |
| 110 | jvmTarget = jdkVersion |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | compileTestKotlin { |
| 115 | kotlinOptions { |
| 116 | freeCompilerArgs = ['-Xjsr305=strict'] |
| 117 | jvmTarget = jdkVersion |
| 118 | } |
| 119 | } |