Compare commits
	
		
			No commits in common. "26a6f065dab742d22fd149f285bc19b01647d6ea" and "d8d69d200a3419b030680f2b02e13377f631b5d8" have entirely different histories.
		
	
	
		
			26a6f065da
			...
			d8d69d200a
		
	
		
@ -1,46 +1,21 @@
 | 
			
		||||
plugins {
 | 
			
		||||
    kotlin("jvm") version "2.0.21"
 | 
			
		||||
    id("org.openapi.generator") version "7.10.0"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
group = "ru.vyatsu"
 | 
			
		||||
version = "1.0.0"
 | 
			
		||||
 | 
			
		||||
val generatedSourcesDir = "$buildDir/generated/openapi"
 | 
			
		||||
group = "com.kashiuno"
 | 
			
		||||
version = "1.0-SNAPSHOT"
 | 
			
		||||
 | 
			
		||||
repositories {
 | 
			
		||||
    mavenCentral()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
dependencies {
 | 
			
		||||
    compileOnly("com.squareup.okhttp3:okhttp:4.12.0")
 | 
			
		||||
    compileOnly("com.squareup.moshi:moshi-kotlin:1.15.2")
 | 
			
		||||
    testImplementation(kotlin("test"))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
tasks.test {
 | 
			
		||||
    useJUnitPlatform()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
kotlin {
 | 
			
		||||
    jvmToolchain(17)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
tasks.openApiGenerate {
 | 
			
		||||
    generatorName.set("kotlin")
 | 
			
		||||
    inputSpec.set("$rootDir/src/main/resources/openapi-contract.yaml")
 | 
			
		||||
    outputDir.set(generatedSourcesDir)
 | 
			
		||||
    packageName.set("ru.vyatsu")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sourceSets {
 | 
			
		||||
    getByName("main") {
 | 
			
		||||
        kotlin {
 | 
			
		||||
            srcDir("$generatedSourcesDir/src/main/kotlin")
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
tasks.compileKotlin {
 | 
			
		||||
    dependsOn(tasks.openApiGenerate)
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user