mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 08:01:20 +02:00
Add module for seerr api
This commit is contained in:
parent
e0d50baf15
commit
2cc762a5b8
8 changed files with 7869 additions and 2 deletions
51
seerr-api/build.gradle.kts
Normal file
51
seerr-api/build.gradle.kts
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
plugins {
|
||||
id("java-library")
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
id("org.openapi.generator") version "7.17.0"
|
||||
}
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
kotlin {
|
||||
compilerOptions {
|
||||
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
kotlin.srcDirs("$buildDir/generated/seerr_api/src/main/kotlin")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
openApiGenerate {
|
||||
generatorName.set("kotlin")
|
||||
inputSpec.set("$projectDir/src/main/seerr-api.yml")
|
||||
outputDir.set("$buildDir/generated/seerr_api")
|
||||
apiPackage.set("com.github.damontecres.api.seerr")
|
||||
modelPackage.set("com.github.damontecres.api.seerr.model")
|
||||
groupId.set("com.github.damontecres.api.seerr")
|
||||
id.set("seerr-api")
|
||||
packageName.set("com.github.damontecres.api.seerr")
|
||||
additionalProperties.apply {
|
||||
put("serializationLibrary", "kotlinx_serialization")
|
||||
put("sortModelPropertiesByRequiredFlag", true)
|
||||
put("sortParamsByRequiredFlag", true)
|
||||
put("useCoroutines", true)
|
||||
put("enumPropertyNaming", "UPPERCASE")
|
||||
put("modelMutable", false)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("compileKotlin") {
|
||||
dependsOn.add(tasks.named("openApiGenerate"))
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(platform(libs.okhttp.bom))
|
||||
implementation(libs.okhttp)
|
||||
implementation(libs.kotlinx.serialization.core)
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
implementation(libs.kotlinx.coroutines.core)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue