Skip to content

Commit e9ef89a

Browse files
committed
Specify Java source and target compatibility version
Add the directive to specify the version of Java to use to compile the Java files. Previously the version was not specified so the local JDK was used. This caused a problem with version 1.1.0 of the plugin that got compiled with Java 11 and was incompatible for users on Java 8. Fixes #38
1 parent 28bc68b commit e9ef89a

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ This plugin wraps [swagger-codegen](https://github.com/swagger-api/swagger-codeg
1010

1111
**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.
1212
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).
13-
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.
1413

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

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

55+
## Requirements
56+
57+
In order to run this gradle plugin you need to fulfill the following requirements:
58+
59+
* Gradle 5.x - This plugin uses Gradle 5 features, and you will need to setup your Gradle wrapper to use 5.0 or more.
60+
* Java 8+
61+
5662
## Supported platforms
5763

5864
The Swagger Gradle Codegen is designed to support multiple platforms. For every platform, we provide **templates** that are tested and generates opinionated code.

plugin/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ plugins {
1111
id("com.gradle.plugin-publish") version "0.10.0"
1212
}
1313

14+
java {
15+
sourceCompatibility = JavaVersion.VERSION_1_8
16+
targetCompatibility = JavaVersion.VERSION_1_8
17+
}
18+
1419
dependencies {
1520
implementation(kotlin("stdlib-jdk8"))
1621

0 commit comments

Comments
 (0)