Skip to content

Commit

Permalink
Updates README based on new release changes (#271)
Browse files Browse the repository at this point in the history
The release management changes moved from maven-publish (newer plugin)
to maven (older plugin, only one that works currently with signing).
This updates docs in the samples/local-spec project with current
directions.

Also:

* Includes sonatype releases/snapshots on repo lookup
* Adds openApiGeneratorVersion property
  • Loading branch information
jimschubert authored Jun 11, 2018
1 parent 726e803 commit 6c18c39
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
12 changes: 12 additions & 0 deletions modules/openapi-generator-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ buildscript {
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url "https://oss.sonatype.org/content/repositories/releases/"
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
Expand Down Expand Up @@ -35,6 +41,12 @@ targetCompatibility = 1.8
repositories {
mavenCentral()
mavenLocal()
maven {
url "https://oss.sonatype.org/content/repositories/releases/"
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This example assumes you have Gradle 4.7+ installed. No gradle wrapper is provided in samples.

First, publish the openapi-generator-gradle-plugin locally via `sh gradlew build publishToMavenLocal` in the module directory.
First, publish the openapi-generator-gradle-plugin locally via `./gradlew assemble install` in the module directory.

Then, run the following tasks in this example directory.

Expand All @@ -12,3 +12,9 @@ gradle openApiMeta
gradle openApiValidate
gradle buildGoSdk
```

The samples can be tested against other versions of the plugin using the `openApiGeneratorVersion` property. For example:

```bash
gradle -PopenApiGeneratorVersion=3.0.1-SNAPSHOT openApiValidate
```
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ buildscript {
}
}
dependencies {
classpath "org.openapitools:openapi-generator-gradle-plugin:3.0.0-SNAPSHOT"
// Updated version can be passed via command line arg as -PopenApiGeneratorVersion=VERSION
classpath "org.openapitools:openapi-generator-gradle-plugin:$openApiGeneratorVersion"
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
openApiGeneratorVersion=3.0.1-SNAPSHOT

0 comments on commit 6c18c39

Please sign in to comment.