From a36adf819bea2db864e67435b138059128cd4af5 Mon Sep 17 00:00:00 2001 From: Samwel Date: Thu, 4 Jul 2024 21:38:15 +0300 Subject: [PATCH] code optimization --- app/build.gradle | 29 +++++++++++++---------------- gradle/libs.versions.toml | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index d1fa7ff..48ad0b5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -30,24 +30,21 @@ android { dependencies { //butter knife - implementation 'com.jakewharton:butterknife:10.2.3' - annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3' - + implementation libs.butterknife + annotationProcessor libs.butterknife.compiler //Networking - implementation 'com.squareup.retrofit2:retrofit:2.9.0' - implementation 'com.squareup.retrofit2:converter-gson:2.9.0' - implementation 'com.squareup.okhttp3:okhttp:3.10.0' - implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0' - implementation 'com.google.code.gson:gson:2.9.0' - + implementation libs.retrofit + implementation libs.converter.gson + implementation libs.okhttp + implementation libs.logging.interceptor + implementation libs.gson //The mpesa Library implementation project(':mpesa') // library dependency - - implementation 'androidx.appcompat:appcompat:1.5.0' - implementation 'com.google.android.material:material:1.6.1' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + implementation libs.appcompat + implementation libs.material + implementation libs.constraintlayout + testImplementation libs.junit + androidTestImplementation libs.ext.junit + androidTestImplementation libs.espresso.core } \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6ed4ba9..ba13ddd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,28 @@ [versions] +appcompat = "1.7.0" +butterknife = "10.2.3" +constraintlayout = "2.1.4" +espressoCore = "3.6.1" +gson = "2.10.1" +junit = "4.13.2" +junitVersion = "1.2.1" +material = "1.12.0" +okhttp = "4.12.0" +retrofit = "2.10.0" [libraries] +appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } +butterknife = { module = "com.jakewharton:butterknife", version.ref = "butterknife" } +butterknife-compiler = { module = "com.jakewharton:butterknife-compiler", version.ref = "butterknife" } +constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } +converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" } +espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" } +ext-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" } +gson = { module = "com.google.code.gson:gson", version.ref = "gson" } +junit = { module = "junit:junit", version.ref = "junit" } +logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp" } +material = { module = "com.google.android.material:material", version.ref = "material" } +okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" } +retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } [plugins] \ No newline at end of file