forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support Micronaut4 * fix micronaut plugin version and default api base-path to / * retour de review * Migrate to .kts and improve build for equisoft * fix gradle plugin publication * bump version
- Loading branch information
Showing
20 changed files
with
198 additions
and
96 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
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
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
137 changes: 137 additions & 0 deletions
137
...r/src/main/resources/java-micronaut/common/configuration/gradle/build.gradle.kts.mustache
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 |
---|---|---|
@@ -0,0 +1,137 @@ | ||
import org.gradle.api.publish.PublishingExtension | ||
import org.gradle.api.publish.maven.MavenPublication | ||
{{^client}} | ||
import io.micronaut.gradle.MicronautRuntime.NETTY | ||
{{/client}} | ||
{{#isTestSpock}} | ||
import io.micronaut.gradle.MicronautTestRuntime.SPOCK_2 | ||
{{/isTestSpock}} | ||
{{#isTestJunit}} | ||
import io.micronaut.gradle.MicronautTestRuntime.JUNIT_5 | ||
{{/isTestJunit}} | ||
|
||
version = project.findProperty("application.version")?.toString() ?: "{{artifactVersion}}" | ||
group = "{{invokerPackage}}" | ||
|
||
plugins { | ||
{{#isTestSpock}} | ||
id("groovy") | ||
{{/isTestSpock}} | ||
{{#client}} | ||
id("io.micronaut.library") version "{{micronautPluginVersion}}" | ||
{{/client}} | ||
{{^client}} | ||
id("com.github.johnrengelman.shadow") version "8.1.1" | ||
id("io.micronaut.application") version "{{micronautPluginVersion}}" | ||
{{/client}} | ||
{{#gitProjectName}} | ||
`maven-publish` | ||
{{/gitProjectName}} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
micronaut { | ||
{{^client}} | ||
runtime.set("netty") | ||
{{/client}} | ||
{{#isTestSpock}} | ||
testRuntime.set(SPOCK_2) | ||
{{/isTestSpock}} | ||
{{#isTestJunit}} | ||
testRuntime.set(JUNIT_5) | ||
{{/isTestJunit}} | ||
processing { | ||
incremental.set(true) | ||
annotations("{{invokerPackage}}.*") | ||
} | ||
} | ||
|
||
dependencies { | ||
annotationProcessor("io.micronaut:micronaut-http-validation") | ||
{{#useAuth}} | ||
annotationProcessor("io.micronaut.security:micronaut-security-annotations") | ||
{{/useAuth}} | ||
{{#micronaut_serde_jackson}} | ||
annotationProcessor("io.micronaut.serde:micronaut-serde-processor") | ||
implementation("io.micronaut.serde:micronaut-serde-jackson") | ||
{{/micronaut_serde_jackson}} | ||
implementation("io.micronaut:micronaut-http-client") | ||
implementation("io.micronaut:micronaut-runtime") | ||
implementation("{{{micronautValidationGroupId}}}:micronaut-validation") | ||
{{#useAuth}} | ||
implementation("io.micronaut.security:micronaut-security") | ||
implementation("io.micronaut.security:micronaut-security-oauth2") | ||
{{/useAuth}} | ||
{{#reactive}} | ||
implementation("io.micronaut.reactor:micronaut-reactor") | ||
{{/reactive}} | ||
{{#generateSwagger1Annotations}} | ||
implementation("io.swagger:swagger-annotations:1.6.5") | ||
{{/generateSwagger1Annotations}} | ||
{{#generateSwagger2Annotations}} | ||
implementation("io.swagger.core.v3:swagger-annotations:2.2.19") | ||
{{/generateSwagger2Annotations}} | ||
runtimeOnly("ch.qos.logback:logback-classic") | ||
{{#isMicronaut4OrGreater}} | ||
runtimeOnly("org.yaml:snakeyaml") | ||
{{/isMicronaut4OrGreater}} | ||
} | ||
{{#micronaut_serde_jackson}}{{^isMicronaut4OrGreater}} | ||
// TODO Please, check the version of the serde, maybe it must be upgraded. | ||
configurations.all { | ||
resolutionStrategy.dependencySubstitution { | ||
substitute(module("io.micronaut:micronaut-jackson-databind")) | ||
.using(module("io.micronaut.serde:micronaut-serde-jackson:1.3.3")) | ||
} | ||
} | ||
{{/isMicronaut4OrGreater}}{{/micronaut_serde_jackson}} | ||
|
||
{{^client}} | ||
// TODO Set the main class | ||
application { | ||
mainClass.set("{{invokerPackage}}.Application") | ||
} | ||
{{/client}} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
graalvmNative.toolchainDetection = false | ||
|
||
tasks { | ||
wrapper { | ||
distributionType = Wrapper.DistributionType.ALL | ||
gradleVersion = "8.5" | ||
} | ||
} | ||
|
||
{{#gitProjectName}} | ||
configure<PublishingExtension> { | ||
repositories { | ||
maven { | ||
name = "{{gitProjectName}}" | ||
url = uri("{{packageUrl}}") | ||
credentials { | ||
name = "gprWrite" | ||
username = project.findProperty("gpr.user")?.toString() | ||
?: System.getenv("GPR_USER") | ||
?: System.getenv("GHCR_USER") | ||
password = project.findProperty("gpr.key")?.toString() | ||
?: System.getenv("GPR_TOKEN") | ||
?: System.getenv("GHCR_TOKEN") | ||
} | ||
} | ||
} | ||
|
||
publications { | ||
create<MavenPublication>("gpr") { | ||
from(components["java"]) | ||
} | ||
} | ||
} | ||
{{/gitProjectName}} |
Oops, something went wrong.