Skip to content

Commit

Permalink
update gradle
Browse files Browse the repository at this point in the history
Signed-off-by: michaelgirgis <[email protected]>
  • Loading branch information
Mycoola committed Jul 2, 2020
1 parent 63ae75d commit 26cd383
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 62 deletions.
62 changes: 31 additions & 31 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '29.0.2'
buildToolsVersion '30.0.0 rc2'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand All @@ -55,52 +55,52 @@ dependencies {
implementation 'androidx.multidex:multidex:2.0.1'

implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
implementation 'androidx.room:room-runtime:2.2.3'
annotationProcessor 'androidx.room:room-compiler:2.2.3'
testImplementation 'androidx.room:room-testing:2.2.3'

implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0-rc03'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0-rc03'
implementation 'androidx.lifecycle:lifecycle-reactivestreams:2.2.0-rc03'
implementation 'androidx.appcompat:appcompat:1.3.0-alpha01'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta7'
implementation 'androidx.room:room-runtime:2.2.5'
annotationProcessor 'androidx.room:room-compiler:2.2.5'
testImplementation 'androidx.room:room-testing:2.2.5'

implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0'
implementation 'androidx.lifecycle:lifecycle-reactivestreams-ktx:2.2.0'
testImplementation 'androidx.arch.core:core-testing:2.1.0'

implementation 'com.google.android.gms:play-services-maps:17.0.0'

implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha01'
implementation 'com.google.android.material:material:1.2.0-alpha03'
implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha04'
implementation 'com.google.android.material:material:1.3.0-alpha01'


implementation 'com.google.firebase:firebase-core:17.2.1'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation 'com.google.firebase:firebase-messaging:20.1.0'
implementation 'com.google.firebase:firebase-auth:19.2.0'
implementation 'com.google.firebase:firebase-core:17.4.3'
implementation 'com.google.firebase:firebase-auth:19.3.1'
implementation 'com.google.firebase:firebase-database:19.3.1'
implementation 'com.google.firebase:firebase-messaging:20.2.1'
implementation 'com.google.firebase:firebase-auth:19.3.1'


implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
implementation 'com.google.android.material:material:1.2.0-alpha03'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta7'
implementation 'com.google.android.material:material:1.3.0-alpha01'

// architecture components
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0-rc03'
implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0-rc03'
implementation 'androidx.room:room-runtime:2.2.3'
implementation 'androidx.paging:paging-runtime:2.1.1'
kapt 'androidx.room:room-compiler:2.2.3'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0'
implementation 'androidx.room:room-runtime:2.2.5'
implementation 'androidx.paging:paging-runtime-ktx:2.1.2'
kapt 'androidx.room:room-compiler:2.2.5'

// retrofit
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
implementation 'com.squareup.retrofit2:retrofit-mock:2.7.1'
implementation 'com.squareup.okhttp3:logging-interceptor:4.3.1'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:retrofit-mock:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.7.2'

// testing
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test:runner:1.3.0-alpha03'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha03'
androidTestImplementation 'androidx.test:runner:1.3.0-rc01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-rc01'


}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0-alpha08'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61'
classpath 'com.android.tools.build:gradle:4.2.0-alpha03'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72'
classpath 'com.google.gms:google-services:4.3.3'

// NOTE: Do not place your application dependencies here; they belong
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Jan 14 12:45:38 EET 2020
#Thu Jul 02 02:20:42 EET 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-rc-1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-rc-1-all.zip
35 changes: 19 additions & 16 deletions liband/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '29.0.2'
buildToolsVersion '29.0.3'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand All @@ -36,32 +36,35 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0-alpha02'
implementation 'com.google.android.material:material:1.2.0-alpha04'
implementation 'androidx.appcompat:appcompat:1.3.0-alpha01'
implementation 'com.google.android.material:material:1.3.0-alpha01'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta7'

implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp:okhttp:2.7.5'
implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.7.1'
implementation 'com.squareup.okhttp3:logging-interceptor:4.3.1'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:adapter-rxjava:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.7.2'

implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.intuit.ssp:ssp-android:1.0.6'
implementation 'androidx.room:room-runtime:2.2.3'
implementation 'androidx.room:room-runtime:2.2.5'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha01'
implementation 'com.google.android.gms:play-services-base:17.1.0'
implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha04'
implementation 'com.google.android.gms:play-services-base:17.3.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
annotationProcessor 'androidx.room:room-compiler:2.2.3'

implementation 'androidx.preference:preference-ktx:1.1.1'

annotationProcessor 'androidx.room:room-compiler:2.2.5'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
testImplementation 'junit:junit:4.13'
testImplementation 'androidx.room:room-testing:2.2.3'
androidTestImplementation 'androidx.test:runner:1.3.0-alpha03'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha03'
testImplementation 'androidx.room:room-testing:2.2.5'
androidTestImplementation 'androidx.test:runner:1.3.0-rc01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-rc01'
}
repositories {
mavenCentral()
Expand Down
5 changes: 2 additions & 3 deletions liband/src/main/java/com/liband/interfaces/ApiCallback.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.liband.interfaces

import java.util.*


interface ApiCallback<T> : FailureListener {
fun onSuccess(resultList: ArrayList<T>) {}
interface ApiCallback<Any> : FailureListener {
fun onSuccess(resultList: ArrayList<Any>) {}

}
6 changes: 2 additions & 4 deletions liband/src/main/java/com/liband/utils/DateUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,9 @@ object DateUtil {
val parts = Date.split("-".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()
if (parts.size == 3) {
val year: Int = Integer.parseInt(parts[2])
val month: Int
val day: Int

month = Integer.parseInt(parts[1])
day = Integer.parseInt(parts[0])
val month: Int = Integer.parseInt(parts[1])
val day: Int = Integer.parseInt(parts[0])
return intArrayOf(year, month, day)
}
return null
Expand Down
7 changes: 3 additions & 4 deletions liband/src/main/java/com/liband/utils/LocaleHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package com.liband.utils
import android.annotation.TargetApi
import android.content.Context
import android.os.Build
import android.preference.PreferenceManager
import androidx.preference.PreferenceManager
import java.util.*


object LocaleHelper {

private val SELECTED_LANGUAGE = "Locale.Helper.Selected.Language"
private const val SELECTED_LANGUAGE = "Locale.Helper.Selected.Language"

fun onAttach(context: Context): Context {
val lang = getPersistedData(context, Locale.getDefault().language)
Expand Down Expand Up @@ -59,15 +59,14 @@ object LocaleHelper {
return context.createConfigurationContext(configuration)
}

@SuppressWarnings("deprecation")
private fun updateResourcesLegacy(context: Context, language: String?): Context {
val locale = Locale(language)
Locale.setDefault(locale)

val resources = context.resources

val configuration = resources.configuration
configuration.locale = locale
configuration.setLocale(locale)
configuration.setLayoutDirection(locale)

resources.updateConfiguration(configuration, resources.displayMetrics)
Expand Down

0 comments on commit 26cd383

Please sign in to comment.