Tang Cheng | 9eb1bea | 2019-07-08 09:15:47 +0800 | [diff] [blame] | 1 | plugins { |
Tang Cheng | a1a30fa | 2019-07-08 16:20:11 +0800 | [diff] [blame] | 2 | id 'java-library' |
Tang Cheng | f0c4bd8 | 2019-07-08 15:56:05 +0800 | [diff] [blame] | 3 | id 'maven-publish' |
Tang Cheng | 3103de7 | 2019-07-12 11:29:02 +0800 | [diff] [blame] | 4 | id 'org.springframework.boot' |
| 5 | id "com.palantir.git-version" |
Tang Cheng | 9eb1bea | 2019-07-08 09:15:47 +0800 | [diff] [blame] | 6 | } |
| 7 | |
| 8 | |
| 9 | apply plugin: 'io.spring.dependency-management' |
| 10 | |
Tang Cheng | 40993e1 | 2019-07-08 16:38:51 +0800 | [diff] [blame] | 11 | group = rootProject.group |
| 12 | |
Tang Cheng | a1a30fa | 2019-07-08 16:20:11 +0800 | [diff] [blame] | 13 | def sdkVersion = gitVersion() |
Tang Cheng | f0c4bd8 | 2019-07-08 15:56:05 +0800 | [diff] [blame] | 14 | |
| 15 | publishing { |
| 16 | publications { |
| 17 | mavenJava(MavenPublication) { |
| 18 | groupId = project.group |
| 19 | artifactId = 'payapi-sdk' |
| 20 | version = sdkVersion |
| 21 | from components.java |
| 22 | } |
| 23 | } |
| 24 | repositories { |
| 25 | maven { |
| 26 | // change URLs to point to your repos, e.g. http://my.org/repo |
| 27 | def releasesRepoUrl = "http://ykt-nx.supwisdom.com/repository/ecard-repo/" |
| 28 | def snapshotsRepoUrl = "http://ykt-nx.supwisdom.com/repository/ecard-repo/snapshot/" |
| 29 | url = version.endsWith('dirty') ? snapshotsRepoUrl : releasesRepoUrl |
| 30 | credentials(PasswordCredentials) { |
| 31 | username = nxUser |
| 32 | password = nxPassword |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | |
Tang Cheng | 3e79685 | 2019-07-08 16:35:42 +0800 | [diff] [blame] | 38 | bootJar { |
| 39 | enabled = false |
| 40 | } |
| 41 | |
Tang Cheng | 9eb1bea | 2019-07-08 09:15:47 +0800 | [diff] [blame] | 42 | dependencies { |
| 43 | implementation 'org.springframework.boot:spring-boot-starter-data-jpa' |
| 44 | implementation 'org.springframework.boot:spring-boot-starter-data-redis' |
| 45 | |
Tang Cheng | 13911f9 | 2019-07-10 09:38:32 +0800 | [diff] [blame] | 46 | implementation project(':payapi-common') |
Tang Cheng | 94cf0bb | 2019-07-08 13:12:50 +0800 | [diff] [blame] | 47 | |
Tang Cheng | 9eb1bea | 2019-07-08 09:15:47 +0800 | [diff] [blame] | 48 | implementation 'org.springframework.cloud:spring-cloud-dependencies:Finchley.SR3' |
| 49 | implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:2.1.2.RELEASE' |
Tang Cheng | f0c4bd8 | 2019-07-08 15:56:05 +0800 | [diff] [blame] | 50 | |
| 51 | implementation 'javax.servlet:javax.servlet-api:4.0.1' |
Tang Cheng | 0c7d327 | 2019-07-08 17:53:32 +0800 | [diff] [blame] | 52 | compileOnly 'org.projectlombok:lombok:1.18.8' |
| 53 | annotationProcessor 'org.projectlombok:lombok:1.18.8' |
Tang Cheng | d2c0a86 | 2019-07-09 16:30:30 +0800 | [diff] [blame] | 54 | compile 'com.github.mwiede:feign-validation:1.0' |
Tang Cheng | f0c4bd8 | 2019-07-08 15:56:05 +0800 | [diff] [blame] | 55 | |
| 56 | testImplementation 'org.springframework:spring-test' |
| 57 | testImplementation 'org.springframework.boot:spring-boot-test' |
| 58 | testImplementation 'junit:junit:4.12' |
Tang Cheng | 0c7d327 | 2019-07-08 17:53:32 +0800 | [diff] [blame] | 59 | testAnnotationProcessor 'org.projectlombok:lombok:1.18.8' |
| 60 | testCompileOnly 'org.projectlombok:lombok:1.18.8' |
| 61 | testImplementation 'org.hamcrest:hamcrest:2.1' |
Tang Cheng | 13911f9 | 2019-07-10 09:38:32 +0800 | [diff] [blame] | 62 | testImplementation project(':payapi-common') |
Tang Cheng | f0c4bd8 | 2019-07-08 15:56:05 +0800 | [diff] [blame] | 63 | |
Tang Cheng | 7ed40f5 | 2019-07-09 19:25:48 +0800 | [diff] [blame] | 64 | } |
| 65 | |
Tang Cheng | 7ed40f5 | 2019-07-09 19:25:48 +0800 | [diff] [blame] | 66 | jar { |
| 67 | enabled = true |
| 68 | baseName = "payapi-sdk" |
| 69 | manifest { |
| 70 | attributes('Payapi-SDK-Version': sdkVersion) |
| 71 | } |
Tang Cheng | 7ed40f5 | 2019-07-09 19:25:48 +0800 | [diff] [blame] | 72 | } |
| 73 | |
binquan.qiuu | 6cf8c4f | 2020-07-08 11:17:48 +0800 | [diff] [blame] | 74 | publish.dependsOn(jar) |
| 75 | |
| 76 | tasks.withType(JavaCompile) { |
| 77 | options.encoding = "UTF-8" |
| 78 | } |