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' |
sijun.li | 24cddfc | 2019-07-10 11:34:28 +0800 | [diff] [blame] | 6 | id "com.palantir.git-version" version "0.12.0-rc2" |
Tang Cheng | 01be68b | 2019-07-03 11:07:32 +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 | |
| 10 | apply plugin: 'io.spring.dependency-management' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 11 | group = 'com.supwisdom' |
sijun.li | 408d890 | 2019-06-10 16:00:24 +0800 | [diff] [blame] | 12 | version = waterManagerVersion |
Tang Cheng | e4dd088 | 2019-04-09 13:10:47 +0800 | [diff] [blame] | 13 | sourceCompatibility = jdkVersion |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 14 | |
Tang Cheng | c90c37f | 2019-07-08 11:12:18 +0800 | [diff] [blame] | 15 | waterManagerVersion = gitVersion() |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 16 | repositories { |
| 17 | mavenCentral() |
sijun.li | fe096da | 2020-06-10 15:28:29 +0800 | [diff] [blame] | 18 | maven { |
sijun.li | 24cddfc | 2019-07-10 11:34:28 +0800 | [diff] [blame] | 19 | url "http://ykt-nx.supwisdom.com/repository/ecard-repo/" |
| 20 | credentials { |
| 21 | username 'ecard' |
| 22 | password 'Ecard4SUP' |
| 23 | } |
| 24 | } |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 25 | } |
| 26 | |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 27 | def startClass = 'com.supwisdom.dlpay.WaterManagerApplicationKt' |
| 28 | |
Tang Cheng | c90c37f | 2019-07-08 11:12:18 +0800 | [diff] [blame] | 29 | println("Build version: $waterManagerVersion") |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 30 | repositories { |
| 31 | mavenCentral() |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 32 | } |
| 33 | |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 34 | bootJar { |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 35 | mainClassName = startClass |
Tang Cheng | a194969 | 2019-07-05 10:25:36 +0800 | [diff] [blame] | 36 | manifest { |
Tang Cheng | c90c37f | 2019-07-08 11:12:18 +0800 | [diff] [blame] | 37 | attributes('Water-Version': waterManagerVersion) |
Tang Cheng | a194969 | 2019-07-05 10:25:36 +0800 | [diff] [blame] | 38 | } |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | jar { |
Tang Cheng | a194969 | 2019-07-05 10:25:36 +0800 | [diff] [blame] | 42 | baseName = "watermanager" |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 43 | } |
Tang Cheng | 01be68b | 2019-07-03 11:07:32 +0800 | [diff] [blame] | 44 | |
| 45 | docker { |
Tang Cheng | 706b121 | 2019-07-06 16:09:42 +0800 | [diff] [blame] | 46 | name 'harbor.supwisdom.com/dali/water:' + version |
Tang Cheng | 01be68b | 2019-07-03 11:07:32 +0800 | [diff] [blame] | 47 | println(jar.archivePath) |
| 48 | files jar.archivePath |
| 49 | } |
| 50 | |
Tang Cheng | a194969 | 2019-07-05 10:25:36 +0800 | [diff] [blame] | 51 | docker.dependsOn(jar) |
| 52 | |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 53 | dependencies { |
sijun.li | 8ac8a0b | 2019-07-02 17:08:38 +0800 | [diff] [blame] | 54 | compile( |
| 55 | 'net.sf.json-lib:json-lib:2.4:jdk15' |
| 56 | ) |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 57 | implementation 'org.springframework.boot:spring-boot-starter-data-jpa' |
Tang Cheng | 1475eb2 | 2019-04-16 22:59:02 +0800 | [diff] [blame] | 58 | implementation 'org.springframework.boot:spring-boot-starter-data-redis' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 59 | implementation 'org.springframework.boot:spring-boot-starter-web' |
Tang Cheng | 4939a45 | 2019-04-15 22:30:15 +0800 | [diff] [blame] | 60 | implementation 'org.springframework.boot:spring-boot-starter-security' |
sijun.li | 472e332 | 2019-07-03 15:18:09 +0800 | [diff] [blame] | 61 | // implementation 'org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.0.1.RELEASE' |
| 62 | implementation 'org.springframework.boot:spring-boot-autoconfigure' |
sijun.li | 24cddfc | 2019-07-10 11:34:28 +0800 | [diff] [blame] | 63 | implementation 'org.springframework.security:spring-security-oauth2-jose' |
| 64 | implementation 'org.springframework.security:spring-security-oauth2-client' |
| 65 | implementation 'org.springframework.security:spring-security-oauth2-jose' |
| 66 | implementation 'org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.1.5.RELEASE' |
Tang Cheng | cb61aed | 2019-05-24 20:34:07 +0800 | [diff] [blame] | 67 | // implementation 'org.springframework.security.oauth:spring-security-oauth2' |
Xia Kaixiang | 2d3a1ce | 2019-04-16 17:58:56 +0800 | [diff] [blame] | 68 | implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 69 | implementation 'org.springframework.session:spring-session-data-redis' |
Tang Cheng | 6956679 | 2019-05-28 10:16:40 +0800 | [diff] [blame] | 70 | implementation 'org.springframework.boot:spring-boot-starter-cache' |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 71 | implementation 'org.springframework.social:spring-social-web:1.1.6.RELEASE' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 72 | implementation 'org.jetbrains.kotlin:kotlin-reflect' |
| 73 | implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 74 | |
sijun.li | 24cddfc | 2019-07-10 11:34:28 +0800 | [diff] [blame] | 75 | implementation 'com.github.penggle:kaptcha:2.3.2' |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 76 | implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5' |
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 | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 83 | implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5' |
| 84 | implementation group: 'com.sun.jersey', name: 'jersey-client', version: '1.19' |
Tang Cheng | 0ef385d | 2019-04-14 14:08:44 +0800 | [diff] [blame] | 85 | implementation group: 'javax.servlet', name: 'jstl', version: '1.2' |
| 86 | implementation group: 'taglibs', name: 'standard', version: '1.1.2' |
sijun.li | f103e0a | 2019-08-21 15:17:27 +0800 | [diff] [blame] | 87 | implementation group: 'commons-codec', name: 'commons-codec', version: '1.13' |
| 88 | implementation 'net.javacrumbs.shedlock:shedlock-spring:2.5.0' |
| 89 | implementation 'net.javacrumbs.shedlock:shedlock-provider-redis-spring:2.5.0' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 90 | implementation files('libs/ojdbc6.jar') |
qiaowei | 1026aa1 | 2019-04-09 16:32:03 +0800 | [diff] [blame] | 91 | |
sijun.li | 24cddfc | 2019-07-10 11:34:28 +0800 | [diff] [blame] | 92 | annotationProcessor 'org.projectlombok:lombok:1.18.8' |
| 93 | compileOnly 'org.projectlombok:lombok:1.18.8' |
Tang Cheng | 1475eb2 | 2019-04-16 22:59:02 +0800 | [diff] [blame] | 94 | annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" |
sijun.li | 24cddfc | 2019-07-10 11:34:28 +0800 | [diff] [blame] | 95 | |
sijun.li | 3821cc9 | 2020-10-29 10:11:12 +0800 | [diff] [blame^] | 96 | compile 'com.supwisdom:payapi-sdk:1.0.28-1-g7415df3' |
sijun.li | 24cddfc | 2019-07-10 11:34:28 +0800 | [diff] [blame] | 97 | |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 98 | // providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 99 | testImplementation 'org.springframework.boot:spring-boot-starter-test' |
Tang Cheng | 173e3b4 | 2019-04-24 11:55:35 +0800 | [diff] [blame] | 100 | testImplementation 'io.rest-assured:rest-assured:3.3.0' |
| 101 | testImplementation 'io.rest-assured:spring-mock-mvc:3.3.0' |
sijun.li | f103e0a | 2019-08-21 15:17:27 +0800 | [diff] [blame] | 102 | implementation 'org.hamcrest:hamcrest:2.1' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 103 | } |
| 104 | |
| 105 | compileKotlin { |
| 106 | kotlinOptions { |
| 107 | freeCompilerArgs = ['-Xjsr305=strict'] |
Tang Cheng | e4dd088 | 2019-04-09 13:10:47 +0800 | [diff] [blame] | 108 | jvmTarget = jdkVersion |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 109 | } |
| 110 | } |
| 111 | |
| 112 | compileTestKotlin { |
| 113 | kotlinOptions { |
| 114 | freeCompilerArgs = ['-Xjsr305=strict'] |
Tang Cheng | e4dd088 | 2019-04-09 13:10:47 +0800 | [diff] [blame] | 115 | jvmTarget = jdkVersion |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 116 | } |
| 117 | } |