-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔀 Update Codegen to new OpenApiCodegen 5.2.1 (#29)
- Loading branch information
Showing
22 changed files
with
176 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,5 @@ plugins { | |
`kotlin-dsl` | ||
} | ||
repositories { | ||
jcenter() | ||
mavenCentral() | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
org.gradle.jvmargs=-Xmx1536m | ||
|
||
version=2.2.4 | ||
version=2.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
import com.jfrog.bintray.gradle.BintrayExtension | ||
import org.jetbrains.dokka.gradle.DokkaTask | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
id("java-gradle-plugin") | ||
kotlin("jvm") | ||
id("org.jetbrains.dokka") | ||
id("maven-publish") | ||
id("com.jfrog.bintray") | ||
} | ||
|
||
dependencies { | ||
|
@@ -16,7 +13,7 @@ dependencies { | |
implementation(Dependencies.Libs.openApiCodegen) | ||
|
||
testImplementation(Dependencies.TestLibs.junit) | ||
testImplementation(Dependencies.TestLibs.kotlinTest) | ||
testImplementation(Dependencies.TestLibs.kotest) | ||
} | ||
|
||
tasks.withType<KotlinCompile> { | ||
|
@@ -25,19 +22,21 @@ tasks.withType<KotlinCompile> { | |
} | ||
} | ||
|
||
val dokka by tasks.getting(DokkaTask::class) { | ||
outputFormat = "html" | ||
outputDirectory = "$buildDir/dokka/html" | ||
configuration { | ||
moduleName = Artifact.artifactId | ||
} | ||
tasks.withType<JavaCompile> { | ||
sourceCompatibility = "1.8" | ||
targetCompatibility = "1.8" | ||
} | ||
|
||
tasks.withType<Test> { | ||
useJUnitPlatform() | ||
} | ||
|
||
val sourcesJar by tasks.creating(Jar::class) { | ||
archiveClassifier.set("sources") | ||
from(files("src/main/kotlin")) | ||
} | ||
|
||
val dokka by tasks.dokkaHtml | ||
val dokkaHtmlJar by tasks.creating(Jar::class) { | ||
archiveClassifier.set("kdoc-html") | ||
from(dokka.outputDirectory) | ||
|
@@ -47,16 +46,18 @@ val dokkaHtmlJar by tasks.creating(Jar::class) { | |
gradlePlugin { | ||
plugins { | ||
register("swagger-codegen-plugin") { | ||
id = "swagger-codegen" | ||
group = Artifact.groupId | ||
id = Artifact.artifactId | ||
implementationClass = "cz.eman.swagger.codegen.SwaggerCodeGenPlugin" | ||
} | ||
} | ||
isAutomatedPublishing = false | ||
} | ||
|
||
val releasePublication = "release" | ||
publishing { | ||
publications { | ||
create<MavenPublication>(releasePublication) { | ||
create<MavenPublication>("release") { | ||
groupId = Artifact.groupId | ||
artifactId = Artifact.artifactId | ||
from(components["java"]) | ||
artifact(sourcesJar) | ||
|
@@ -86,39 +87,23 @@ publishing { | |
developerConnection.set("scm:git:ssh://[email protected]/eManPrague/swagger-codegen.git") | ||
url.set("https://github.com/eManPrague/swagger-codegen") | ||
} | ||
|
||
issueManagement { | ||
system.set("GitHub Issues") | ||
url.set("https://github.com/eManPrague/swagger-codegen/issues") | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven(url = "https://dl.bintray.com/emanprague/maven") { name = "bintray" } | ||
} | ||
} | ||
maven(url = "https://nexus.eman.cz/repository/maven-public") { | ||
name = "Nexus" | ||
|
||
bintray { | ||
user = findPropertyOrNull("bintray.user") | ||
key = findPropertyOrNull("bintray.apikey") | ||
publish = true | ||
setPublications(releasePublication) | ||
pkg(delegateClosureOf<BintrayExtension.PackageConfig> { | ||
repo = "maven" | ||
name = "cz.eman.swagger.codegen" | ||
userOrg = "emanprague" | ||
override = true | ||
websiteUrl = "https://www.emanprague.com/en/" | ||
githubRepo = "eManPrague/swagger-codegen" | ||
vcsUrl = "https://github.com/eManPrague/swagger-codegen" | ||
description = "A fork of the swagger-codegen by eMan" | ||
setLabels( | ||
"kotlin", | ||
"swagger", | ||
"codegen", | ||
"retrofit", | ||
"room", | ||
"swagger-codegen", | ||
"openapi" | ||
) | ||
setLicenses("MIT") | ||
desc = description | ||
}) | ||
} | ||
credentials { | ||
username = findPropertyOrNull("nexus.username") | ||
password = findPropertyOrNull("nexus.password") | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ import org.openapitools.codegen.config.Context | |
* compileJava part does not run but it can be forced using [forceJava]. | ||
* - [forceJava] forces java compilation when compileKotlin is present. | ||
* | ||
* @author eMan s.r.o. ([email protected]) | ||
* @author eMan a.s. ([email protected]) | ||
*/ | ||
open class SwaggerCodeGenConfig : CodegenConfigurator(), Cloneable { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.