Skip to content

Commit 5a75231

Browse files
Fixes #119: dependency upgrade and optimisation
1 parent 72977e5 commit 5a75231

File tree

6 files changed

+30
-31
lines changed

6 files changed

+30
-31
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
with:
1414
java-version: 1.8
1515

16+
- name: Creating local.properties
17+
run: echo 'API_KEY="replace this with your api key"' > local.properties
18+
1619
- name: Run test
1720
run: ./gradlew test
1821

apikey.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/build.gradle

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
}
88

99
Properties properties = new Properties()
10-
properties.load(project.rootProject.file('apikey.properties').newDataInputStream())
10+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
1111
def apiKey = properties.getProperty('API_KEY')
1212

1313
android {
@@ -19,7 +19,7 @@ android {
1919
minSdkVersion 24
2020
targetSdkVersion 30
2121
versionCode 1
22-
versionName "1.0"
22+
versionName "1.0.0"
2323

2424
buildConfigField "String", "API_KEY", apiKey
2525

@@ -48,14 +48,15 @@ android {
4848
dependencies {
4949

5050
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$versions.kotlin"
51-
implementation 'androidx.core:core-ktx:1.5.0'
52-
implementation 'androidx.appcompat:appcompat:1.3.0'
53-
implementation 'com.google.android.material:material:1.3.0'
54-
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
55-
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
56-
testImplementation 'junit:junit:4.13.2'
57-
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
58-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
51+
implementation "androidx.core:core-ktx:$versions.coreKtx"
52+
implementation "androidx.appcompat:appcompat:$versions.appCompat"
53+
implementation "com.google.android.material:material:$versions.material"
54+
implementation "androidx.constraintlayout:constraintlayout:$versions.material"
55+
implementation "androidx.legacy:legacy-support-v4:$versions.legacySupportV4"
56+
57+
testImplementation "junit:junit:4.13.2"
58+
androidTestImplementation "androidx.test.ext:junit:1.1.3"
59+
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"
5960

6061
testImplementation "androidx.arch.core:core-testing:2.1.0"
6162

@@ -76,8 +77,6 @@ dependencies {
7677
implementation "com.google.dagger:hilt-android:$versions.hilt"
7778
kapt "com.google.dagger:hilt-compiler:$versions.hilt"
7879

79-
//implementation 'androidx.hilt:hilt-work:1.0.0'
80-
//kapt 'androidx.hilt:hilt-compiler:1.0.0'
8180

8281
// Amplify core dependency
8382
implementation "com.amplifyframework:core-kotlin:$versions.amplify_core_kotlin"
@@ -92,8 +91,6 @@ dependencies {
9291

9392
implementation "com.github.ligi:ipfs-api-kotlin:$versions.ipfs_kotlin"
9493

95-
implementation "com.cloudinary:cloudinary-android:$versions.cloudinary"
96-
9794
implementation "com.jakewharton.timber:timber:$versions.timber"
9895

9996
implementation "com.github.bumptech.glide:glide:$versions.glide"
@@ -105,13 +102,13 @@ dependencies {
105102

106103
implementation 'com.github.dhaval2404:imagepicker:1.8'
107104

108-
implementation 'com.github.florent37:inline-activity-result-kotlin:1.0.4'
105+
//implementation 'com.github.florent37:inline-activity-result-kotlin:1.0.4'
109106
implementation 'androidx.documentfile:documentfile:1.0.1'
110107

111108
testImplementation "com.google.truth:truth:$versions.truth"
112109

113110
dependencies {
114-
debugImplementation "com.github.chuckerteam.chucker:library:3.4.0"
115-
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:3.4.0"
111+
debugImplementation "com.github.chuckerteam.chucker:library:$versions.chucker"
112+
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:$versions.chucker"
116113
}
117114
}

app/src/main/java/com/github/code/gambit/VTransfer.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import android.util.Log
55
import com.amplifyframework.AmplifyException
66
import com.amplifyframework.auth.cognito.AWSCognitoAuthPlugin
77
import com.amplifyframework.core.Amplify
8-
import com.cloudinary.android.MediaManager
98
import dagger.hilt.android.HiltAndroidApp
109
import timber.log.Timber
1110
import timber.log.Timber.DebugTree
@@ -18,7 +17,6 @@ class VTransfer : Application() {
1817
if (BuildConfig.DEBUG) {
1918
Timber.plant(DebugTree())
2019
}
21-
MediaManager.init(this)
2220
try {
2321
Amplify.addPlugin(AWSCognitoAuthPlugin())
2422
Amplify.configure(this)

app/src/main/java/com/github/code/gambit/di/AppModule.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package com.github.code.gambit.di
33
import android.Manifest
44
import android.content.Context
55
import androidx.work.WorkManager
6-
import com.cloudinary.android.MediaManager
76
import com.github.code.gambit.VTransfer
87
import com.github.code.gambit.ui.activity.main.FileMetaDataAdapter
98
import com.github.code.gambit.ui.fragment.home.FileListAdapter
@@ -62,12 +61,6 @@ object AppModule {
6261
return ThirdOnBoardingFragment()
6362
}
6463

65-
@Singleton
66-
@Provides
67-
fun provideMediaManager(): MediaManager {
68-
return MediaManager.get()
69-
}
70-
7164
@Singleton
7265
@Provides
7366
fun provideWorkManager(@ApplicationContext context: Context): WorkManager {

build.gradle

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
33
ext.versions = [:]
4-
versions.gradle = '4.2.1'
5-
versions.kotlin = '1.5.0'
4+
versions.gradle = '4.2.2'
5+
versions.kotlin = '1.5.10'
6+
versions.coreKtx = '1.6.0'
7+
versions.appCompat = '1.3.0'
8+
versions.material = '1.4.0'
9+
versions.contraintLayout = '2.0.4'
10+
versions.legacySupportV4 = '1.0.0'
11+
versions.junit = '4.13.2'
612
versions.room = '2.3.0'
713
versions.retrofit = '2.9.0'
814
versions.hilt = '2.33-beta'
@@ -18,10 +24,12 @@ buildscript {
1824
versions.spotlight = '2.0.5'
1925
versions.work = '2.5.0'
2026
versions.truth = '1.1.3'
27+
versions.chucker = '3.5.0'
2128

2229
repositories {
2330
google()
24-
jcenter()
31+
mavenCentral()
32+
//jcenter()
2533
}
2634
dependencies {
2735
classpath "com.android.tools.build:gradle:$versions.gradle"
@@ -35,7 +43,8 @@ buildscript {
3543
allprojects {
3644
repositories {
3745
google()
38-
jcenter()
46+
mavenCentral()
47+
//jcenter()
3948
maven { url 'https://jitpack.io' }
4049
}
4150
}

0 commit comments

Comments
 (0)