forked from loafle/openapi-generator-original
		
	* Bugfix Kotlin-client: Can now handle path param of type list for jvm-volley and multiplatform. Also cleaning up generated code * Adding samples to github workflow. Deleting old workflow * Tweaking setup of jvm-volley * Updating samples Co-authored-by: William Cheng <wing328hk@gmail.com>
		
			
				
	
	
		
			90 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Groovy
		
	
	
	
	
	
			
		
		
	
	
			90 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Groovy
		
	
	
	
	
	
 | 
						|
buildscript {
 | 
						|
 | 
						|
    ext.kotlin_version = '1.5.10'
 | 
						|
    ext.swagger_annotations_version = "1.6.2"
 | 
						|
    ext.gson_version = "2.8.6"
 | 
						|
    ext.volley_version = "1.2.0"
 | 
						|
    ext.junit_version = "4.13.2"
 | 
						|
    ext.robolectric_version = "4.5.1"
 | 
						|
    ext.concurrent_unit_version = "0.4.6"
 | 
						|
 | 
						|
    repositories {
 | 
						|
        mavenLocal()
 | 
						|
        google()
 | 
						|
        maven {
 | 
						|
            url 'https://dl.google.com/dl/android/maven2'
 | 
						|
        }
 | 
						|
        mavenCentral()
 | 
						|
    }
 | 
						|
    dependencies {
 | 
						|
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
 | 
						|
        classpath 'com.android.tools.build:gradle:4.0.2'
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
allprojects {
 | 
						|
    repositories {
 | 
						|
        google()
 | 
						|
        mavenCentral()
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
apply plugin: 'com.android.library'
 | 
						|
apply plugin: 'kotlin-android'
 | 
						|
 | 
						|
android {
 | 
						|
    compileSdkVersion 30
 | 
						|
    defaultConfig {
 | 
						|
        minSdkVersion 21
 | 
						|
        targetSdkVersion 30
 | 
						|
    }
 | 
						|
    compileOptions {
 | 
						|
        coreLibraryDesugaringEnabled true
 | 
						|
        sourceCompatibility JavaVersion.VERSION_1_8
 | 
						|
        targetCompatibility JavaVersion.VERSION_1_8
 | 
						|
    }
 | 
						|
    lintOptions {
 | 
						|
        abortOnError false
 | 
						|
    }
 | 
						|
 | 
						|
    // Rename the aar correctly
 | 
						|
    libraryVariants.all { variant ->
 | 
						|
        variant.outputs.all { output ->
 | 
						|
            if (outputFile != null && outputFileName.endsWith('.aar')) {
 | 
						|
                outputFileName = "${archivesBaseName}-${version}.aar"
 | 
						|
            }
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
    testOptions {
 | 
						|
        unitTests.returnDefaultValues = true
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
dependencies {
 | 
						|
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
 | 
						|
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
 | 
						|
    implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
 | 
						|
    implementation "com.google.code.gson:gson:$gson_version"
 | 
						|
    implementation "com.android.volley:volley:${volley_version}"
 | 
						|
    testImplementation "junit:junit:$junit_version"
 | 
						|
    testImplementation "org.robolectric:robolectric:${robolectric_version}"
 | 
						|
    testImplementation "net.jodah:concurrentunit:${concurrent_unit_version}"
 | 
						|
    annotationProcessor "androidx.room:room-runtime:2.3.0"
 | 
						|
    implementation "androidx.room:room-runtime:2.3.0"
 | 
						|
}
 | 
						|
 | 
						|
afterEvaluate {
 | 
						|
    android.libraryVariants.all { variant ->
 | 
						|
        def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
 | 
						|
        task.description = "Create jar artifact for ${variant.name}"
 | 
						|
        task.dependsOn variant.javaCompile
 | 
						|
        task.from variant.javaCompile.destinationDir
 | 
						|
        task.destinationDirectory = project.file("${project.buildDir}/outputs/jar")
 | 
						|
        task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar"
 | 
						|
        artifacts.add('archives', task);
 | 
						|
    }
 | 
						|
}
 | 
						|
 |