Commit 7cdb3aed authored by Konstantin Tskhovrebov's avatar Konstantin Tskhovrebov 🤖

Update libaries and plugins version.

parent 1606dadd
...@@ -6,7 +6,7 @@ apply from: '../ci.gradle' ...@@ -6,7 +6,7 @@ apply from: '../ci.gradle'
android { android {
compileSdkVersion 27 compileSdkVersion 27
buildToolsVersion '27.0.3' buildToolsVersion '28.0.2'
defaultConfig { defaultConfig {
applicationId "ru.terrakok.gitlabclient" applicationId "ru.terrakok.gitlabclient"
...@@ -53,7 +53,7 @@ android { ...@@ -53,7 +53,7 @@ android {
} }
ext { ext {
supportLibraryVersion = "27.1.0" supportLibraryVersion = "27.1.1"
moxyVersion = "1.4.6" moxyVersion = "1.4.6"
toothpickVersion = "1.0.6" toothpickVersion = "1.0.6"
retrofitVersion = "2.2.0" retrofitVersion = "2.2.0"
...@@ -64,7 +64,7 @@ dependencies { ...@@ -64,7 +64,7 @@ dependencies {
//Support //Support
implementation "com.android.support:appcompat-v7:$supportLibraryVersion" implementation "com.android.support:appcompat-v7:$supportLibraryVersion"
implementation "com.android.support:design:$supportLibraryVersion" implementation "com.android.support:design:$supportLibraryVersion"
implementation "com.android.support.constraint:constraint-layout:1.0.2" implementation "com.android.support.constraint:constraint-layout:1.1.3"
implementation "com.android.support:cardview-v7:$supportLibraryVersion" implementation "com.android.support:cardview-v7:$supportLibraryVersion"
//Kotlin //Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
...@@ -79,31 +79,31 @@ dependencies { ...@@ -79,31 +79,31 @@ dependencies {
implementation "com.github.stephanenicolas.toothpick:toothpick-runtime:$toothpickVersion" implementation "com.github.stephanenicolas.toothpick:toothpick-runtime:$toothpickVersion"
kapt "com.github.stephanenicolas.toothpick:toothpick-compiler:$toothpickVersion" kapt "com.github.stephanenicolas.toothpick:toothpick-compiler:$toothpickVersion"
//Gson //Gson
implementation "com.google.code.gson:gson:2.8.0" implementation "com.google.code.gson:gson:2.8.2"
//Retrofit //Retrofit
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion" implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.okhttp3:logging-interceptor:3.6.0" implementation "com.squareup.okhttp3:logging-interceptor:3.11.0"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion" implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
//RxJava //RxJava
implementation "io.reactivex.rxjava2:rxandroid:2.0.1" implementation "io.reactivex.rxjava2:rxandroid:2.0.1"
implementation "io.reactivex.rxjava2:rxjava:2.1.0" implementation "io.reactivex.rxjava2:rxjava:2.2.0"
implementation 'com.jakewharton.rxrelay2:rxrelay:2.0.0' implementation 'com.jakewharton.rxrelay2:rxrelay:2.0.0'
//Adapter simplify //Adapter simplify
implementation "com.hannesdorfmann:adapterdelegates3:3.0.1" implementation "com.hannesdorfmann:adapterdelegates3:3.0.1"
//Image load and cache //Image load and cache
implementation "com.github.bumptech.glide:glide:3.8.0" implementation "com.github.bumptech.glide:glide:4.7.1"
//Markdown to HTML converter //Markdown to HTML converter
implementation "ru.noties:markwon:$markwonVersion" implementation "ru.noties:markwon:$markwonVersion"
implementation "ru.noties:markwon-image-loader:$markwonVersion" implementation "ru.noties:markwon-image-loader:$markwonVersion"
//Bottom navigation bar //Bottom navigation bar
implementation 'com.aurelhubert:ahbottomnavigation:2.1.0' implementation 'com.aurelhubert:ahbottomnavigation:2.1.0'
//Lottie //Lottie
implementation 'com.airbnb.android:lottie:2.1.0' implementation 'com.airbnb.android:lottie:2.5.1'
//Date //Date
implementation 'com.jakewharton.threetenabp:threetenabp:1.0.5' implementation 'com.jakewharton.threetenabp:threetenabp:1.0.5'
//FlexBox Layout //FlexBox Layout
implementation 'com.google.android:flexbox:0.3.1' implementation 'com.google.android:flexbox:1.0.0'
//JUnit //JUnit
testImplementation "junit:junit:4.12" testImplementation "junit:junit:4.12"
......
...@@ -2,13 +2,10 @@ package ru.terrakok.gitlabclient.extension ...@@ -2,13 +2,10 @@ package ru.terrakok.gitlabclient.extension
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.graphics.Bitmap
import android.graphics.drawable.Drawable
import android.net.Uri import android.net.Uri
import android.support.annotation.LayoutRes import android.support.annotation.LayoutRes
import android.support.v4.app.Fragment import android.support.v4.app.Fragment
import android.support.v4.content.ContextCompat import android.support.v4.content.ContextCompat
import android.support.v4.graphics.drawable.RoundedBitmapDrawableFactory
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
...@@ -16,7 +13,7 @@ import android.webkit.URLUtil ...@@ -16,7 +13,7 @@ import android.webkit.URLUtil
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import com.bumptech.glide.Glide import com.bumptech.glide.Glide
import com.bumptech.glide.request.target.BitmapImageViewTarget import com.bumptech.glide.request.RequestOptions
import ru.terrakok.gitlabclient.R import ru.terrakok.gitlabclient.R
import ru.terrakok.gitlabclient.Screens import ru.terrakok.gitlabclient.Screens
import ru.terrakok.gitlabclient.entity.app.target.AppTarget import ru.terrakok.gitlabclient.entity.app.target.AppTarget
...@@ -47,70 +44,64 @@ fun TextView.showTextOrHide(str: String?) { ...@@ -47,70 +44,64 @@ fun TextView.showTextOrHide(str: String?) {
fun Fragment.tryOpenLink(link: String?, basePath: String? = "https://google.com/search?q=") { fun Fragment.tryOpenLink(link: String?, basePath: String? = "https://google.com/search?q=") {
if (link != null) { if (link != null) {
try { try {
startActivity(Intent( startActivity(
Intent(
Intent.ACTION_VIEW, Intent.ACTION_VIEW,
when { when {
URLUtil.isValidUrl(link) -> Uri.parse(link) URLUtil.isValidUrl(link) -> Uri.parse(link)
else -> Uri.parse(basePath + link) else -> Uri.parse(basePath + link)
} }
)) )
)
} catch (e: Exception) { } catch (e: Exception) {
Timber.e("tryOpenLink error: $e") Timber.e("tryOpenLink error: $e")
startActivity(Intent( startActivity(
Intent(
Intent.ACTION_VIEW, Intent.ACTION_VIEW,
Uri.parse("https://google.com/search?q=$link") Uri.parse("https://google.com/search?q=$link")
)) )
)
} }
} }
} }
fun Fragment.shareText(text: String?) { fun Fragment.shareText(text: String?) {
text?.let { text?.let {
startActivity(Intent.createChooser( startActivity(
Intent.createChooser(
Intent(Intent.ACTION_SEND).apply { Intent(Intent.ACTION_SEND).apply {
type = "text/plain" type = "text/plain"
putExtra(Intent.EXTRA_TEXT, text) putExtra(Intent.EXTRA_TEXT, text)
}, },
getString(R.string.share_to) getString(R.string.share_to)
)) )
)
} }
} }
fun Fragment.sendEmail(email: String?) { fun Fragment.sendEmail(email: String?) {
if (email != null) { if (email != null) {
startActivity(Intent.createChooser( startActivity(
Intent.createChooser(
Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", email, null)), Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", email, null)),
null null
)) )
)
} }
} }
fun ImageView.loadRoundedImage( fun ImageView.loadRoundedImage(
url: String?, url: String?,
ctx: Context? = null ctx: Context? = null
) { ) {
Glide.with(ctx ?: context) Glide.with(ctx ?: context)
.load(url) .load(url)
.asBitmap() .apply(RequestOptions().apply {
.centerCrop() placeholder(R.drawable.default_img)
.into(object : BitmapImageViewTarget(this) { error(R.drawable.default_img)
override fun onLoadStarted(placeholder: Drawable?) { })
setImageResource(R.drawable.default_img) .apply(RequestOptions.circleCropTransform())
} .into(this)
override fun onLoadFailed(e: java.lang.Exception?, errorDrawable: Drawable?) {
setImageResource(R.drawable.default_img)
}
override fun setResource(resource: Bitmap?) {
resource?.let {
RoundedBitmapDrawableFactory.create(view.resources, it).run {
this.isCircular = true
setImageDrawable(this)
}
}
}
})
} }
fun TargetHeader.openInfo(router: FlowRouter) { fun TargetHeader.openInfo(router: FlowRouter) {
...@@ -124,16 +115,16 @@ fun TargetHeader.openInfo(router: FlowRouter) { ...@@ -124,16 +115,16 @@ fun TargetHeader.openInfo(router: FlowRouter) {
AppTarget.MERGE_REQUEST -> { AppTarget.MERGE_REQUEST -> {
internal?.let { targetInternal -> internal?.let { targetInternal ->
router.startFlow( router.startFlow(
Screens.MR_FLOW, Screens.MR_FLOW,
Pair(targetInternal.projectId, targetInternal.targetIid) Pair(targetInternal.projectId, targetInternal.targetIid)
) )
} }
} }
AppTarget.ISSUE -> { AppTarget.ISSUE -> {
internal?.let { targetInternal -> internal?.let { targetInternal ->
router.startFlow( router.startFlow(
Screens.ISSUE_FLOW, Screens.ISSUE_FLOW,
Pair(targetInternal.projectId, targetInternal.targetIid) Pair(targetInternal.projectId, targetInternal.targetIid)
) )
} }
} }
......
buildscript { buildscript {
ext.kotlinVersion = '1.2.21' ext.kotlinVersion = '1.2.61'
repositories { repositories {
jcenter() jcenter()
google() google()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-alpha04' classpath 'com.android.tools.build:gradle:3.3.0-alpha08'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
} }
} }
......
#Mon Feb 12 23:09:13 MSK 2018 #Sun Sep 02 22:20:37 MSK 2018
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment