Permalink
Browse files

Bintray publish configuration

  • Loading branch information...
1 parent b2da193 commit 47e6a11fa8259ce70c021743563e58cf7ff146b7 @mmatloka mmatloka committed Oct 21, 2014
Showing with 65 additions and 22 deletions.
  1. +1 −0 .gitignore
  2. +11 −11 README.md
  3. +53 −9 build.gradle
  4. BIN dist/swagger2raml.jar
  5. +0 −2 swagger2raml.sh
View
@@ -32,3 +32,4 @@ out/*
argfile*
src/test/resources/actual-output.raml
src/test/resources/actual-output-2.raml
+dist
View
@@ -1,12 +1,12 @@
-# swagger2raml [![Build Status](https://travis-ci.org/8x8Cloud/swagger2raml.svg?branch=master)](https://travis-ci.org/8x8Cloud/swagger2raml)
-A utility to generate [RAML](http://raml.org/) documentation from [Swagger](https://helloreverb.com/developers/swagger) JSON.
+# swagger2raml [![Build Status](https://travis-ci.org/8x8Cloud/swagger2raml.svg?branch=master)](https://travis-ci.org/8x8Cloud/swagger2raml)
+A utility to generate [RAML](http://raml.org/) documentation from [Swagger](https://helloreverb.com/developers/swagger) JSON.
## Usage
swagger2raml can be used either from command line (requires Java to be on the `PATH`) or as a Java library.
### Command line
```
-./swagger2raml [-o outputFileName] <swaggerApiUrl>
+java -jar swagger2raml-1.0.0.jar [-o outputFileName] <swaggerApiUrl>
```
where:
- `outputFileName` is an optional parameter to specify the RAML file name (default is `api.raml`),
@@ -23,32 +23,32 @@ Grab the JAR from Maven or use the bundled one:
#### Gradle
```groovy
repositories {
- maven { url 'https://nexus.softwaremill.com/content/repositories/snapshots' }
+ jcenter()
}
-compile 'com._8x8.cloud.swagger2raml:swagger2raml:1.0-SNAPSHOT'
+compile 'com._8x8.cloud.swagger2raml:swagger2raml:1.0.0'
```
#### Maven
```xml
<distributionManagement>
- <snapshotRepository>
- <id>snapshots</id>
- <url>https://nexus.softwaremill.com/content/repositories/snapshots</url>
- </snapshotRepository>
+ <repository>
+ <id>bintraybintray</id>
+ <url>http://jcenter.bintray.com</url>
+ </repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>com._8x8.cloud.swagger2raml</groupId>
<artifactId>swagger2raml</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0.0</version>
</dependency>
</dependencies>
```
#### Bundled JAR
-Add `dist/swagger2raml.jar` to your `CLASSPATH`
+Add `swagger2raml-1.0.0.jar` from [Releases](https://github.com/8x8Cloud/swagger2raml/releases) to syour `CLASSPATH`
### Contributing to this project
View
@@ -2,30 +2,72 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.ManifestResourceT
apply plugin: 'groovy'
apply plugin: 'shadow'
-apply plugin: 'maven'
+apply plugin: 'maven-publish'
+apply plugin: 'com.jfrog.bintray'
group = 'com._8x8.cloud.swagger2raml'
-version = '1.0-SNAPSHOT'
+version = '1.0.0'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:0.8'
+ classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:0.5'
}
}
-if (project.hasProperty('smlNexusUser') && project.hasProperty('smlNexusPassword')) {
- uploadArchives {
- repositories {
- mavenDeployer {
- repository(url: 'https://nexus.softwaremill.com/content/repositories/snapshots') {
- authentication(userName: smlNexusUser, password: smlNexusPassword)
+if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
+ task sourcesJar(type: Jar, dependsOn: classes) {
+ classifier = 'sources'
+ from sourceSets.main.allSource
+ }
+
+ task javadocJar(type: Jar, dependsOn: javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+ }
+
+ artifacts {
+ archives sourcesJar, javadocJar
+ }
+
+ publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ from components.java
+ artifact sourcesJar {
+ classifier "sources"
+ }
+
+ artifact javadocJar {
+ classifier "javadoc"
}
}
}
}
+
+ bintray {
+ user = bintrayUser
+ key = bintrayKey
+ publications = ['mavenJava']
+ publish = false
+ pkg {
+ repo = 'maven'
+ name = 'swagger2raml'
+ websiteUrl = 'https://github.com/8x8Cloud/swagger2raml'
+ issueTrackerUrl = 'https://github.com/8x8Cloud/swagger2raml/issues'
+ vcsUrl = 'https://github.com/8x8Cloud/swagger2raml.git'
+ licenses = ['Apache-2.0']
+ licenses = ['groovy', 'swagger', 'raml']
+ version {
+ vcsTag = project.version
+ }
+ }
+ }
+
+ bintrayUpload.dependsOn shadowJar
}
repositories {
@@ -46,7 +88,7 @@ test {
}
shadow {
- outputFile new File('dist/swagger2raml.jar')
+ outputFile new File("dist/swagger2raml-${project.version}.jar")
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
@@ -57,6 +99,8 @@ shadow {
}
}
+shadowJar.dependsOn build
+
task wrapper(type: Wrapper) {
gradleVersion = '2.1'
}
View
Binary file not shown.
View
@@ -1,2 +0,0 @@
-#!/bin/sh
-java -jar dist/swagger2raml.jar $@

0 comments on commit 47e6a11

Please sign in to comment.