31cf7ae19b
Bumps [ktlint](https://github.com/shyiko/ktlint) from 0.30.0 to 0.31.0. <details> <summary>Release notes</summary> *Sourced from [ktlint's releases](https://github.com/shyiko/ktlint/releases).* > ## 0.31.0 > ### Added > - `dot-spacing` rule ([#293](https://github-redirect.dependabot.com/shyiko/ktlint/issues/293)). > - `experimental/indent` rule ([#338](https://github-redirect.dependabot.com/shyiko/ktlint/issues/338)). > Use `ktlint --experimental` to enable. > > ### Fixed > - Spacing check around `<` & `>` operators. > > ### Changed > - `no-multi-spaces` rule (horizontal alignment of comments is no longer allowed) ([#269](https://github-redirect.dependabot.com/shyiko/ktlint/issues/269)). > - `colon-spacing` rule (`:` must not appear at the beginning of the line). > - `package-name` rule (disabled until [#208](https://github-redirect.dependabot.com/shyiko/ktlint/issues/208) is resolved). > - `--print-ast` to output [com.github.shyiko.ktlint.core.ast.ElementType.*](https://github.com/shyiko/ktlint/blob/master/ktlint-core/src/main/kotlin/com/github/shyiko/ktlint/core/ast/ElementType.kt) as `node.elementType`, e.g. > ``` > $ echo 'fun f() {}' | ./ktlint/target/ktlint --print-ast --color --stdin > 1: ~.psi.KtFile (FILE) > 1: ~.psi.KtPackageDirective (PACKAGE_DIRECTIVE) "" > 1: ~.psi.KtImportList (IMPORT_LIST) "" > 1: ~.psi.KtScript (SCRIPT) > 1: ~.psi.KtBlockExpression (BLOCK) > 1: ~.psi.KtNamedFunction (FUN) > 1: ~.c.i.p.impl.source.tree.LeafPsiElement (FUN_KEYWORD) "fun" > 1: ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) " " > 1: ~.c.i.p.impl.source.tree.LeafPsiElement (IDENTIFIER) "f" > 1: ~.psi.KtParameterList (VALUE_PARAMETER_LIST) > 1: ~.c.i.p.impl.source.tree.LeafPsiElement (LPAR) "(" > 1: ~.c.i.p.impl.source.tree.LeafPsiElement (RPAR) ")" > 1: ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) " " > 1: ~.psi.KtBlockExpression (BLOCK) > 1: ~.c.i.p.impl.source.tree.LeafPsiElement (LBRACE) "{" > 1: ~.c.i.p.impl.source.tree.LeafPsiElement (RBRACE) "}" > 1: ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) "\n" > > format: <line_number:> <node.psi::class> (<node.elementType>) "<node.text>" > legend: ~ = org.jetbrains.kotlin, c.i.p = com.intellij.psi > ``` > > - `kotlin-compiler` version to 1.3.21 (from 1.3.20). > > ### Removed > - Dependency on JCenter ([#349](https://github-redirect.dependabot.com/shyiko/ktlint/issues/349)). </details> <details> <summary>Changelog</summary> *Sourced from [ktlint's changelog](https://github.com/shyiko/ktlint/blob/master/CHANGELOG.md).* > ## [0.31.0] - 2019-03-10 > > ### Added > - `dot-spacing` rule ([#293](https://github-redirect.dependabot.com/shyiko/ktlint/issues/293)). > - `experimental/indent` rule ([#338](https://github-redirect.dependabot.com/shyiko/ktlint/issues/338)). > Use `ktlint --experimental` to enable. > > ### Fixed > - Spacing check around `<` & `>` operators. > > ### Changed > - `no-multi-spaces` rule (horizontal alignment of comments is no longer allowed) ([#269](https://github-redirect.dependabot.com/shyiko/ktlint/issues/269)). > - `colon-spacing` rule (`:` must not appear at the beginning of the line). > - `package-name` rule (disabled until [#208](https://github-redirect.dependabot.com/shyiko/ktlint/issues/208) is resolved). > - `--print-ast` to output [com.github.shyiko.ktlint.core.ast.ElementType.*](https://github.com/shyiko/ktlint/blob/master/ktlint-core/src/main/kotlin/com/github/shyiko/ktlint/core/ast/ElementType.kt) as `node.elementType`, e.g. > ``` > $ echo 'fun f() {}' | ./ktlint/target/ktlint --print-ast --color --stdin > 1: ~.psi.KtFile (FILE) > 1: ~.psi.KtPackageDirective (PACKAGE_DIRECTIVE) "" > 1: ~.psi.KtImportList (IMPORT_LIST) "" > 1: ~.psi.KtScript (SCRIPT) > 1: ~.psi.KtBlockExpression (BLOCK) > 1: ~.psi.KtNamedFunction (FUN) > 1: ~.c.i.p.impl.source.tree.LeafPsiElement (FUN_KEYWORD) "fun" > 1: ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) " " > 1: ~.c.i.p.impl.source.tree.LeafPsiElement (IDENTIFIER) "f" > 1: ~.psi.KtParameterList (VALUE_PARAMETER_LIST) > 1: ~.c.i.p.impl.source.tree.LeafPsiElement (LPAR) "(" > 1: ~.c.i.p.impl.source.tree.LeafPsiElement (RPAR) ")" > 1: ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) " " > 1: ~.psi.KtBlockExpression (BLOCK) > 1: ~.c.i.p.impl.source.tree.LeafPsiElement (LBRACE) "{" > 1: ~.c.i.p.impl.source.tree.LeafPsiElement (RBRACE) "}" > 1: ~.c.i.p.impl.source.tree.PsiWhiteSpaceImpl (WHITE_SPACE) "\n" > > format: <line_number:> <node.psi::class> (<node.elementType>) "<node.text>" > legend: ~ = org.jetbrains.kotlin, c.i.p = com.intellij.psi > ``` > > - `kotlin-compiler` version to 1.3.21 (from 1.3.20). > > ### Removed > - Dependency on JCenter ([#349](https://github-redirect.dependabot.com/shyiko/ktlint/issues/349)). </details> <details> <summary>Commits</summary> - [`fb31f9f`](fb31f9f497
) Updated refs to latest (0.31.0) release - [`e8cdf60`](e8cdf60a7b
) Bumped ktlint to 0.31.0 (ktlint-ruleset-template) - [`abc2880`](abc2880637
) Added 0.31.0 release notes - [`a606d80`](a606d80377
) Removed isPartOfRawMultiLineString from core.ast - [`fcc2ff7`](fcc2ff7aff
) Forced open quotes (of multi-line raw string) to be a separate line - [`cdf93a9`](cdf93a9943
) Fixed indentation of EQ COMMENT LF BLOCK - [`8def3c8`](8def3c8531
) Fixed : indentation when put on a separate line - [`fe2f5ee`](fe2f5eec60
) Changed colon-spacing rule to remove newline between colon and prev element - [`8e4d16e`](8e4d16eca7
) Fixed spacing check around <,> op - [`b91ae6c`](b91ae6c4a3
) Enabled --experimental ruleset as part of Maven verify phase - Additional commits viewable in [compare view](https://github.com/shyiko/ktlint/compare/0.30.0...0.31.0) </details> <br /> [![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=com.github.shyiko:ktlint&package-manager=gradle&previous-version=0.30.0&new-version=0.31.0)](https://dependabot.com/compatibility-score.html?dependency-name=com.github.shyiko:ktlint&package-manager=gradle&previous-version=0.30.0&new-version=0.31.0) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Automerge options (never/patch/minor, and dev/runtime dependencies) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) Finally, you can contact us by mentioning @dependabot. </details>
154 lines
3.9 KiB
Groovy
154 lines
3.9 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'org.jetbrains.kotlin.jvm' version '1.3.20'
|
|
id 'jacoco'
|
|
id 'com.jfrog.bintray' version '1.8.4'
|
|
id 'com.github.dcendents.android-maven' version '2.1'
|
|
}
|
|
|
|
ext {
|
|
PUBLISH_VERSION = '0.6.6'
|
|
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.1"
|
|
retrofit = "2.5.0"
|
|
}
|
|
|
|
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:72abb94"
|
|
|
|
implementation "org.threeten:threetenbp:1.3.8"
|
|
|
|
testImplementation "com.squareup.okhttp3:mockwebserver:$okhttp3"
|
|
testImplementation "junit:junit:4.12"
|
|
ktlint "com.github.shyiko:ktlint:0.31.0"
|
|
}
|
|
|
|
task ktlint(type: JavaExec, group: "verification") {
|
|
description = "Check Kotlin code style."
|
|
classpath = configurations.ktlint
|
|
main = "com.github.shyiko.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/shyiko/ktlint#usage for more
|
|
}
|
|
check.dependsOn ktlint
|
|
|
|
task ktlintFormat(type: JavaExec, group: "formatting") {
|
|
description = "Fix Kotlin code style deviations."
|
|
classpath = configurations.ktlint
|
|
main = "com.github.shyiko.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 '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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|