Xia Kaixiang | 0e37c14 | 2019-07-11 18:14:34 +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' |
Tang Cheng | 2273131 | 2019-07-12 11:19:30 +0800 | [diff] [blame] | 4 | id "com.palantir.git-version" |
| 5 | id 'com.palantir.docker' |
Xia Kaixiang | 0e37c14 | 2019-07-11 18:14:34 +0800 | [diff] [blame] | 6 | } |
| 7 | |
| 8 | apply plugin: 'java' |
| 9 | apply plugin: 'io.spring.dependency-management' |
| 10 | |
Tang Cheng | 2273131 | 2019-07-12 11:19:30 +0800 | [diff] [blame] | 11 | def ynrccVersion = gitVersion() |
Xia Kaixiang | 0e37c14 | 2019-07-11 18:14:34 +0800 | [diff] [blame] | 12 | |
| 13 | group = rootProject.group |
| 14 | version = '1' |
| 15 | sourceCompatibility = jdkVersion |
Tang Cheng | 8beabcd | 2019-07-12 11:48:01 +0800 | [diff] [blame^] | 16 | def ynrccStartClass = 'com.supwisdom.agent.YnrccAgentApplication' |
Xia Kaixiang | 0e37c14 | 2019-07-11 18:14:34 +0800 | [diff] [blame] | 17 | |
Tang Cheng | 2273131 | 2019-07-12 11:19:30 +0800 | [diff] [blame] | 18 | println("Build version: $ynrccVersion") |
Xia Kaixiang | 0e37c14 | 2019-07-11 18:14:34 +0800 | [diff] [blame] | 19 | |
| 20 | bootJar { |
Tang Cheng | 8beabcd | 2019-07-12 11:48:01 +0800 | [diff] [blame^] | 21 | mainClassName = ynrccStartClass |
Xia Kaixiang | 0e37c14 | 2019-07-11 18:14:34 +0800 | [diff] [blame] | 22 | manifest { |
Tang Cheng | 2273131 | 2019-07-12 11:19:30 +0800 | [diff] [blame] | 23 | attributes('YnrccAgent-Version': ynrccVersion) |
Xia Kaixiang | 0e37c14 | 2019-07-11 18:14:34 +0800 | [diff] [blame] | 24 | } |
| 25 | } |
| 26 | |
| 27 | jar { |
| 28 | baseName = 'YnrccAgent' |
| 29 | } |
| 30 | |
| 31 | docker { |
| 32 | name 'harbor.supwisdom.com/dali/ynrcc:' + version |
| 33 | println(jar.archivePath) |
| 34 | files jar.archivePath |
| 35 | } |
| 36 | |
| 37 | docker.dependsOn(jar) |
| 38 | |
| 39 | dependencies { |
| 40 | |
| 41 | implementation 'org.springframework.boot:spring-boot-starter-web' |
| 42 | implementation 'org.springframework.boot:spring-boot-autoconfigure' |
| 43 | implementation 'commons-codec:commons-codec:1.12' |
| 44 | implementation 'com.jcabi:jcabi-manifests:1.1' |
| 45 | implementation 'org.slf4j:slf4j-parent:1.7.26' |
| 46 | implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5' |
| 47 | implementation group: 'com.sun.jersey', name: 'jersey-client', version: '1.19' |
| 48 | implementation group: 'javax.servlet', name: 'jstl', version: '1.2' |
| 49 | implementation group: 'taglibs', name: 'standard', version: '1.1.2' |
| 50 | implementation group: 'commons-codec', name: 'commons-codec', version: '1.6' |
| 51 | implementation 'org.dom4j:dom4j:2.1.1' |
| 52 | |
| 53 | testImplementation 'org.springframework.boot:spring-boot-starter-test' |
| 54 | testImplementation 'io.rest-assured:rest-assured:3.3.0' |
| 55 | testImplementation 'io.rest-assured:spring-mock-mvc:3.3.0' |
| 56 | testImplementation 'org.hamcrest:hamcrest:2.1' |
| 57 | } |
| 58 | |