Move sources to api module
This commit is contained in:
parent
5de412b6c0
commit
7209783ff4
217 changed files with 168 additions and 157 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -25,8 +25,8 @@ hs_err_pid*
|
|||
.idea/
|
||||
!.idea/codeStyles/
|
||||
.gradle
|
||||
/build/
|
||||
/out/
|
||||
build/
|
||||
out/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
|
160
api/build.gradle
Normal file
160
api/build.gradle
Normal file
|
@ -0,0 +1,160 @@
|
|||
plugins {
|
||||
id 'java'
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.3.50'
|
||||
id 'jacoco'
|
||||
id 'com.jfrog.bintray' version '1.8.4'
|
||||
id 'com.github.dcendents.android-maven' version '2.1'
|
||||
}
|
||||
|
||||
ext {
|
||||
PUBLISH_VERSION = '0.12.0'
|
||||
SITE_URL = 'https://github.com/wulkanowy/api'
|
||||
GIT_URL = 'https://github.com/wulkanowy/api.git'
|
||||
}
|
||||
|
||||
group 'io.github.wulkanowy'
|
||||
version PUBLISH_VERSION
|
||||
|
||||
sourceCompatibility = 1.6
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://jitpack.io' }
|
||||
jcenter()
|
||||
}
|
||||
|
||||
configurations {
|
||||
ktlint
|
||||
}
|
||||
|
||||
ext {
|
||||
jspoon = "1.3.2"
|
||||
okhttp3 = "3.12.6"
|
||||
retrofit = "2.6.2"
|
||||
threetenbp = "1.4.0"
|
||||
slf4j = "1.7.29"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
|
||||
implementation "pl.droidsonroids:jspoon:$jspoon"
|
||||
implementation "pl.droidsonroids.retrofit2:converter-jspoon:$jspoon"
|
||||
implementation "com.squareup.retrofit2:converter-gson:$retrofit"
|
||||
|
||||
implementation "com.squareup.retrofit2:retrofit:$retrofit"
|
||||
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofit"
|
||||
implementation "com.squareup.retrofit2:converter-scalars:$retrofit"
|
||||
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp3"
|
||||
implementation "com.squareup.okhttp3:okhttp-urlconnection:$okhttp3"
|
||||
|
||||
implementation "com.github.jonyas:RxJava2Reauth:master"
|
||||
|
||||
implementation "org.slf4j:slf4j-api:$slf4j"
|
||||
testImplementation "org.slf4j:slf4j-simple:$slf4j"
|
||||
|
||||
compileOnly "org.threeten:threetenbp:$threetenbp:no-tzdb"
|
||||
testImplementation "org.threeten:threetenbp:$threetenbp"
|
||||
|
||||
testImplementation "com.squareup.okhttp3:mockwebserver:$okhttp3"
|
||||
testImplementation "junit:junit:4.12"
|
||||
ktlint "com.pinterest:ktlint:0.35.0"
|
||||
}
|
||||
|
||||
task ktlint(type: JavaExec, group: "verification") {
|
||||
description = "Check Kotlin code style."
|
||||
classpath = configurations.ktlint
|
||||
main = "com.pinterest.ktlint.Main"
|
||||
args "src/**/*.kt"
|
||||
// to generate report in checkstyle format prepend following args:
|
||||
// "--reporter=plain", "--reporter=checkstyle,output=${buildDir}/ktlint.xml"
|
||||
// see https://github.com/pinterest/ktlint#usage for more
|
||||
}
|
||||
check.dependsOn ktlint
|
||||
|
||||
task ktlintFormat(type: JavaExec, group: "formatting") {
|
||||
description = "Fix Kotlin code style deviations."
|
||||
classpath = configurations.ktlint
|
||||
main = "com.pinterest.ktlint.Main"
|
||||
args "-F", "src/**/*.kt"
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.jvmTarget = "1.6"
|
||||
}
|
||||
compileTestKotlin {
|
||||
kotlinOptions.jvmTarget = "1.6"
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
reports {
|
||||
xml.enabled true
|
||||
}
|
||||
}
|
||||
|
||||
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 'Scraping API for VULCAN UONET+'
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue