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 | 01be68b | 2019-07-03 11:07:32 +0800 | [diff] [blame] | 6 | id 'com.palantir.docker' version '0.22.1' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 7 | } |
| 8 | |
| 9 | apply plugin: 'io.spring.dependency-management' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 10 | group = 'com.supwisdom' |
sijun.li | 408d890 | 2019-06-10 16:00:24 +0800 | [diff] [blame] | 11 | version = waterManagerVersion |
Tang Cheng | e4dd088 | 2019-04-09 13:10:47 +0800 | [diff] [blame] | 12 | sourceCompatibility = jdkVersion |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 13 | |
Tang Cheng | c90c37f | 2019-07-08 11:12:18 +0800 | [diff] [blame] | 14 | waterManagerVersion = gitVersion() |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 15 | repositories { |
| 16 | mavenCentral() |
| 17 | } |
| 18 | |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 19 | def startClass = 'com.supwisdom.dlpay.WaterManagerApplicationKt' |
| 20 | |
Tang Cheng | c90c37f | 2019-07-08 11:12:18 +0800 | [diff] [blame] | 21 | println("Build version: $waterManagerVersion") |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 22 | repositories { |
| 23 | mavenCentral() |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 24 | } |
| 25 | |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 26 | bootJar { |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 27 | mainClassName = startClass |
Tang Cheng | a194969 | 2019-07-05 10:25:36 +0800 | [diff] [blame] | 28 | manifest { |
Tang Cheng | c90c37f | 2019-07-08 11:12:18 +0800 | [diff] [blame] | 29 | attributes('Water-Version': waterManagerVersion) |
Tang Cheng | a194969 | 2019-07-05 10:25:36 +0800 | [diff] [blame] | 30 | } |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | jar { |
Tang Cheng | a194969 | 2019-07-05 10:25:36 +0800 | [diff] [blame] | 34 | baseName = "watermanager" |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 35 | } |
Tang Cheng | 01be68b | 2019-07-03 11:07:32 +0800 | [diff] [blame] | 36 | |
| 37 | docker { |
Tang Cheng | 706b121 | 2019-07-06 16:09:42 +0800 | [diff] [blame] | 38 | name 'harbor.supwisdom.com/dali/water:' + version |
Tang Cheng | 01be68b | 2019-07-03 11:07:32 +0800 | [diff] [blame] | 39 | println(jar.archivePath) |
| 40 | files jar.archivePath |
| 41 | } |
| 42 | |
Tang Cheng | a194969 | 2019-07-05 10:25:36 +0800 | [diff] [blame] | 43 | docker.dependsOn(jar) |
| 44 | |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 45 | dependencies { |
sijun.li | 8ac8a0b | 2019-07-02 17:08:38 +0800 | [diff] [blame] | 46 | compile( |
| 47 | 'net.sf.json-lib:json-lib:2.4:jdk15' |
| 48 | ) |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 49 | implementation 'org.springframework.boot:spring-boot-starter-data-jpa' |
Tang Cheng | 1475eb2 | 2019-04-16 22:59:02 +0800 | [diff] [blame] | 50 | implementation 'org.springframework.boot:spring-boot-starter-data-redis' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 51 | implementation 'org.springframework.boot:spring-boot-starter-web' |
Tang Cheng | 4939a45 | 2019-04-15 22:30:15 +0800 | [diff] [blame] | 52 | implementation 'org.springframework.boot:spring-boot-starter-security' |
sijun.li | 472e332 | 2019-07-03 15:18:09 +0800 | [diff] [blame] | 53 | // implementation 'org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.0.1.RELEASE' |
| 54 | implementation 'org.springframework.boot:spring-boot-autoconfigure' |
Tang Cheng | cb61aed | 2019-05-24 20:34:07 +0800 | [diff] [blame] | 55 | // implementation 'org.springframework.security.oauth:spring-security-oauth2' |
Xia Kaixiang | 2d3a1ce | 2019-04-16 17:58:56 +0800 | [diff] [blame] | 56 | implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 57 | implementation 'org.springframework.session:spring-session-data-redis' |
Tang Cheng | 6956679 | 2019-05-28 10:16:40 +0800 | [diff] [blame] | 58 | implementation 'org.springframework.boot:spring-boot-starter-cache' |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 59 | implementation 'org.springframework.social:spring-social-web:1.1.6.RELEASE' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 60 | implementation 'org.jetbrains.kotlin:kotlin-reflect' |
| 61 | implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 62 | |
Tang Cheng | 5b4115e | 2019-06-28 22:33:52 +0800 | [diff] [blame] | 63 | |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 64 | implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 65 | implementation 'org.postgresql:postgresql:42.2.5' |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 66 | implementation 'com.fasterxml.jackson.module:jackson-module-kotlin' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 67 | implementation 'com.jcabi:jcabi-manifests:1.1' |
Tang Cheng | 1caa64e | 2019-04-16 11:27:14 +0800 | [diff] [blame] | 68 | implementation 'org.bitbucket.b_c:jose4j:0.6.3' |
Tang Cheng | 6664325 | 2019-04-23 09:14:01 +0800 | [diff] [blame] | 69 | implementation 'io.github.microutils:kotlin-logging:1.6.26' |
Tang Cheng | ec8a86b | 2019-05-13 21:17:08 +0800 | [diff] [blame] | 70 | implementation 'org.slf4j:slf4j-parent:1.7.26' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 71 | implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5' |
| 72 | implementation group: 'com.sun.jersey', name: 'jersey-client', version: '1.19' |
Tang Cheng | 0ef385d | 2019-04-14 14:08:44 +0800 | [diff] [blame] | 73 | implementation group: 'javax.servlet', name: 'jstl', version: '1.2' |
| 74 | implementation group: 'taglibs', name: 'standard', version: '1.1.2' |
Xia Kaixiang | 72373d8 | 2019-04-18 13:52:36 +0800 | [diff] [blame] | 75 | implementation group: 'commons-codec', name: 'commons-codec', version: '1.6' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 76 | implementation files('libs/ojdbc6.jar') |
qiaowei | 1026aa1 | 2019-04-09 16:32:03 +0800 | [diff] [blame] | 77 | |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 78 | |
Tang Cheng | 1475eb2 | 2019-04-16 22:59:02 +0800 | [diff] [blame] | 79 | annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" |
| 80 | |
sijun.li | 675a8f8 | 2019-07-03 10:30:35 +0800 | [diff] [blame] | 81 | // providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' |
Tang Cheng | 67cf630 | 2019-04-16 11:16:12 +0800 | [diff] [blame] | 82 | testImplementation 'org.springframework.boot:spring-boot-starter-test' |
Tang Cheng | 173e3b4 | 2019-04-24 11:55:35 +0800 | [diff] [blame] | 83 | testImplementation 'io.rest-assured:rest-assured:3.3.0' |
| 84 | testImplementation 'io.rest-assured:spring-mock-mvc:3.3.0' |
| 85 | testImplementation 'org.hamcrest:hamcrest:2.1' |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 86 | } |
| 87 | |
| 88 | compileKotlin { |
| 89 | kotlinOptions { |
| 90 | freeCompilerArgs = ['-Xjsr305=strict'] |
Tang Cheng | e4dd088 | 2019-04-09 13:10:47 +0800 | [diff] [blame] | 91 | jvmTarget = jdkVersion |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 92 | } |
| 93 | } |
| 94 | |
| 95 | compileTestKotlin { |
| 96 | kotlinOptions { |
| 97 | freeCompilerArgs = ['-Xjsr305=strict'] |
Tang Cheng | e4dd088 | 2019-04-09 13:10:47 +0800 | [diff] [blame] | 98 | jvmTarget = jdkVersion |
Xia Kaixiang | 95e8848 | 2019-04-08 17:56:29 +0800 | [diff] [blame] | 99 | } |
| 100 | } |