1
- import com.jfrog.bintray.gradle.BintrayExtension.PackageConfig
2
- import com.jfrog.bintray.gradle.BintrayExtension.VersionConfig
3
- import java.util.Date
4
-
5
1
plugins {
6
2
`maven- publish`
7
- id( " com.jfrog.bintray " ) version " 1.8.5 "
3
+ signing
8
4
}
9
5
10
- group = " org.rationalityfrontline.grpc"
11
- version = " 1.34.0"
12
-
6
+ group = " org.rationalityfrontline.workaround"
7
+ version = " 1.35.0"
13
8
val NAME = project.name
14
9
val DESC = " Merged grpc-api and grpc-context into a single jar"
15
10
val GITHUB_REPO = " RationalityFrontline/grpc-api"
16
11
17
12
publishing {
18
13
publications {
19
- create<MavenPublication >(" mavenPublish " ) {
14
+ create<MavenPublication >(" maven " ) {
20
15
artifact(file(" libs/grpc-api-$version -sources.jar" )) {
21
16
classifier = " sources"
22
17
}
18
+ artifact(file(" libs/grpc-api-$version -javadoc.jar" )) {
19
+ classifier = " javadoc"
20
+ }
23
21
artifact(file(" libs/grpc-api-$version .jar" ))
24
22
pom {
25
23
name.set(NAME )
26
- description.set(" $NAME $version - $DESC " )
24
+ description.set(DESC )
25
+ packaging = " jar"
27
26
url.set(" https://github.com/$GITHUB_REPO " )
28
27
licenses {
29
28
license {
@@ -35,44 +34,36 @@ publishing {
35
34
developer {
36
35
name.set(" RationalityFrontline" )
37
36
37
+ organization.set(" RationalityFrontline" )
38
+ organizationUrl.set(" https://github.com/RationalityFrontline" )
38
39
}
39
40
}
40
41
scm {
41
- url.set(" https://github.com/$GITHUB_REPO " )
42
+ connection.set(" scm:git:git://github.com/$GITHUB_REPO .git" )
43
+ developerConnection.set(" scm:git:ssh://github.com:$GITHUB_REPO .git" )
44
+ url.set(" https://github.com/$GITHUB_REPO /tree/master" )
42
45
}
43
46
}
44
47
}
45
48
}
46
- }
47
-
48
- bintray {
49
- fun env (propertyName : String ): String {
50
- return if (project.hasProperty(propertyName)) {
51
- project.property(propertyName) as String
52
- } else " Unknown"
49
+ repositories {
50
+ fun env (propertyName : String ): String {
51
+ return if (project.hasProperty(propertyName)) {
52
+ project.property(propertyName) as String
53
+ } else " Unknown"
54
+ }
55
+ maven {
56
+ val releasesRepoUrl = uri(" https://oss.sonatype.org/service/local/staging/deploy/maven2/" )
57
+ val snapshotsRepoUrl = uri(" https://oss.sonatype.org/content/repositories/snapshots/" )
58
+ url = if (version.toString().endsWith(" SNAPSHOT" )) snapshotsRepoUrl else releasesRepoUrl
59
+ credentials {
60
+ username = env(" ossrhUsername" )
61
+ password = env(" ossrhPassword" )
62
+ }
63
+ }
53
64
}
65
+ }
54
66
55
- user = env(" BINTRAY_USER" )
56
- key = env(" BINTRAY_KEY" )
57
- publish = true
58
- override = true
59
- setPublications(" mavenPublish" )
60
- pkg(closureOf<PackageConfig >{
61
- repo = " grpc"
62
- name = NAME
63
- desc = DESC
64
- setLabels(" grpc" , " grpc-api" , " grpc-context" , " jpms" )
65
- setLicenses(" Apache-2.0" )
66
- publicDownloadNumbers = true
67
- githubRepo = GITHUB_REPO
68
- vcsUrl = " https://github.com/$githubRepo "
69
- websiteUrl = vcsUrl
70
- issueTrackerUrl = " $vcsUrl /issues"
71
- version(closureOf<VersionConfig > {
72
- name = " ${project.version} "
73
- desc = DESC
74
- released = " ${Date ()} "
75
- vcsTag = name
76
- })
77
- })
67
+ signing {
68
+ sign(publishing.publications[" maven" ])
78
69
}
0 commit comments