Skip to content

Commit

Permalink
Merge pull request #39 from Yelp/fix-38-java-8-version
Browse files Browse the repository at this point in the history
Specify Java source and target compatibility version
  • Loading branch information
cortinico authored Jul 9, 2019
2 parents 28bc68b + e9ef89a commit b982fdd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ This plugin wraps [swagger-codegen](https://github.com/swagger-api/swagger-codeg

**Swagger Gradle Codegen** is distributed through [Gradle Plugin Portal](https://plugins.gradle.org/). To use it you need to add the following dependency to your gradle files.
Please note that those code needs to be added the gradle file of the module where you want to generate the code (**not the top level** build.gradle\[.kts\] file).
Please also note that the plugin uses gradle 5.+ features, and you will need to setup your gradle wrapper to use 5.0 or more.

If you're using the Groovy Gradle files:
```groovy
Expand Down Expand Up @@ -53,6 +52,13 @@ Please note that the `generateSwagger { }` block is **needed** in order to let t

Once you setup the plugin correctly, you can call the `:generateSwagger` gradle task, that will run the code generation with the configuration you provided.

## Requirements

In order to run this gradle plugin you need to fulfill the following requirements:

* Gradle 5.x - This plugin uses Gradle 5 features, and you will need to setup your Gradle wrapper to use 5.0 or more.
* Java 8+

## Supported platforms

The Swagger Gradle Codegen is designed to support multiple platforms. For every platform, we provide **templates** that are tested and generates opinionated code.
Expand Down
5 changes: 5 additions & 0 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ plugins {
id("com.gradle.plugin-publish") version "0.10.0"
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

dependencies {
implementation(kotlin("stdlib-jdk8"))

Expand Down

0 comments on commit b982fdd

Please sign in to comment.