forked from loafle/openapi-generator-original
* [android] Fix useAndroidMavenGradlePlugin type in template * [android][volley] Use version variables in template * [android][volley] Exclude httpclient As it is incompatible with Android * [android][volley] Resolve file conflict between httpcomponents modules * [android] Update Gradle, the plugins, build tools This fixes building with current Android Studio. Android Gradle plugin version 8.0.0 was chosen for wider compatibility with Android Studio versions (as far back as 2022.2.1). The Maven plugin has been abandoned since the functionality is now built in, and manual jar tasks are not necessary with it. * [android] Regenerate samples
61 lines
1.6 KiB
Groovy
61 lines
1.6 KiB
Groovy
plugins {
|
|
id 'com.android.library' version '8.0.0'
|
|
id 'maven-publish'
|
|
}
|
|
|
|
android {
|
|
namespace "org.openapitools.client"
|
|
compileSdkVersion 33
|
|
buildToolsVersion '34.0.0'
|
|
useLibrary 'org.apache.http.legacy'
|
|
defaultConfig {
|
|
minSdkVersion 14
|
|
targetSdkVersion 33
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
publishing {
|
|
singleVariant('release') {
|
|
withSourcesJar()
|
|
}
|
|
}
|
|
}
|
|
|
|
ext {
|
|
swagger_annotations_version = "1.6.6"
|
|
gson_version = "2.10.1"
|
|
httpclient_version = "4.5.13"
|
|
httpcore_version = "4.4.4"
|
|
junit_version = "4.13"
|
|
}
|
|
|
|
dependencies {
|
|
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
|
|
implementation "com.google.code.gson:gson:$gson_version"
|
|
implementation "org.apache.httpcomponents:httpcore:$httpcore_version"
|
|
implementation "org.apache.httpcomponents:httpclient:$httpclient_version"
|
|
implementation ("org.apache.httpcomponents:httpcore:$httpcore_version") {
|
|
exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
|
|
}
|
|
implementation ("org.apache.httpcomponents:httpmime:$httpclient_version") {
|
|
exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
|
|
}
|
|
testImplementation "junit:junit:$junit_version"
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
release(MavenPublication) {
|
|
groupId = 'org.openapitools'
|
|
artifactId = 'openapi-android-client'
|
|
version = '1.0.0'
|
|
|
|
afterEvaluate {
|
|
from components.release
|
|
}
|
|
}
|
|
}
|
|
}
|