@@ -26,10 +26,8 @@ subprojects {
2626 apply plugin : ' java-library'
2727 apply plugin : ' kotlin'
2828 apply plugin : ' maven-publish'
29- apply plugin : ' com.jfrog.bintray'
30- apply plugin : ' com.jfrog.artifactory'
3129
32- group = ' io.rsocket.android '
30+ group = ' io.rsocket.kotlin '
3331 version = ' 0.9-SNAPSHOT'
3432
3533 task sourcesJar(type : Jar , dependsOn : classes) {
@@ -42,9 +40,6 @@ subprojects {
4240 from javadoc. destinationDir
4341 }
4442
45- tasks. bintrayUpload. dependsOn tasks. jar, tasks. sourcesJar, tasks. javadocJar
46-
47- // add javadoc/source jar tasks as artifacts
4843 artifacts {
4944 archives sourcesJar, javadocJar, jar
5045 }
@@ -82,81 +77,75 @@ subprojects {
8277 }
8378 }
8479 }
80+ }
8581
86- artifactory {
87- publish {
88- contextUrl = ' https://oss.jfrog.org'
89-
90- repository {
91- repoKey = ' oss-snapshot-local'
92- // The Artifactory repository key to publish to
93- // when using oss.jfrog.org the credentials are from Bintray.
94- // For local build we expect them to be found in
95- // ~/.gradle/gradle.properties, otherwise to be set in the build server
96- // Conditionalize for the users who don't have bintray credentials setup
97- if (project. hasProperty(' bintrayUser' )) {
98- username = project. property(' bintrayUser' )
99- password = project. property(' bintrayKey' )
82+ if (project. hasProperty(' bintrayUser' ) && project. hasProperty(' bintrayKey' )) {
83+
84+ subprojects {
85+ plugins. withId(' com.jfrog.bintray' ) {
86+ bintray {
87+ user = project. property(' bintrayUser' )
88+ key = project. property(' bintrayKey' )
89+
90+ publications = [' maven' ]
91+ publish = true
92+
93+ pkg {
94+ repo = ' RSocket'
95+ name = ' rsocket-kotlin'
96+ licenses = [' Apache-2.0' ]
97+
98+ issueTrackerUrl = ' https://github.com/rsocket/rsocket-kotlin/issues'
99+ websiteUrl = ' https://github.com/rsocket/rsocket-kotlin'
100+ vcsUrl = ' https://github.com/rsocket/rsocket-kotlin.git'
101+ githubRepo = ' rsocket/rsocket-kotlin'
102+ githubReleaseNotesFile = ' README.md'
103+
104+ version {
105+ name = project. version
106+ released = new Date ()
107+ vcsTag = project. version
108+
109+ gpg {
110+ sign = true
111+ }
112+
113+ mavenCentralSync {
114+ user = project. property(' sonatypeUsername' )
115+ password = project. property(' sonatypePassword' )
116+ }
117+ }
100118 }
101119 }
102120
103- publications(' mavenJava' )
104-
105- defaults {
106- // Reference to Gradle publications defined in the build script.
107- // This is how we tell the Artifactory Plugin which artifacts should be
108- // published to Artifactory.
109- publications(' mavenJava' )
110- publishArtifacts = true
111- }
121+ tasks. bintrayUpload. dependsOn tasks. jar, tasks. sourcesJar, tasks. javadocJar
112122 }
113- }
114123
115- artifactoryPublish {
116- dependsOn jar
117- }
124+ plugins. withId(' com.jfrog.artifactory' ) {
125+ artifactory {
126+ publish {
127+ contextUrl = ' https://oss.jfrog.org'
118128
119- bintray {
120- if (project. hasProperty(' bintrayUser' )) {
121- user = project. property(' bintrayUser' )
122- key = project. property(' bintrayKey' )
123- }
124- publications = [' mavenJava' ]
125- dryRun = false
126- publish = true
127- override = false
128- pkg {
129- repo = ' RSocket'
130- name = ' rsocket-android'
131- desc = ' RSocket'
132- websiteUrl = ' https://github.com/rsocket/rsocket-android'
133- issueTrackerUrl = ' https://github.com/rsocket/rsocket-android'
134- vcsUrl = ' https://github.com/rsocket/rsocket-android.git'
135- licenses = [' Apache-2.0' ]
136- githubRepo = ' rsocket/rsocket-android' // Optional Github repository
137- githubReleaseNotesFile = ' README.md' // Optional Github readme file
138- if (project. hasProperty(' sonatypeUsername' ) && project. hasProperty(' sonatypePassword' )) {
139- def sonatypeUsername = project. property(' sonatypeUsername' )
140- def sonatypePassword = project. property(' sonatypePassword' )
141- version {
142- name = " v${ project.version} "
143- vcsTag = " ${ project.version} "
144- mavenCentralSync {
145- sync = false
146- user = sonatypeUsername
147- password = sonatypePassword
129+ repository {
130+ repoKey = ' oss-snapshot-local'
131+ username = project. property(' bintrayUser' )
132+ password = project. property(' bintrayKey' )
133+ }
134+
135+ defaults {
136+ publications(' maven' )
148137 }
149138 }
150139 }
140+
141+ artifactoryPublish {
142+ dependsOn jar
143+ }
151144 }
152145 }
153146}
154147
155- repositories {
156- jcenter()
157- }
158-
159- description = ' RSocket-Android: stream oriented messaging passing with Reactive Stream semantics, for Android'
148+ description = ' RSocket-kotlin: Reactive Streams over network boundary with Kotlin/Rxjava'
160149
161150buildScan {
162151 licenseAgreementUrl = ' https://gradle.com/terms-of-service'
0 commit comments