Skip to content

Commit 47e6a11

Browse files
committed
Bintray publish configuration
1 parent b2da193 commit 47e6a11

File tree

5 files changed

+65
-22
lines changed

5 files changed

+65
-22
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,4 @@ out/*
3232
argfile*
3333
src/test/resources/actual-output.raml
3434
src/test/resources/actual-output-2.raml
35+
dist

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# swagger2raml [![Build Status](https://travis-ci.org/8x8Cloud/swagger2raml.svg?branch=master)](https://travis-ci.org/8x8Cloud/swagger2raml)
2-
A utility to generate [RAML](http://raml.org/) documentation from [Swagger](https://helloreverb.com/developers/swagger) JSON.
1+
# swagger2raml [![Build Status](https://travis-ci.org/8x8Cloud/swagger2raml.svg?branch=master)](https://travis-ci.org/8x8Cloud/swagger2raml)
2+
A utility to generate [RAML](http://raml.org/) documentation from [Swagger](https://helloreverb.com/developers/swagger) JSON.
33

44
## Usage
55
swagger2raml can be used either from command line (requires Java to be on the `PATH`) or as a Java library.
66

77
### Command line
88
```
9-
./swagger2raml [-o outputFileName] <swaggerApiUrl>
9+
java -jar swagger2raml-1.0.0.jar [-o outputFileName] <swaggerApiUrl>
1010
```
1111
where:
1212
- `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:
2323
#### Gradle
2424
```groovy
2525
repositories {
26-
maven { url 'https://nexus.softwaremill.com/content/repositories/snapshots' }
26+
jcenter()
2727
}
2828
29-
compile 'com._8x8.cloud.swagger2raml:swagger2raml:1.0-SNAPSHOT'
29+
compile 'com._8x8.cloud.swagger2raml:swagger2raml:1.0.0'
3030
```
3131

3232
#### Maven
3333
```xml
3434
<distributionManagement>
35-
<snapshotRepository>
36-
<id>snapshots</id>
37-
<url>https://nexus.softwaremill.com/content/repositories/snapshots</url>
38-
</snapshotRepository>
35+
<repository>
36+
<id>bintraybintray</id>
37+
<url>http://jcenter.bintray.com</url>
38+
</repository>
3939
</distributionManagement>
4040

4141
<dependencies>
4242
<dependency>
4343
<groupId>com._8x8.cloud.swagger2raml</groupId>
4444
<artifactId>swagger2raml</artifactId>
45-
<version>1.0-SNAPSHOT</version>
45+
<version>1.0.0</version>
4646
</dependency>
4747
</dependencies>
4848
```
4949

5050
#### Bundled JAR
51-
Add `dist/swagger2raml.jar` to your `CLASSPATH`
51+
Add `swagger2raml-1.0.0.jar` from [Releases](https://github.com/8x8Cloud/swagger2raml/releases) to syour `CLASSPATH`
5252

5353
### Contributing to this project
5454

build.gradle

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,72 @@ import com.github.jengelman.gradle.plugins.shadow.transformers.ManifestResourceT
22

33
apply plugin: 'groovy'
44
apply plugin: 'shadow'
5-
apply plugin: 'maven'
5+
apply plugin: 'maven-publish'
6+
apply plugin: 'com.jfrog.bintray'
67

78
group = 'com._8x8.cloud.swagger2raml'
8-
version = '1.0-SNAPSHOT'
9+
version = '1.0.0'
910

1011
buildscript {
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

3173
repositories {
@@ -46,7 +88,7 @@ test {
4688
}
4789

4890
shadow {
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+
60104
task wrapper(type: Wrapper) {
61105
gradleVersion = '2.1'
62106
}

dist/swagger2raml.jar

-7.19 MB
Binary file not shown.

swagger2raml.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)