2018-08-17 17:10:29 +02:00
|
|
|
plugins {
|
|
|
|
id 'java'
|
2019-07-04 11:34:33 +02:00
|
|
|
id 'org.jetbrains.kotlin.jvm' version '1.3.41'
|
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-06-15 00:57:23 +02:00
|
|
|
PUBLISH_VERSION = '0.9.3'
|
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()
|
2018-09-09 00:52:16 +02:00
|
|
|
maven { url 'https://jitpack.io' }
|
2019-01-27 20:03:16 +01:00
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
ktlint
|
2018-08-17 17:10:29 +02:00
|
|
|
}
|
|
|
|
|
2018-08-30 12:13:52 +02:00
|
|
|
ext {
|
|
|
|
jspoon = "1.3.2"
|
2019-06-10 17:53:38 +02:00
|
|
|
okhttp3 = "3.12.3"
|
2019-08-01 14:25:45 +02:00
|
|
|
retrofit = "2.6.1"
|
2019-05-15 10:27:28 +02:00
|
|
|
threetenbp = "1.4.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"
|
2018-11-13 00:07:54 +01:00
|
|
|
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
|
|
|
|
2018-09-09 00:52:16 +02:00
|
|
|
implementation "com.github.jonyas:RxJava2Reauth:72abb94"
|
|
|
|
|
2019-04-18 01:47:16 +02:00
|
|
|
compileOnly "org.threeten:threetenbp:$threetenbp:no-tzdb"
|
|
|
|
testImplementation "org.threeten:threetenbp:$threetenbp"
|
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"
|
2019-07-23 13:30:01 +02:00
|
|
|
ktlint "com.pinterest:ktlint:0.34.2"
|
2019-01-27 20:03:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
task ktlint(type: JavaExec, group: "verification") {
|
|
|
|
description = "Check Kotlin code style."
|
|
|
|
classpath = configurations.ktlint
|
2019-04-23 10:38:34 +02:00
|
|
|
main = "com.pinterest.ktlint.Main"
|
2019-01-27 20:03:16 +01:00
|
|
|
args "src/**/*.kt"
|
|
|
|
// to generate report in checkstyle format prepend following args:
|
|
|
|
// "--reporter=plain", "--reporter=checkstyle,output=${buildDir}/ktlint.xml"
|
2019-04-23 10:38:34 +02:00
|
|
|
// see https://github.com/pinterest/ktlint#usage for more
|
2019-01-27 20:03:16 +01:00
|
|
|
}
|
|
|
|
check.dependsOn ktlint
|
|
|
|
|
|
|
|
task ktlintFormat(type: JavaExec, group: "formatting") {
|
|
|
|
description = "Fix Kotlin code style deviations."
|
|
|
|
classpath = configurations.ktlint
|
2019-04-23 10:38:34 +02:00
|
|
|
main = "com.pinterest.ktlint.Main"
|
2019-01-27 20:03:16 +01:00
|
|
|
args "-F", "src/**/*.kt"
|
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'
|
2019-05-29 18:00:00 +02:00
|
|
|
name 'Scraping API for VULCAN UONET+'
|
2018-12-16 18:10:29 +01:00
|
|
|
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
|
|
|
|
}
|