Skip to content

Commit a9e93b7

Browse files
aksepltrAkshay Viswanathan
authored andcommitted
TCFM.00-FixBuild: Fixing build issues by updating all the dependencies to the latest androidx libraries
1 parent af5cb27 commit a9e93b7

File tree

9 files changed

+48
-41
lines changed

9 files changed

+48
-41
lines changed

app/build.gradle

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
apply plugin: 'com.android.application'
2-
apply plugin: 'android-apt'
2+
apply plugin: 'com.google.gms.google-services'
33

44
android {
5-
compileSdkVersion 25
6-
buildToolsVersion "25.0.2"
5+
compileSdkVersion 29
6+
buildToolsVersion "29.0.3"
77
defaultConfig {
88
applicationId "android.example.com.squawker"
9-
minSdkVersion 16
10-
targetSdkVersion 25
9+
minSdkVersion 19
10+
targetSdkVersion 29
1111
versionCode 1
1212
versionName "1.0"
1313
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -21,26 +21,21 @@ android {
2121
}
2222

2323
dependencies {
24-
compile fileTree(dir: 'libs', include: ['*.jar'])
25-
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
26-
exclude group: 'com.android.support', module: 'support-annotations'
27-
})
28-
compile 'com.android.support:appcompat-v7:25.1.0'
29-
testCompile 'junit:junit:4.12'
30-
24+
implementation fileTree(dir: 'libs', include: ['*.jar'])
25+
implementation 'androidx.appcompat:appcompat:1.1.0'
26+
testImplementation 'junit:junit:4.13'
3127
// RecyclerView
32-
compile 'com.android.support:recyclerview-v7:25.1.0'
28+
implementation 'androidx.recyclerview:recyclerview:1.1.0'
3329

3430
// Schematic dependencies for ContentProvider
35-
apt 'net.simonvt.schematic:schematic-compiler:0.6.3'
36-
compile 'net.simonvt.schematic:schematic:0.6.3'
31+
annotationProcessor 'net.simonvt.schematic:schematic-compiler:0.6.3'
32+
implementation 'net.simonvt.schematic:schematic:0.6.3'
3733

3834
// Preferences Dependencies
39-
compile 'com.android.support:preference-v7:25.1.0'
35+
implementation "androidx.preference:preference:1.1.1"
36+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
37+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
4038

4139
// Firebase dependency
42-
compile 'com.google.firebase:firebase-messaging:10.0.1'
40+
implementation 'com.google.firebase:firebase-messaging:20.1.7'
4341
}
44-
// Apply the Google Services plugin. Make sure to add the google-services.json file in the app
45-
// folder. You download it from the Firebase console
46-
apply plugin: 'com.google.gms.google-services'

app/src/main/java/android/example/com/squawker/MainActivity.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,20 @@
2222
import android.example.com.squawker.provider.SquawkContract;
2323
import android.example.com.squawker.provider.SquawkProvider;
2424
import android.os.Bundle;
25-
import android.support.v4.app.LoaderManager;
26-
import android.support.v4.content.CursorLoader;
27-
import android.support.v4.content.Loader;
28-
import android.support.v7.app.AppCompatActivity;
29-
import android.support.v7.preference.PreferenceManager;
30-
import android.support.v7.widget.DividerItemDecoration;
31-
import android.support.v7.widget.LinearLayoutManager;
32-
import android.support.v7.widget.RecyclerView;
3325
import android.util.Log;
3426
import android.view.Menu;
3527
import android.view.MenuInflater;
3628
import android.view.MenuItem;
3729

30+
import androidx.appcompat.app.AppCompatActivity;
31+
import androidx.loader.app.LoaderManager;
32+
import androidx.loader.content.CursorLoader;
33+
import androidx.loader.content.Loader;
34+
import androidx.preference.PreferenceManager;
35+
import androidx.recyclerview.widget.DividerItemDecoration;
36+
import androidx.recyclerview.widget.LinearLayoutManager;
37+
import androidx.recyclerview.widget.RecyclerView;
38+
3839
import com.google.firebase.iid.FirebaseInstanceId;
3940

4041
public class MainActivity extends AppCompatActivity implements

app/src/main/java/android/example/com/squawker/SquawkAdapter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@
1818

1919
import android.database.Cursor;
2020
import android.example.com.squawker.provider.SquawkContract;
21-
import android.support.v7.widget.RecyclerView;
2221
import android.view.LayoutInflater;
2322
import android.view.View;
2423
import android.view.ViewGroup;
2524
import android.widget.ImageView;
2625
import android.widget.TextView;
2726

27+
import androidx.recyclerview.widget.RecyclerView;
28+
2829
import java.text.SimpleDateFormat;
2930
import java.util.Date;
3031

app/src/main/java/android/example/com/squawker/following/FollowingPreferenceActivity.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717

1818
import android.example.com.squawker.R;
1919
import android.os.Bundle;
20-
import android.support.v4.app.NavUtils;
21-
import android.support.v7.app.ActionBar;
22-
import android.support.v7.app.AppCompatActivity;
2320
import android.view.MenuItem;
2421

22+
import androidx.appcompat.app.ActionBar;
23+
import androidx.appcompat.app.AppCompatActivity;
24+
import androidx.core.app.NavUtils;
25+
2526
/**
2627
* Displays an activity for who you are following
2728
*/

app/src/main/java/android/example/com/squawker/following/FollowingPreferenceFragment.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818
import android.content.SharedPreferences;
1919
import android.example.com.squawker.R;
2020
import android.os.Bundle;
21-
import android.support.v7.preference.Preference;
22-
import android.support.v7.preference.PreferenceFragmentCompat;
23-
import android.support.v7.preference.SwitchPreferenceCompat;
2421
import android.util.Log;
2522

23+
24+
import androidx.preference.Preference;
25+
import androidx.preference.PreferenceFragmentCompat;
26+
import androidx.preference.SwitchPreferenceCompat;
27+
2628
import com.google.firebase.messaging.FirebaseMessaging;
2729

2830

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
android:layout_height="match_parent"
1717
tools:context="android.example.com.squawker.MainActivity">
1818

19-
<android.support.v7.widget.RecyclerView
19+
<androidx.recyclerview.widget.RecyclerView
2020
android:id="@+id/squawks_recycler_view"
2121
android:layout_width="match_parent"
2222
android:layout_height="match_parent"

build.gradle

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
buildscript {
44
repositories {
55
jcenter()
6+
maven {
7+
url 'https://maven.google.com'
8+
}
69
}
710
dependencies {
8-
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.2'
9-
classpath 'com.android.tools.build:gradle:2.2.3'
11+
classpath 'com.android.tools.build:gradle:3.6.3'
1012

1113
// Google Services plugin
12-
classpath 'com.google.gms:google-services:3.0.0'
14+
classpath 'com.google.gms:google-services:4.3.3'
1315
// NOTE: Do not place your application dependencies here; they belong
1416
// in the individual module build.gradle files
1517
}
@@ -19,6 +21,10 @@ buildscript {
1921
allprojects {
2022
repositories {
2123
jcenter()
24+
google()
25+
maven {
26+
url 'https://maven.google.com'
27+
}
2228
}
2329
}
2430

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ org.gradle.jvmargs=-Xmx1536m
1515
# This option should only be used with decoupled projects. More details, visit
1616
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1717
# org.gradle.parallel=true
18+
android.useAndroidX=true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Dec 28 10:00:20 PST 2015
1+
#Sun May 10 22:38:13 IST 2020
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

0 commit comments

Comments
 (0)