Skip to content

Commit 13ab055

Browse files
committed
TCFM.00-FixBuild: Fixing build issues by updating all the dependencies to the latest androidx libraries
1 parent dfe7683 commit 13ab055

File tree

9 files changed

+41
-34
lines changed

9 files changed

+41
-34
lines changed

app/build.gradle

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
apply plugin: 'com.android.application'
2-
apply plugin: 'android-apt'
32

43
android {
5-
compileSdkVersion 25
6-
buildToolsVersion "25.0.2"
4+
compileSdkVersion 29
5+
buildToolsVersion "29.0.3"
76
defaultConfig {
87
applicationId "android.example.com.squawker"
9-
minSdkVersion 16
10-
targetSdkVersion 25
8+
minSdkVersion 19
9+
targetSdkVersion 29
1110
versionCode 1
1211
versionName "1.0"
1312
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
@@ -21,20 +20,18 @@ android {
2120
}
2221

2322
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-
23+
implementation fileTree(dir: 'libs', include: ['*.jar'])
24+
implementation 'androidx.appcompat:appcompat:1.1.0'
25+
testImplementation 'junit:junit:4.13'
3126
// RecyclerView
32-
compile 'com.android.support:recyclerview-v7:25.1.0'
27+
implementation 'androidx.recyclerview:recyclerview:1.1.0'
3328

3429
// Schematic dependencies for ContentProvider
35-
apt 'net.simonvt.schematic:schematic-compiler:0.6.3'
36-
compile 'net.simonvt.schematic:schematic:0.6.3'
30+
annotationProcessor 'net.simonvt.schematic:schematic-compiler:0.6.3'
31+
implementation 'net.simonvt.schematic:schematic:0.6.3'
3732

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

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
public class MainActivity extends AppCompatActivity implements
3940
LoaderManager.LoaderCallbacks<Cursor> {
4041

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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
import android.example.com.squawker.R;
1919
import android.os.Bundle;
20-
import android.support.v7.preference.PreferenceFragmentCompat;
20+
21+
import androidx.preference.PreferenceFragmentCompat;
2122

2223

2324
/**

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: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
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
// NOTE: Do not place your application dependencies here; they belong
1214
// in the individual module build.gradle files
@@ -17,6 +19,9 @@ buildscript {
1719
allprojects {
1820
repositories {
1921
jcenter()
22+
maven {
23+
url 'https://maven.google.com'
24+
}
2025
}
2126
}
2227

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)