blob: 2c27e2841f459fb7d2aaf0ec6976034f99be2388 [file] [log] [blame]
Tang Chengdc148412019-07-08 09:15:47 +08001plugins {
Tang Chengbc96b232019-07-08 16:20:11 +08002 id 'java-library'
Tang Cheng5b48e7b2019-07-08 15:56:05 +08003 id 'maven-publish'
Tang Chengef730842019-07-08 16:35:42 +08004 id 'org.springframework.boot' version '2.1.6.RELEASE'
5 id "com.palantir.git-version" version "0.12.0-rc2"
Tang Chengdc148412019-07-08 09:15:47 +08006}
7
8
9apply plugin: 'io.spring.dependency-management'
10
Tang Chengc86a0792019-07-08 16:38:51 +080011group = rootProject.group
12
Tang Chengbc96b232019-07-08 16:20:11 +080013def sdkVersion = gitVersion()
Tang Cheng5b48e7b2019-07-08 15:56:05 +080014
15publishing {
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 Chengef730842019-07-08 16:35:42 +080038bootJar {
39 enabled = false
40}
41
Tang Chengdc148412019-07-08 09:15:47 +080042dependencies {
43 implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
44 implementation 'org.springframework.boot:spring-boot-starter-data-redis'
45
Tang Cheng800e49b2019-07-08 13:12:50 +080046 implementation project(':common')
47
Tang Chengdc148412019-07-08 09:15:47 +080048 implementation 'org.springframework.cloud:spring-cloud-dependencies:Finchley.SR3'
49 implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:2.1.2.RELEASE'
Tang Cheng5b48e7b2019-07-08 15:56:05 +080050
51 implementation 'javax.servlet:javax.servlet-api:4.0.1'
Tang Cheng342e5522019-07-08 17:53:32 +080052 compileOnly 'org.projectlombok:lombok:1.18.8'
53 annotationProcessor 'org.projectlombok:lombok:1.18.8'
Tang Cheng9cc43312019-07-09 16:30:30 +080054 compile 'com.github.mwiede:feign-validation:1.0'
Tang Cheng5b48e7b2019-07-08 15:56:05 +080055
56 testImplementation 'org.springframework:spring-test'
57 testImplementation 'org.springframework.boot:spring-boot-test'
58 testImplementation 'junit:junit:4.12'
Tang Cheng342e5522019-07-08 17:53:32 +080059 testAnnotationProcessor 'org.projectlombok:lombok:1.18.8'
60 testCompileOnly 'org.projectlombok:lombok:1.18.8'
61 testImplementation 'org.hamcrest:hamcrest:2.1'
Tang Cheng5b48e7b2019-07-08 15:56:05 +080062 testImplementation project(':common')
63
Tang Cheng655db922019-07-09 19:25:48 +080064}
65
66
67jar {
68 enabled = true
69 baseName = "payapi-sdk"
70 manifest {
71 attributes('Payapi-SDK-Version': sdkVersion)
72 }
73 from project(':common').configurations.archives.allArtifacts.files.collect { zipTree(it) }
74}
75
76
77task fullJar(type: Jar, dependsOn: ':common:jar') {
78}
79
80jar.dependsOn(fullJar)
81publish.dependsOn(fullJar)