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'
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "ru.terrakok.gitlabclient"
......@@ -53,7 +53,7 @@ android {
}
ext {
supportLibraryVersion = "27.1.0"
supportLibraryVersion = "27.1.1"
moxyVersion = "1.4.6"
toothpickVersion = "1.0.6"
retrofitVersion = "2.2.0"
......@@ -64,7 +64,7 @@ dependencies {
//Support
implementation "com.android.support:appcompat-v7:$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"
//Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
......@@ -79,31 +79,31 @@ dependencies {
implementation "com.github.stephanenicolas.toothpick:toothpick-runtime:$toothpickVersion"
kapt "com.github.stephanenicolas.toothpick:toothpick-compiler:$toothpickVersion"
//Gson
implementation "com.google.code.gson:gson:2.8.0"
implementation "com.google.code.gson:gson:2.8.2"
//Retrofit
implementation "com.squareup.retrofit2:retrofit:$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"
//RxJava
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'
//Adapter simplify
implementation "com.hannesdorfmann:adapterdelegates3:3.0.1"
//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
implementation "ru.noties:markwon:$markwonVersion"
implementation "ru.noties:markwon-image-loader:$markwonVersion"
//Bottom navigation bar
implementation 'com.aurelhubert:ahbottomnavigation:2.1.0'
//Lottie
implementation 'com.airbnb.android:lottie:2.1.0'
implementation 'com.airbnb.android:lottie:2.5.1'
//Date
implementation 'com.jakewharton.threetenabp:threetenabp:1.0.5'
//FlexBox Layout
implementation 'com.google.android:flexbox:0.3.1'
implementation 'com.google.android:flexbox:1.0.0'
//JUnit
testImplementation "junit:junit:4.12"
......
......@@ -2,13 +2,10 @@ package ru.terrakok.gitlabclient.extension
import android.content.Context
import android.content.Intent
import android.graphics.Bitmap
import android.graphics.drawable.Drawable
import android.net.Uri
import android.support.annotation.LayoutRes
import android.support.v4.app.Fragment
import android.support.v4.content.ContextCompat
import android.support.v4.graphics.drawable.RoundedBitmapDrawableFactory
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
......@@ -16,7 +13,7 @@ import android.webkit.URLUtil
import android.widget.ImageView
import android.widget.TextView
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.Screens
import ru.terrakok.gitlabclient.entity.app.target.AppTarget
......@@ -47,70 +44,64 @@ fun TextView.showTextOrHide(str: String?) {
fun Fragment.tryOpenLink(link: String?, basePath: String? = "https://google.com/search?q=") {
if (link != null) {
try {
startActivity(Intent(
startActivity(
Intent(
Intent.ACTION_VIEW,
when {
URLUtil.isValidUrl(link) -> Uri.parse(link)
else -> Uri.parse(basePath + link)
}
))
)
)
} catch (e: Exception) {
Timber.e("tryOpenLink error: $e")
startActivity(Intent(
startActivity(
Intent(
Intent.ACTION_VIEW,
Uri.parse("https://google.com/search?q=$link")
))
)
)
}
}
}
fun Fragment.shareText(text: String?) {
text?.let {
startActivity(Intent.createChooser(
startActivity(
Intent.createChooser(
Intent(Intent.ACTION_SEND).apply {
type = "text/plain"
putExtra(Intent.EXTRA_TEXT, text)
},
getString(R.string.share_to)
))
)
)
}
}
fun Fragment.sendEmail(email: String?) {
if (email != null) {
startActivity(Intent.createChooser(
startActivity(
Intent.createChooser(
Intent(Intent.ACTION_SENDTO, Uri.fromParts("mailto", email, null)),
null
))
)
)
}
}
fun ImageView.loadRoundedImage(
url: String?,
ctx: Context? = null
url: String?,
ctx: Context? = null
) {
Glide.with(ctx ?: context)
.load(url)
.asBitmap()
.centerCrop()
.into(object : BitmapImageViewTarget(this) {
override fun onLoadStarted(placeholder: Drawable?) {
setImageResource(R.drawable.default_img)
}
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)
}
}
}
})
.load(url)
.apply(RequestOptions().apply {
placeholder(R.drawable.default_img)
error(R.drawable.default_img)
})
.apply(RequestOptions.circleCropTransform())
.into(this)
}
fun TargetHeader.openInfo(router: FlowRouter) {
......@@ -124,16 +115,16 @@ fun TargetHeader.openInfo(router: FlowRouter) {
AppTarget.MERGE_REQUEST -> {
internal?.let { targetInternal ->
router.startFlow(
Screens.MR_FLOW,
Pair(targetInternal.projectId, targetInternal.targetIid)
Screens.MR_FLOW,
Pair(targetInternal.projectId, targetInternal.targetIid)
)
}
}
AppTarget.ISSUE -> {
internal?.let { targetInternal ->
router.startFlow(
Screens.ISSUE_FLOW,
Pair(targetInternal.projectId, targetInternal.targetIid)
Screens.ISSUE_FLOW,
Pair(targetInternal.projectId, targetInternal.targetIid)
)
}
}
......
buildscript {
ext.kotlinVersion = '1.2.21'
ext.kotlinVersion = '1.2.61'
repositories {
jcenter()
google()
}
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"
}
}
......
#Mon Feb 12 23:09:13 MSK 2018
#Sun Sep 02 22:20:37 MSK 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
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