@@ -2,30 +2,72 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.ManifestResourceT
22
33apply plugin : ' groovy'
44apply plugin : ' shadow'
5- apply plugin : ' maven'
5+ apply plugin : ' maven-publish'
6+ apply plugin : ' com.jfrog.bintray'
67
78group = ' com._8x8.cloud.swagger2raml'
8- version = ' 1.0-SNAPSHOT '
9+ version = ' 1.0.0 '
910
1011buildscript {
1112 repositories {
1213 jcenter()
1314 }
1415 dependencies {
1516 classpath ' com.github.jengelman.gradle.plugins:shadow:0.8'
17+ classpath ' com.jfrog.bintray.gradle:gradle-bintray-plugin:0.5'
1618 }
1719}
1820
19- if (project. hasProperty(' smlNexusUser' ) && project. hasProperty(' smlNexusPassword' )) {
20- uploadArchives {
21- repositories {
22- mavenDeployer {
23- repository(url : ' https://nexus.softwaremill.com/content/repositories/snapshots' ) {
24- authentication(userName : smlNexusUser, password : smlNexusPassword)
21+ if (project. hasProperty(' bintrayUser' ) && project. hasProperty(' bintrayKey' )) {
22+ task sourcesJar(type : Jar , dependsOn : classes) {
23+ classifier = ' sources'
24+ from sourceSets. main. allSource
25+ }
26+
27+ task javadocJar(type : Jar , dependsOn : javadoc) {
28+ classifier = ' javadoc'
29+ from javadoc. destinationDir
30+ }
31+
32+ artifacts {
33+ archives sourcesJar, javadocJar
34+ }
35+
36+ publishing {
37+ publications {
38+ mavenJava(MavenPublication ) {
39+ from components. java
40+ artifact sourcesJar {
41+ classifier " sources"
42+ }
43+
44+ artifact javadocJar {
45+ classifier " javadoc"
2546 }
2647 }
2748 }
2849 }
50+
51+ bintray {
52+ user = bintrayUser
53+ key = bintrayKey
54+ publications = [' mavenJava' ]
55+ publish = false
56+ pkg {
57+ repo = ' maven'
58+ name = ' swagger2raml'
59+ websiteUrl = ' https://github.com/8x8Cloud/swagger2raml'
60+ issueTrackerUrl = ' https://github.com/8x8Cloud/swagger2raml/issues'
61+ vcsUrl = ' https://github.com/8x8Cloud/swagger2raml.git'
62+ licenses = [' Apache-2.0' ]
63+ licenses = [' groovy' , ' swagger' , ' raml' ]
64+ version {
65+ vcsTag = project. version
66+ }
67+ }
68+ }
69+
70+ bintrayUpload. dependsOn shadowJar
2971}
3072
3173repositories {
4688}
4789
4890shadow {
49- outputFile new File (' dist/swagger2raml. jar' )
91+ outputFile new File (" dist/swagger2raml- ${ project.version } . jar" )
5092
5193 exclude ' META-INF/*.SF'
5294 exclude ' META-INF/*.DSA'
@@ -57,6 +99,8 @@ shadow {
5799 }
58100}
59101
102+ shadowJar. dependsOn build
103+
60104task wrapper (type : Wrapper ) {
61105 gradleVersion = ' 2.1'
62106}
0 commit comments