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