Skip to content

Commit b5c9966

Browse files
author
cloudxanh
committed
Update gradle 8.1.1 and move library picasso to glide
1 parent 96d2071 commit b5c9966

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+401
-323
lines changed

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/build.gradle

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ plugins {
33
}
44

55
android {
6-
compileSdkVersion 30
7-
buildToolsVersion "30.0.3"
6+
compileSdk 33
7+
namespace 'com.sonmob.movieapp'
88

99
defaultConfig {
1010
applicationId "com.sonmob.movieapp"
1111
minSdkVersion 23
12-
targetSdkVersion 30
12+
targetSdkVersion 33
1313
versionCode 1
1414
versionName "1.0"
1515

@@ -30,52 +30,52 @@ android {
3030
buildFeatures {
3131
dataBinding true
3232
}
33-
34-
3533
}
3634

3735
dependencies {
3836

39-
implementation 'androidx.appcompat:appcompat:1.2.0'
40-
implementation 'com.google.android.material:material:1.3.0'
41-
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
42-
implementation 'org.jetbrains:annotations:15.0'
43-
testImplementation 'junit:junit:4.+'
44-
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
45-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
37+
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
38+
39+
// Core
40+
implementation 'androidx.appcompat:appcompat:1.6.1'
41+
implementation 'com.google.android.material:material:1.9.0'
42+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
4643

47-
//picasso
48-
implementation 'com.squareup.picasso:picasso:2.71828'
44+
// Glide
45+
implementation 'com.github.bumptech.glide:glide:4.16.0'
46+
annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2'
4947

5048
//ReactiveX
51-
implementation "io.reactivex.rxjava3:rxjava:3.0.0"
49+
implementation "io.reactivex.rxjava3:rxjava:3.1.5"
5250
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
5351

5452
//Retrofit 2 & Gson
5553
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
5654
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
5755
implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'
5856

59-
//Room : optional - RxJava3 support for Room
60-
implementation "androidx.room:room-runtime:2.3.0"
61-
implementation "androidx.room:room-rxjava3:2.3.0"
62-
annotationProcessor "androidx.room:room-compiler:2.3.0"
57+
// Room : optional - RxJava3 support for Room
58+
implementation "androidx.room:room-runtime:2.5.2"
59+
implementation "androidx.room:room-rxjava3:2.5.2"
60+
annotationProcessor "androidx.room:room-compiler:2.5.2"
6361

64-
//Scalable Size Units
62+
// Scalable Size Units
6563
implementation 'com.intuit.sdp:sdp-android:1.0.6'
6664
implementation 'com.intuit.ssp:ssp-android:1.0.6'
6765

68-
//RoundedImageView -A fast ImageView that supports rounded corners, ovals, and circles.
69-
implementation 'com.makeramen:roundedimageview:2.3.0'
70-
7166
// ViewModel - LiveData
72-
implementation "androidx.lifecycle:lifecycle-viewmodel:2.3.1"
73-
implementation "androidx.lifecycle:lifecycle-livedata:2.3.1"
74-
// alternately - if using Java8, use the following instead of lifecycle-compiler
75-
implementation "androidx.lifecycle:lifecycle-common-java8:2.3.1"
67+
implementation "androidx.lifecycle:lifecycle-viewmodel:2.6.2"
68+
implementation "androidx.lifecycle:lifecycle-livedata:2.6.2"
69+
implementation "androidx.lifecycle:lifecycle-common-java8:2.6.2"
7670

77-
//imageslide
71+
// Image slide
7872
implementation 'com.github.smarteist:autoimageslider:1.4.0'
73+
// RoundedImageView
74+
implementation 'com.makeramen:roundedimageview:2.3.0'
7975

80-
76+
// Test
77+
implementation 'org.jetbrains:annotations:23.0.0'
78+
testImplementation 'junit:junit:4.13.2'
79+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
80+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
8181
}

app/src/main/AndroidManifest.xml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="com.sonmob.movieapp">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<uses-permission android:name="android.permission.INTERNET" />
65

@@ -12,10 +11,14 @@
1211
android:supportsRtl="true"
1312
android:theme="@style/Theme.MovieApp"
1413
android:usesCleartextTraffic="true">
15-
<activity android:name=".activities.SearchActivity"></activity>
16-
<activity android:name=".activities.WatchlistActivity" />
17-
<activity android:name=".activities.TVShowDetailsActivity" />
18-
<activity android:name=".activities.MainActivity">
14+
15+
<activity android:name=".presentation.activities.SearchActivity" />
16+
<activity android:name=".presentation.activities.WatchlistActivity" />
17+
<activity android:name=".presentation.activities.TVShowDetailsActivity" />
18+
19+
<activity
20+
android:name=".presentation.activities.MainActivity"
21+
android:exported="true">
1922
<intent-filter>
2023
<action android:name="android.intent.action.MAIN" />
2124

app/src/main/java/com/sonmob/movieapp/local/dao/TVShowDao.java renamed to app/src/main/java/com/sonmob/movieapp/data/local/dao/TVShowDao.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
package com.sonmob.movieapp.local.dao;
1+
package com.sonmob.movieapp.data.local.dao;
22

33
import androidx.room.Dao;
44
import androidx.room.Delete;
55
import androidx.room.Insert;
66
import androidx.room.OnConflictStrategy;
77
import androidx.room.Query;
88

9-
import com.sonmob.movieapp.models.TVShow;
9+
import com.sonmob.movieapp.data.models.TVShow;
1010

1111
import java.util.List;
1212

@@ -20,7 +20,7 @@ public interface TVShowDao {
2020
Flowable<List<TVShow>> getWatchlist();
2121

2222
@Insert(onConflict = OnConflictStrategy.REPLACE)
23-
Completable addToWatchlish(TVShow tvShow);
23+
Completable addToWatchlist(TVShow tvShow);
2424

2525
@Delete
2626
Completable removeFromWatchlist(TVShow tvShow);

app/src/main/java/com/sonmob/movieapp/local/database/TVShowsDatabase.java renamed to app/src/main/java/com/sonmob/movieapp/data/local/database/TVShowsDatabase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
package com.sonmob.movieapp.local.database;
1+
package com.sonmob.movieapp.data.local.database;
22

33
import android.content.Context;
44

55
import androidx.room.Database;
66
import androidx.room.Room;
77
import androidx.room.RoomDatabase;
88

9-
import com.sonmob.movieapp.local.dao.TVShowDao;
10-
import com.sonmob.movieapp.models.TVShow;
9+
import com.sonmob.movieapp.data.local.dao.TVShowDao;
10+
import com.sonmob.movieapp.data.models.TVShow;
1111

1212
@Database(entities = TVShow.class, version = 1, exportSchema = false)
1313
public abstract class TVShowsDatabase extends RoomDatabase {

app/src/main/java/com/sonmob/movieapp/models/Episode.java renamed to app/src/main/java/com/sonmob/movieapp/data/models/Episode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.sonmob.movieapp.models;
1+
package com.sonmob.movieapp.data.models;
22

33
import com.google.gson.annotations.SerializedName;
44

app/src/main/java/com/sonmob/movieapp/models/TVShow.java renamed to app/src/main/java/com/sonmob/movieapp/data/models/TVShow.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.sonmob.movieapp.models;
1+
package com.sonmob.movieapp.data.models;
22

33
import androidx.room.Entity;
44
import androidx.room.PrimaryKey;
@@ -12,26 +12,19 @@ public class TVShow implements Serializable {
1212
@PrimaryKey
1313
@SerializedName("id")
1414
private int id;
15-
1615
@SerializedName("name")
1716
private String name;
18-
1917
@SerializedName("start_date")
2018
private String startDate;
21-
2219
@SerializedName("country")
2320
private String country;
24-
2521
@SerializedName("network")
2622
private String network;
27-
2823
@SerializedName("status")
2924
private String status;
30-
3125
@SerializedName("image_thumbnail_path")
3226
private String thumbnail;
3327

34-
3528
public TVShow(int id, String name, String startDate, String country, String network, String status, String thumbnail) {
3629
this.id = id;
3730
this.name = name;

0 commit comments

Comments
 (0)