Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 1 | plugins { |
Tang Cheng | e4dd088 | 2019-04-09 13:10:47 +0800 | [diff] [blame] | 2 | id 'org.springframework.boot' |
| 3 | id 'org.jetbrains.kotlin.jvm' |
| 4 | id 'org.jetbrains.kotlin.plugin.jpa' |
| 5 | id 'org.jetbrains.kotlin.plugin.spring' |
Tang Cheng | 4685fb2 | 2019-07-02 10:17:25 +0800 | [diff] [blame] | 6 | id "com.palantir.git-version" version "0.12.0-rc2" |
Tang Cheng | 85125f8 | 2019-07-03 10:19:45 +0800 | [diff] [blame^] | 7 | id 'com.palantir.docker' version '0.22.1' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 8 | } |
| 9 | |
Tang Cheng | 9919441 | 2019-07-02 14:22:34 +0800 | [diff] [blame] | 10 | apply plugin: 'java' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 11 | apply plugin: 'io.spring.dependency-management' |
| 12 | |
Tang Cheng | 4685fb2 | 2019-07-02 10:17:25 +0800 | [diff] [blame] | 13 | payapiVersion = gitVersion() |
| 14 | |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 15 | group = 'com.supwisdom' |
Tang Cheng | 85125f8 | 2019-07-03 10:19:45 +0800 | [diff] [blame^] | 16 | version = '1' |
Tang Cheng | e4dd088 | 2019-04-09 13:10:47 +0800 | [diff] [blame] | 17 | sourceCompatibility = jdkVersion |
Tang Cheng | 9919441 | 2019-07-02 14:22:34 +0800 | [diff] [blame] | 18 | def startClass = 'com.supwisdom.dlpay.PayApiApplicationKt' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 19 | |
Tang Cheng | 85125f8 | 2019-07-03 10:19:45 +0800 | [diff] [blame^] | 20 | println("Build version: $payapiVersion") |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 21 | repositories { |
| 22 | mavenCentral() |
| 23 | } |
| 24 | |
Tang Cheng | 9919441 | 2019-07-02 14:22:34 +0800 | [diff] [blame] | 25 | springBoot { |
| 26 | mainClassName = startClass |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 27 | } |
| 28 | |
Tang Cheng | 9919441 | 2019-07-02 14:22:34 +0800 | [diff] [blame] | 29 | |
| 30 | bootJar { |
| 31 | launchScript() |
| 32 | mainClassName = startClass |
Tang Cheng | d7408d1 | 2019-07-02 13:00:54 +0800 | [diff] [blame] | 33 | } |
| 34 | |
Tang Cheng | 58094b3 | 2019-07-02 15:48:18 +0800 | [diff] [blame] | 35 | jar { |
| 36 | manifest { |
Tang Cheng | 85125f8 | 2019-07-03 10:19:45 +0800 | [diff] [blame^] | 37 | attributes('Payapi-Version': payapiVersion) |
Tang Cheng | 58094b3 | 2019-07-02 15:48:18 +0800 | [diff] [blame] | 38 | } |
| 39 | } |
Tang Cheng | 85125f8 | 2019-07-03 10:19:45 +0800 | [diff] [blame^] | 40 | docker { |
| 41 | name '172.28.201.70:5000/dali/payapi:' + version |
| 42 | println(jar.archivePath) |
| 43 | files jar.archivePath |
| 44 | } |
Tang Cheng | d7408d1 | 2019-07-02 13:00:54 +0800 | [diff] [blame] | 45 | |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 46 | dependencies { |
| 47 | implementation 'org.springframework.boot:spring-boot-starter-data-jpa' |
Tang Cheng | 1475eb2 | 2019-04-16 22:59:02 +0800 | [diff] [blame] | 48 | implementation 'org.springframework.boot:spring-boot-starter-data-redis' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 49 | implementation 'org.springframework.boot:spring-boot-starter-web' |
Tang Cheng | 4939a45 | 2019-04-15 22:30:15 +0800 | [diff] [blame] | 50 | implementation 'org.springframework.boot:spring-boot-starter-security' |
Tang Cheng | 9d14aa2 | 2019-07-01 22:59:03 +0800 | [diff] [blame] | 51 | implementation 'org.springframework.boot:spring-boot-starter-cache' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 52 | implementation 'org.springframework.security:spring-security-oauth2-client' |
| 53 | implementation 'org.springframework.security:spring-security-oauth2-jose' |
qiaowei | c87a0e4 | 2019-06-14 16:17:37 +0800 | [diff] [blame] | 54 | implementation 'org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.1.5.RELEASE' |
Xia Kaixiang | 2d3a1ce | 2019-04-16 17:58:56 +0800 | [diff] [blame] | 55 | implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 56 | implementation 'org.springframework.session:spring-session-data-redis' |
Tang Cheng | 6956679 | 2019-05-28 10:16:40 +0800 | [diff] [blame] | 57 | implementation 'org.springframework.boot:spring-boot-starter-cache' |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 58 | implementation 'org.springframework.social:spring-social-web:1.1.6.RELEASE' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 59 | implementation 'org.jetbrains.kotlin:kotlin-reflect' |
| 60 | implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 61 | |
Tang Cheng | ead9b18 | 2019-06-28 14:03:47 +0800 | [diff] [blame] | 62 | implementation 'org.springframework.cloud:spring-cloud-starter-consul-discovery:2.1.2.RELEASE' |
| 63 | |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 64 | implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5' |
| 65 | |
Tang Cheng | 9919441 | 2019-07-02 14:22:34 +0800 | [diff] [blame] | 66 | runtime("org.springframework.boot:spring-boot-devtools") |
| 67 | |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 68 | implementation 'org.postgresql:postgresql:42.2.5' |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 69 | implementation 'com.fasterxml.jackson.module:jackson-module-kotlin' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 70 | implementation 'com.jcabi:jcabi-manifests:1.1' |
Tang Cheng | 1caa64e | 2019-04-16 11:27:14 +0800 | [diff] [blame] | 71 | implementation 'org.bitbucket.b_c:jose4j:0.6.3' |
Tang Cheng | 6664325 | 2019-04-23 09:14:01 +0800 | [diff] [blame] | 72 | implementation 'io.github.microutils:kotlin-logging:1.6.26' |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 73 | implementation 'org.slf4j:slf4j-parent:1.7.26' |
Tang Cheng | be78725 | 2019-07-02 16:38:12 +0800 | [diff] [blame] | 74 | implementation 'com.github.penggle:kaptcha:2.3.2' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 75 | implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5' |
| 76 | implementation group: 'com.sun.jersey', name: 'jersey-client', version: '1.19' |
Tang Cheng | 0ef385d | 2019-04-14 14:08:44 +0800 | [diff] [blame] | 77 | implementation group: 'javax.servlet', name: 'jstl', version: '1.2' |
| 78 | implementation group: 'taglibs', name: 'standard', version: '1.1.2' |
Xia Kaixiang | 72373d8 | 2019-04-18 13:52:36 +0800 | [diff] [blame] | 79 | implementation group: 'commons-codec', name: 'commons-codec', version: '1.6' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 80 | implementation files('libs/ojdbc6.jar') |
qiaowei | 40a96f2 | 2019-06-26 15:37:57 +0800 | [diff] [blame] | 81 | implementation 'commons-dbcp:commons-dbcp:1.4' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 82 | |
Tang Cheng | 1475eb2 | 2019-04-16 22:59:02 +0800 | [diff] [blame] | 83 | annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" |
Tang Cheng | defd94a | 2019-06-27 16:16:12 +0800 | [diff] [blame] | 84 | annotationProcessor 'org.projectlombok:lombok:1.18.8' |
| 85 | compileOnly 'org.projectlombok:lombok:1.18.8' |
Tang Cheng | 1475eb2 | 2019-04-16 22:59:02 +0800 | [diff] [blame] | 86 | |
Tang Cheng | 9919441 | 2019-07-02 14:22:34 +0800 | [diff] [blame] | 87 | // providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 88 | testImplementation 'org.springframework.boot:spring-boot-starter-test' |
Tang Cheng | 173e3b4 | 2019-04-24 11:55:35 +0800 | [diff] [blame] | 89 | testImplementation 'io.rest-assured:rest-assured:3.3.0' |
| 90 | testImplementation 'io.rest-assured:spring-mock-mvc:3.3.0' |
| 91 | testImplementation 'org.hamcrest:hamcrest:2.1' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 92 | } |
| 93 | |
| 94 | compileKotlin { |
| 95 | kotlinOptions { |
| 96 | freeCompilerArgs = ['-Xjsr305=strict'] |
Tang Cheng | e4dd088 | 2019-04-09 13:10:47 +0800 | [diff] [blame] | 97 | jvmTarget = jdkVersion |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 98 | } |
| 99 | } |
| 100 | |
| 101 | compileTestKotlin { |
| 102 | kotlinOptions { |
| 103 | freeCompilerArgs = ['-Xjsr305=strict'] |
Tang Cheng | e4dd088 | 2019-04-09 13:10:47 +0800 | [diff] [blame] | 104 | jvmTarget = jdkVersion |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 105 | } |
| 106 | } |