Releases: openapi-processor/openapi-processor-gradle
2023.2
This version will only work with gradle 7+, use 2021.3 with gradle 5.5+
#17, version check
the plugin can now check if there is a newer version of the gradle plugin or a processor if the processor supports it.
// build.gradle
openapiProcessor {
checkUpdates "never" // default
//checkUpdates "daily"
//checkUpdates "always"
}
see the documentation for more.
snapshot repository
the plugin does no longer automatically add the openapi-processor snapshot repository to the repositories
to avoid overriding the repositories set in settings.gradle(.kts)
.
It can be enabled by adding openapi-processor-gradle.snapshots = true
to the gradle.properties
file.
The plugin does not add any repository unless the property is set.
2023.1
This version will only work with gradle 7+, use 2021.3 with gradle 5.5+
logging
gradle does not always log all error messages from the processor. This version adds a small workaround to fix this.
maintenance
clean up, dependency updates, update build/gradle, update gradle test versions
2022.2
This version will only work with gradle 7+, use 2021.3 with gradle 5.5+
mavenCentral()
the plugin does no longer automatically add mavenCentral()
to the repositories
. It still adds the openapi-processor snapshot repository. This can be disabled by adding openapi-processor-gradle.snapshots = false
to the gradle.properties
file.
published to maven central
the plugin builds are published to maven central (snapshots/releases) in addition to the gradle plugin portal.
Sometimes it is useful to try a special plugin version instead of the published plugin from the plugin portal. For example to try a snapshot or test version of the plugin.
This is possible by configuring the repositories checked for plugins using a pluginManagement
block in settings.gradle
(this must be at the top of the file). The example below adds the snapshot repository of the gradle plugin.
// build.gradle
plugins {
id 'io.openapiprocessor.openapi-processor" version "2022.2-SNAPSHOT'
}
// settings.gradle
pluginManagement {
repositories {
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
gradlePluginPortal()
}
}
// ...
2022.1
This version will only work with gradle 7+, use 2021.3 with gradle 5.5+
internal cleanup
removed usage of deprecated gradle apis
support for processing multiple openapi files with the same processor
By default, the name of a processor
configuration block is used to select the processor library. Each processor library has a name and the plugin tries to load the processor library with that name.
To process multiple distinct openapi descriptions with the same processor it is possible to use user selected names for the processor
blocks and explicitly configure the processor name using processorName()
:
// build.gradle
openapiProcessor {
apiOne {
processorName "spring"
apiPath "${projectDir}/src/api-one/openapi.yaml"
... options of openapi-processor-spring
}
apiTwo {
processorName "spring"
apiPath "${projectDir}/src/api-two/openapi.yaml"
... options of openapi-processor-spring
}
}
2021.3
-
#19, better kotlin dsl support. This requires gradle >= 6.5. See https://docs.openapiprocessor.io/gradle.
use
process()
to create a processor block andprop()
to add processor specific options.// build.gradle.kts openapiProcessor { apiPath("${projectDir}/src/api/openapi.yaml") process("spring") { processor("io.openapiprocessor:openapi-processor-spring:<version>") targetDir("${projectDir}/build/openapi") prop("mapping", "${projectDir}/src/api/mapping.yaml") } process("json") { processor("io.openapiprocessor:openapi-processor-json:<version>") targetDir("${buildDir}/json") } }
2021.2
-
allow multiple
processor
dependencies to make it easier to control the processor dependencies, for example to update to the latestcore
version with bugfixes or new features, e.g.:// ... spring { processor 'io.openapiprocessor:openapi-processor-core:2021.3-SNAPSHOT' processor 'io.openapiprocessor:openapi-processor-spring:2021.1' // ... }
- run integration test with all gradle versions from 5.5 to 6.8.3 & 7.0 (7.0-20210306...)
2021.1 (1.0.0.M10)
- changed version scheme, replaced useless major version with year
- support openapi-processor-api 2021.1 & 1.2.0
- automatically find processor snapshots in new snapshot repository (oss.sonatype.org)
- internal cleanup