Skip to content

Commit

Permalink
chore(gradle/openapi-sdk): update to OpenAPI 6.0.1 and update Microna…
Browse files Browse the repository at this point in the history
…ut codegen (#147)

Lié à
kronostechnologies/micronaut-project-openapi-generator#30

J'ai supprimé le patch pour le générateur kotlin, c'est released dans
6.0.1. (OpenAPITools/openapi-generator#12594)
  • Loading branch information
meriouma authored Sep 8, 2022
2 parents f85f68a + d783dce commit 48d7a0a
Show file tree
Hide file tree
Showing 19 changed files with 591 additions and 1,542 deletions.
18 changes: 4 additions & 14 deletions gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,14 @@ import io.gitlab.arturbosch.detekt.CONFIGURATION_DETEKT_PLUGINS
val javaVersion = JavaVersion.VERSION_17

plugins {
`kotlin-dsl` version "2.3.3" apply false
`kotlin-dsl` apply false

id("com.github.ben-manes.versions") version "0.42.0"
id("org.cyclonedx.bom") version "1.5.0"
id("org.jmailen.kotlinter") version "3.10.0" apply false
id("io.gitlab.arturbosch.detekt") version "1.20.0" apply false
}

allprojects {
configurations.all {
resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlin") {
useVersion("1.6.21")
}
}
}
}

subprojects {
group = "com.equisoft.standards"

Expand Down Expand Up @@ -84,10 +74,10 @@ subprojects {
name = "gprWrite"
username = project.findProperty("gpr.write.user")?.toString()
?: System.getenv("GPR_USER")
?: System.getenv("GHCR_USER")
?: System.getenv("GHCR_USER")
password = project.findProperty("gpr.write.key")?.toString()
?: System.getenv("GPR_KEY")
?: System.getenv("GHCR_TOKEN")
?: System.getenv("GHCR_TOKEN")
}
}
}
Expand Down Expand Up @@ -143,6 +133,6 @@ tasks {

wrapper {
distributionType = Wrapper.DistributionType.ALL
gradleVersion = "7.5"
gradleVersion = "7.5.1"
}
}
2 changes: 1 addition & 1 deletion gradle/global-conventions/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version = "1.2.0-SNAPSHOT"

dependencies {
implementation("com.github.ben-manes:gradle-versions-plugin:0.42.0")
implementation("org.cyclonedx:cyclonedx-gradle-plugin:1.7.0")
implementation("org.cyclonedx:cyclonedx-gradle-plugin:1.7.1")
}

gradlePlugin {
Expand Down
Binary file modified gradle/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/gradle/wrapper/gradle-wrapper.properties
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-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions gradle/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions gradle/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
2 changes: 1 addition & 1 deletion gradle/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ val functionalTestImplementation = configurations
val detektVersion = "1.20.0"

dependencies {
val kotlinVersion = "1.6.21"
val kotlinVersion = "1.7.10"
implementation(platform("org.jetbrains.kotlin:kotlin-bom:$kotlinVersion"))

implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ class KotlinStandardsPluginFunctionalTest {
projectDir.resolve("build.gradle.kts").writeText(
"""
plugins {
kotlin("jvm") version "1.6.20"
kotlin("jvm") version "1.7.10"
id("com.equisoft.standards.kotlin")
}
dependencies {
implementation("io.micronaut.test:micronaut-test-junit5:2.3.3")
implementation("org.junit.jupiter:junit-jupiter-api:5.8.2")
implementation("io.micronaut.test:micronaut-test-junit5:3.5.0")
implementation("org.junit.jupiter:junit-jupiter-api:5.9.0")
}
repositories {
mavenCentral()
Expand Down
6 changes: 3 additions & 3 deletions gradle/micronaut/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version = "0.5.0-SNAPSHOT"

dependencies {
val kotlinVersion = "1.6.21"
val kotlinVersion = "1.7.10"
implementation(platform("org.jetbrains.kotlin:kotlin-bom:$kotlinVersion"))
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion")

val micronautPluginVersion = "3.5.0"
val micronautPluginVersion = "3.5.3"
implementation("io.micronaut.gradle:micronaut-docker-plugin:$micronautPluginVersion")
implementation("io.micronaut.gradle:micronaut-graalvm-plugin:$micronautPluginVersion")
implementation("io.micronaut.gradle:micronaut-gradle-plugin:$micronautPluginVersion")
Expand All @@ -16,7 +16,7 @@ dependencies {

testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")

val junit5Version = "5.8.2"
val junit5Version = "5.9.0"
testImplementation("org.junit.jupiter:junit-jupiter-api:$junit5Version")
testImplementation("org.junit.jupiter:junit-jupiter-engine:$junit5Version")
}
Expand Down
10 changes: 5 additions & 5 deletions gradle/openapi-sdk/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import org.apache.tools.ant.taskdefs.Patch

version = "0.5.0-SNAPSHOT"
version = "0.6.0-SNAPSHOT"

val openApiPatchesSourceDirectory = layout.projectDirectory.dir("src/patches")
val openApiTemplatesDirectory = layout.buildDirectory.dir("tmp/openapi-templates")
Expand All @@ -12,17 +12,17 @@ val openApiGenerator by configurations.creating {
}

dependencies {
val openApiVersion = "6.0.0"
val openApiVersion = "6.0.1"

compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
implementation("org.openapitools:openapi-generator-gradle-plugin:$openApiVersion")
implementation("com.equisoft.openapi.generator.micronaut:micronaut-project-openapi-generator:0.4.0")
implementation("com.equisoft.openapi.generator.micronaut:micronaut-project-openapi-generator:0.5.0")

openApiGenerator("org.openapitools:openapi-generator:$openApiVersion")
}

java {
sourceCompatibility = JavaVersion.VERSION_13
sourceCompatibility = JavaVersion.VERSION_17
}

gradlePlugin {
Expand Down
Loading

0 comments on commit 48d7a0a

Please sign in to comment.