Skip to content

Spring Boot 3.0 #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test CI
on: [ push, fork ]

jobs:
TEST_ALL:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '11', '17' ]
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: 🪜 Setup java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: temurin

- name: 🦞 chmod /gradlew
run: chmod +x ./gradlew

- name: 🔦 Test
run: ./gradlew test --info
33 changes: 33 additions & 0 deletions .run/TEST.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TEST" type="JUnit" factoryName="JUnit">
<module name="springdoc-openapi-gradle-plugin.test" />
<shortenClasspath name="ARGS_FILE" />
<useClassPathOnly />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="org.springdoc.openapi.gradle.plugin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<extension name="net.ashald.envfile">
<option name="IS_ENABLED" value="false" />
<option name="IS_SUBST" value="false" />
<option name="IS_PATH_MACRO_SUPPORTED" value="false" />
<option name="IS_IGNORE_MISSING_FILES" value="false" />
<option name="IS_ENABLE_EXPERIMENTAL_INTEGRATIONS" value="false" />
<ENTRIES>
<ENTRY IS_ENABLED="true" PARSER="runconfig" />
</ENTRIES>
</extension>
<option name="ALTERNATIVE_JRE_PATH" value="corretto-19" />
<option name="PACKAGE_NAME" value="org.springdoc.openapi.gradle.plugin" />
<option name="MAIN_CLASS_NAME" value="org.springdoc.openapi.gradle.plugin.OpenApiGradlePluginTest" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ Gradle Groovy DSL
```groovy
plugins {
id "org.springframework.boot" version "2.7.0"
id "org.springdoc.openapi-gradle-plugin" version "1.5.0"
id "org.springdoc.openapi-gradle-plugin" version "1.6.0"
}
```

Gradle Kotlin DSL
```groovy
plugins {
id("org.springframework.boot") version "2.7.0"
id("org.springdoc.openapi-gradle-plugin") version "1.5.0"
id("org.springdoc.openapi-gradle-plugin") version "1.6.0"
}
```

Expand Down Expand Up @@ -133,7 +133,7 @@ The `groupedApiMappings` customization allows you to specify multiple URLs/file
2. Update the version for the plugin to match the current version found in `build.gradle.kts`

```
id("org.springdoc.openapi-gradle-plugin") version "1.5.0"
id("org.springdoc.openapi-gradle-plugin") version "1.6.0"
```

3. Add the following to the spring boot apps `settings.gradle`
Expand Down
51 changes: 22 additions & 29 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
plugins {
`java-gradle-plugin`
id("com.gradle.plugin-publish") version "0.14.0"
id("org.sonarqube") version "3.1.1"
kotlin("jvm") version "1.4.31"
`maven-publish`
id("com.github.ben-manes.versions") version "0.38.0"
id("io.gitlab.arturbosch.detekt") version "1.16.0"
kotlin("jvm") version "1.8.0-RC"
id ("com.palantir.idea-test-fix") version "0.1.0"
id("com.gradle.plugin-publish") version "0.14.0"
id("org.sonarqube") version "3.5.0.2730"
id("com.github.ben-manes.versions") version "0.44.0"
id("io.gitlab.arturbosch.detekt") version "1.22.0"
}

group = "org.springdoc"
version = "1.5.0"
version = "1.6.0"

sonarqube {
properties {
Expand Down Expand Up @@ -45,20 +46,19 @@ publishing {
}

dependencies {
implementation(kotlin("reflect"))
implementation("com.google.code.gson:gson:2.8.6")
implementation("org.awaitility:awaitility-kotlin:4.0.3")
implementation("com.google.code.gson:gson:2.10")
implementation("org.awaitility:awaitility-kotlin:4.2.0")
implementation("com.github.psxpaul:gradle-execfork-plugin:0.2.0")
implementation("org.springframework.boot:spring-boot-gradle-plugin:2.5.6")
implementation("org.springframework.boot:spring-boot-gradle-plugin:2.7.6")
implementation("jakarta.platform:jakarta.jakartaee-api:10.0.0")

testImplementation(gradleTestKit())
testImplementation(platform("org.junit:junit-bom:5.7.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("com.beust:klaxon:5.5")
testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.2")
testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.2")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.1")
testImplementation("com.beust:klaxon:5.6")
testImplementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.14.1")
testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.1")

detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.16.0")
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.22.0")
}

gradlePlugin {
Expand All @@ -78,23 +78,16 @@ pluginBundle {
tags = listOf("springdoc", "openapi", "swagger")
}

val jvmVersion: JavaLanguageVersion = JavaLanguageVersion.of(8)

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "1.${jvmVersion.toString()}"
}
}

tasks.withType<Test>().configureEach {
useJUnitPlatform()
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1
tasks{
val java: String by project
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach { kotlinOptions { jvmTarget = java } }
withType<io.gitlab.arturbosch.detekt.Detekt> { jvmTarget = java }
withType<Test>().configureEach { useJUnitPlatform() }
// withType<Jar> { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }
}

detekt {
config = files("config/detekt/detekt.yml")
parallel = true
}
tasks.withType<io.gitlab.arturbosch.detekt.Detekt>().configureEach {
jvmTarget = "1.${jvmVersion.toString()}"
}
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
java=11
kotlin.code.style=official
org.gradle.caching=true
org.gradle.parallel=true
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading