apps-android-commons/data-client/build.gradle
2020-04-20 13:39:04 +03:00

147 lines
4 KiB
Groovy

buildscript {
ext.kotlin_version = '1.3.31'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id "com.jfrog.bintray" version "1.7.3"
}
allprojects {
repositories {
google()
jcenter()
}
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
}
version = "${VERSION_NAME}"
group = "${GROUP_ID}"
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "${VERSION_NAME}"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
dependencies {
String retrofitVersion = '2.4.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.core:core:1.0.2"
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
implementation "io.reactivex.rxjava2:rxjava:2.2.3"
implementation "io.reactivex.rxjava2:rxandroid:2.1.0"
implementation 'org.apache.commons:commons-lang3:3.8.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.8.9'
testImplementation 'org.robolectric:robolectric:3.8'
testImplementation "com.squareup.okhttp3:mockwebserver:3.12.1"
testImplementation "commons-io:commons-io:2.6"
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
artifacts {
archives sourcesJar
}
Properties properties = new Properties()
if ( project.rootProject.file('local.properties').isFile() ) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}
bintray {
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
println 'Bintray user: ' + user
configurations = ['archives']
pkg {
repo = 'maven'
name = "${ARTIFACT_ID}"
vcsUrl = 'https://github.com/wikimedia/wikimedia-android-data-client.git'
licenses = ['Apache-2.0']
version {
name = "${VERSION_NAME}"
}
publish = true
}
}
install {
repositories.mavenInstaller {
// This generates POM.xml with proper parameters
pom {
project {
packaging 'aar'
name "${ARTIFACT_ID}"
artifactId "${ARTIFACT_ID}"
description 'Android library for accessing the Wikimedia APIs.'
url 'https://github.com/wikimedia/wikimedia-android-data-client'
inceptionYear '2019'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'dmitrybrant'
name 'Dmitry Brant'
email 'me@dmitrybrant.com'
}
}
}
}
}
}
repositories {
mavenCentral()
}