forked from loafle/openapi-generator-original
		
	This continues on work in #5033 and #5034 which convert all http usage to https to unblock CircleCI builds. In #5034, mavenCentral() DSL was updated to explicitly target the https maven repo because Gradle didn't force TLS 1.2 until v4.8.1 and many of our examples use earlier versions of Gradle. The Kotlin meta generator was missed because it is a .kts build file rather than build.gradle, and the mustache filename doesn't have kts in it; the file was updated as if it was build.gradle (groovy syntax).
		
			
				
	
	
		
			63 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
 | 
						|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 | 
						|
 | 
						|
plugins {
 | 
						|
    kotlin("jvm") version "1.3.41"
 | 
						|
    id("com.github.johnrengelman.shadow") version("5.0.0")
 | 
						|
}
 | 
						|
 | 
						|
group = "org.openapitools"
 | 
						|
version = "1.0-SNAPSHOT"
 | 
						|
 | 
						|
repositories {
 | 
						|
    mavenLocal()
 | 
						|
    maven { url = uri("https://repo1.maven.org/maven2") }
 | 
						|
}
 | 
						|
 | 
						|
dependencies {
 | 
						|
    val openapiGeneratorVersion = "4.1.3"
 | 
						|
 | 
						|
    implementation(kotlin("stdlib-jdk8"))
 | 
						|
    implementation("org.openapitools:openapi-generator:$openapiGeneratorVersion")
 | 
						|
 | 
						|
    runtime("org.openapitools:openapi-generator-cli:$openapiGeneratorVersion")
 | 
						|
 | 
						|
    testImplementation("org.junit.jupiter:junit-jupiter:5.5.2")
 | 
						|
}
 | 
						|
 | 
						|
tasks.test {
 | 
						|
    useJUnitPlatform()
 | 
						|
    testLogging {
 | 
						|
        events("passed", "skipped", "failed")
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
tasks.register<Copy>("copyToLib") {
 | 
						|
    from(project.configurations.runtime)
 | 
						|
    into(File(buildDir, "libs"))
 | 
						|
}
 | 
						|
 | 
						|
tasks.register<ShadowJar>("standalone") {
 | 
						|
    archiveFileName.set("myClientCodegen-openapi-generator-standalone.jar")
 | 
						|
    archiveClassifier.set("all")
 | 
						|
 | 
						|
    from(sourceSets["main"].output)
 | 
						|
 | 
						|
    configurations.add(project.configurations["runtimeClasspath"])
 | 
						|
    configurations.add(project.configurations["runtime"])
 | 
						|
 | 
						|
    mergeServiceFiles()
 | 
						|
 | 
						|
    manifest.attributes(mapOf("Main-Class" to "org.openapitools.codegen.OpenAPIGenerator"))
 | 
						|
}
 | 
						|
 | 
						|
tasks.withType<KotlinCompile> {
 | 
						|
    kotlinOptions.jvmTarget = "1.8"
 | 
						|
}
 | 
						|
 | 
						|
tasks.wrapper {
 | 
						|
    this.distributionType = Wrapper.DistributionType.BIN
 | 
						|
}
 | 
						|
 | 
						|
tasks.named("shadowJar") { dependsOn("copyToLib") }
 |