forked from wechatpay-apiv3/wechatpay-apache-httpclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
100 lines (87 loc) · 2.93 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group 'com.github.wechatpay-apiv3'
version '0.4.7'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
}
ext {
publishedArtifactId = project.name
httpclient_version = "4.5.13"
slf4j_version = "1.7.30"
junit_version = "4.12"
jackson_version = "2.12.5"
}
jar {
manifest {
attributes('Automatic-Module-Name': 'com.wechat.pay.contrib.apache.httpclient')
attributes('Implementation-Version': project.version)
}
}
dependencies {
api "org.apache.httpcomponents:httpclient:$httpclient_version"
implementation "org.apache.httpcomponents:httpmime:$httpclient_version"
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
implementation "org.slf4j:slf4j-api:$slf4j_version"
testImplementation "org.slf4j:slf4j-simple:$slf4j_version"
testImplementation "junit:junit:$junit_version"
}
test {
ignoreFailures = true
}
publishing {
java {
withJavadocJar()
withSourcesJar()
}
publications {
maven(MavenPublication) {
artifactId = project.ext.publishedArtifactId
from components.java
pom {
name = project.name
description = 'An Apache HttpClient decorator for WeChat Pay\'s API'
url = 'https://github.com/wechatpay-apiv3/wechatpay-apache-httpclient'
licenses {
license {
name = 'The Apache Software License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'WeChat Pay APIv3 Team'
}
}
scm {
connection = 'scm:git:https://github.com/wechatpay-apiv3/wechatpay-apache-httpclient.git'
developerConnection = 'scm:git:ssh://github.com/wechatpay-apiv3/wechatpay-apache-httpclient.git'
url = 'https://github.com/wechatpay-apiv3/wechatpay-apache-httpclient'
}
}
}
}
repositories {
maven {
name = "mavencentral"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username System.getenv('SONATYPE_NEXUS_USERNAME')
password System.getenv('SONATYPE_NEXUS_PASSWORD')
}
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.maven
}