sdk/build.gradle

131 lines
3.2 KiB
Groovy
Raw Normal View History

2018-08-17 17:10:29 +02:00
plugins {
id 'java'
2019-01-25 21:21:57 +01:00
id 'org.jetbrains.kotlin.jvm' version '1.3.20'
2018-08-20 21:10:40 +02:00
id 'jacoco'
2018-12-16 18:10:29 +01:00
id 'com.jfrog.bintray' version '1.8.4'
id 'com.github.dcendents.android-maven' version '2.1'
}
ext {
2019-01-25 21:25:22 +01:00
PUBLISH_VERSION = '0.6.6'
2018-12-16 18:10:29 +01:00
SITE_URL = 'https://github.com/wulkanowy/api'
GIT_URL = 'https://github.com/wulkanowy/api.git'
2018-08-17 17:10:29 +02:00
}
group 'io.github.wulkanowy'
2018-12-16 18:10:29 +01:00
version PUBLISH_VERSION
2018-08-17 17:10:29 +02:00
2019-01-25 21:21:57 +01:00
sourceCompatibility = 1.6
2018-08-17 17:10:29 +02:00
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
2018-08-17 17:10:29 +02:00
}
2018-08-30 12:13:52 +02:00
ext {
jspoon = "1.3.2"
okhttp3 = "3.12.1"
retrofit = "2.5.0"
2018-08-30 12:13:52 +02:00
}
2018-08-17 17:10:29 +02:00
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
2018-08-30 12:13:52 +02:00
implementation "pl.droidsonroids:jspoon:$jspoon"
implementation "pl.droidsonroids.retrofit2:converter-jspoon:$jspoon"
2018-08-31 21:41:53 +02:00
implementation "com.squareup.retrofit2:converter-gson:$retrofit"
2018-08-17 17:10:29 +02:00
2018-08-30 12:13:52 +02:00
implementation "com.squareup.retrofit2:retrofit:$retrofit"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit"
implementation "com.squareup.retrofit2:converter-scalars:$retrofit"
2018-08-30 12:13:52 +02:00
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp3"
implementation "com.squareup.okhttp3:okhttp-urlconnection:$okhttp3"
2018-08-17 17:10:29 +02:00
implementation "com.github.jonyas:RxJava2Reauth:72abb94"
implementation "org.threeten:threetenbp:1.3.8"
2018-09-30 11:55:30 +02:00
2018-08-30 12:13:52 +02:00
testImplementation "com.squareup.okhttp3:mockwebserver:$okhttp3"
2018-08-31 21:41:53 +02:00
testImplementation "junit:junit:4.12"
2018-08-17 17:10:29 +02:00
}
compileKotlin {
2019-01-25 21:21:57 +01:00
kotlinOptions.jvmTarget = "1.6"
2018-08-17 17:10:29 +02:00
}
compileTestKotlin {
2019-01-25 21:21:57 +01:00
kotlinOptions.jvmTarget = "1.6"
2018-08-17 17:10:29 +02:00
}
2018-08-20 21:15:53 +02:00
jacocoTestReport {
reports {
xml.enabled true
}
}
2018-08-25 19:10:16 +02:00
2018-12-16 18:10:29 +01:00
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
configurations = ['archives']
pkg {
repo = 'wulkanowy'
name = 'api'
userOrg = 'wulkanowy'
licenses = ['Apache-2.0']
vcsUrl = GIT_URL
labels = ['aar', 'wulkanowy', 'api']
publicDownloadNumbers = true
publish = true
version {
name = PUBLISH_VERSION
vcsTag = PUBLISH_VERSION
released = new Date()
}
}
}
install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
name 'Bintray publish Gradle aar'
url SITE_URL
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'mklkj'
name 'Mikołaj Pich'
email 'm.pich@outlook.com'
}
}
scm {
connection GIT_URL
developerConnection GIT_URL
url SITE_URL
}
}
}
}
}
2018-08-25 19:10:16 +02:00
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}