-
Notifications
You must be signed in to change notification settings - Fork 0
/
publish.gradle
86 lines (79 loc) · 2.44 KB
/
publish.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
apply plugin: 'maven-publish'
def binApiKey = 'it is a secret'
def binUser = "authing"
def versionCode = '3.0.3'
def pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
developers {
developer {
name "HowieWang"
email "[email protected]"
}
developer {
name "su"
email "[email protected]"
}
developer {
name "andyzhaozhao"
email "[email protected]"
}
}
scm {
url "https://github.com/Authing/authing-java-sdk"
}
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.kotlin.getSrcDirs()
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
groupId 'cn.authing'
artifactId 'java-core'
version versionCode
pom.withXml {
def root = asNode()
root.appendNode('description', 'A leading identity authentication service platform')
root.appendNode('name', 'AuthingSDK')
root.appendNode('url', 'https://authing.cn/')
root.children().last() + pomConfig
}
}
}
}
bintray {
user = binUser
key = binApiKey
publications = ['MyPublication']
pkg {
repo = 'AuthingSDK'
name = 'Java'
userOrg = binUser
licenses = ['Apache-2.0']
version {
name = versionCode
mavenCentralSync {
sync = true //[Default: true] Determines whether to sync the version to Maven Central.
user = 'xieyang' //OSS user token: mandatory
password = 'it is a secret' //OSS user password: mandatory
close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
}
}
websiteUrl = 'https://authing.cn/'
desc = 'A leading identity authentication service platform'
}
}