Permalink
Browse files

swagger2raml release to Maven Central

  • Loading branch information...
1 parent 7457dc8 commit 681e0e634ff7a7ecd9ae5629cd36e0f1aa053e99 @mmatloka mmatloka committed Oct 27, 2014
Showing with 40 additions and 7 deletions.
  1. +7 −3 README.md
  2. +33 −4 build.gradle
View
@@ -1,4 +1,4 @@
-# swagger2raml [![Build Status](https://travis-ci.org/8x8Cloud/swagger2raml.svg?branch=master)](https://travis-ci.org/8x8Cloud/swagger2raml)
+# swagger2raml [![Build Status](https://travis-ci.org/8x8Cloud/swagger2raml.svg?branch=master)](https://travis-ci.org/8x8Cloud/swagger2raml) [![Get automatic notifications about new "swagger2raml" versions](https://www.bintray.com/docs/images/bintray_badge_color.png)](https://bintray.com/8x8/maven/swagger2raml/view?source=watch)
A utility to generate [RAML](http://raml.org/) documentation from [Swagger](https://helloreverb.com/developers/swagger) JSON.
## Usage
@@ -18,10 +18,14 @@ RamlGenerator.generateFromSwaggerUrl(String url, String outputFileName)
```
method with the parameters as described in the command line usage.
-Grab the JAR from Maven Central or use the bundled one:
+Grab the JAR from Maven (Bintray or Maven Central repository) or use the bundled one:
#### Gradle
```groovy
+repositories {
+ mavenCentral()
+}
+
compile 'com.8x8.cloud:swagger2raml:1.0.0'
```
@@ -35,7 +39,7 @@ compile 'com.8x8.cloud:swagger2raml:1.0.0'
```
#### Bundled JAR
-Add `swagger2raml-1.0.0.jar` from [Releases](https://github.com/8x8Cloud/swagger2raml/releases) to your `CLASSPATH`
+Add `swagger2raml-1.0.0-bundled.jar` from [Releases](https://github.com/8x8Cloud/swagger2raml/releases) to your `CLASSPATH`
### Contributing to this project
View
@@ -5,7 +5,8 @@ apply plugin: 'shadow'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
-group = 'com._8x8.cloud.swagger2raml'
+group = 'com.8x8.cloud'
+archivesBaseName = 'swagger2raml'
version = '1.0.0'
buildscript {
@@ -14,11 +15,11 @@ buildscript {
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:0.8'
- classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:0.5'
+ classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:0.6'
}
}
-if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
+if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey') && project.hasProperty('bintrayPassphrase')) {
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
@@ -44,6 +45,28 @@ if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
artifact javadocJar {
classifier "javadoc"
}
+ pom.withXml {
+ def devs = ['rucek': 'Jacek Kunicki', 'mmatloka': 'Michał Matłoka']
+ def root = asNode()
+ root.appendNode('name', 'swagger2raml')
+ root.appendNode('packaging', 'jar')
+ root.appendNode('url', 'https://github.com/8x8Cloud/swagger2raml')
+ root.appendNode('description', 'A utility to generate RAML documentation from Swagger JSON.')
+
+ def license = root.appendNode('licenses').appendNode('license')
+ license.appendNode('name', 'Apache-2.0')
+ license.appendNode('url', 'https://github.com/8x8Cloud/swagger2raml/blob/master/LICENSE.md')
+ license.appendNode('distribution', 'repo')
+
+ root.appendNode('scm').appendNode('url', 'https://github.com/8x8Cloud/swagger2raml.git')
+
+ def developers = root.appendNode('developers')
+ devs.each {
+ def d = developers.appendNode('developer')
+ d.appendNode('id', it.key)
+ d.appendNode('name', it.value)
+ }
+ }
}
}
}
@@ -55,14 +78,20 @@ if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
publish = false
pkg {
repo = 'maven'
+ userOrg = '8x8'
name = 'swagger2raml'
websiteUrl = 'https://github.com/8x8Cloud/swagger2raml'
issueTrackerUrl = 'https://github.com/8x8Cloud/swagger2raml/issues'
vcsUrl = 'https://github.com/8x8Cloud/swagger2raml.git'
+ desc = 'A utility to generate RAML documentation from Swagger JSON.'
licenses = ['Apache-2.0']
licenses = ['groovy', 'swagger', 'raml']
version {
vcsTag = project.version
+ gpg {
+ sign = true
+ passphrase = bintrayPassphrase
+ }
}
}
}
@@ -88,7 +117,7 @@ test {
}
shadow {
- outputFile new File("dist/swagger2raml-${project.version}.jar")
+ outputFile new File("dist/swagger2raml-${project.version}-bundled.jar")
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'

0 comments on commit 681e0e6

Please sign in to comment.