From a5ac38d75d9cdb4e6b41f570458642346facb6e5 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Sun, 10 Jun 2018 09:48:44 -0400 Subject: [PATCH] Updates README based on new release changes 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 --- modules/openapi-generator-gradle-plugin/build.gradle | 12 ++++++++++++ .../samples/local-spec/README.md | 8 +++++++- .../samples/local-spec/build.gradle | 3 ++- .../samples/local-spec/gradle.properties | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties diff --git a/modules/openapi-generator-gradle-plugin/build.gradle b/modules/openapi-generator-gradle-plugin/build.gradle index 25fb2b730394..c639b67a162a 100644 --- a/modules/openapi-generator-gradle-plugin/build.gradle +++ b/modules/openapi-generator-gradle-plugin/build.gradle @@ -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" @@ -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 { diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md index 278bddb12b52..b18720b4330a 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/README.md @@ -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. @@ -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 +``` diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle index a0f00237d8a6..4a79c8e6f9a9 100644 --- a/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle @@ -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" } } diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties new file mode 100644 index 000000000000..cd288d87a9ad --- /dev/null +++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties @@ -0,0 +1 @@ +openApiGeneratorVersion=3.0.1-SNAPSHOT