From bece95b5ccfcd01bc20337ee0a08d6b1ea946d1d Mon Sep 17 00:00:00 2001 From: Borgia Leiva Date: Wed, 4 Feb 2026 11:14:37 +0100 Subject: [PATCH] Added OkHttp and retrofit2 to dependencies --- .idea/.gitignore | 5 +++++ app/build.gradle.kts | 7 +++++++ gradle/libs.versions.toml | 7 ++++++- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .idea/.gitignore diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c2d908a..8964957 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -39,6 +39,13 @@ dependencies { implementation(libs.material) implementation(libs.androidx.activity) implementation(libs.androidx.constraintlayout) + + // Networking: OkHttp + Retrofit + implementation("com.squareup.okhttp3:okhttp:4.11.0") + implementation("com.squareup.okhttp3:logging-interceptor:4.11.0") + implementation("com.squareup.retrofit2:retrofit:2.9.0") + implementation("com.squareup.retrofit2:converter-gson:2.9.0") + testImplementation(libs.junit) androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.espresso.core) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 35aebf5..7244788 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -8,6 +8,8 @@ appcompat = "1.7.1" material = "1.13.0" activity = "1.12.2" constraintlayout = "2.2.1" +okhttp = "4.11.0" +retrofit = "2.9.0" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } @@ -18,7 +20,10 @@ androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version material = { group = "com.google.android.material", name = "material", version.ref = "material" } androidx-activity = { group = "androidx.activity", name = "activity", version.ref = "activity" } androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } +okhttp = { group = "com.squareup.okhttp3", name = "okhttp", version.ref = "okhttp" } +okhttp-logging-interceptor = { group = "com.squareup.okhttp3", name = "logging-interceptor", version.ref = "okhttp" } +retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" } +retrofit-converter-gson = { group = "com.squareup.retrofit2", name = "converter-gson", version.ref = "retrofit" } [plugins] android-application = { id = "com.android.application", version.ref = "agp" } -