Skip to content

Commit 8206df3

Browse files
committed
migrate to androidx
1 parent 9409969 commit 8206df3

File tree

788 files changed

+7757
-1443
lines changed

Some content is hidden

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

788 files changed

+7757
-1443
lines changed

Diff for: AccessingGoogleDrive/app/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ android {
1111
versionCode 1
1212
versionName "1.0"
1313

14-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1515
}
1616
buildTypes {
1717
release {
@@ -26,11 +26,11 @@ dependencies {
2626

2727
// Testing-only dependencies
2828
testImplementation "junit:junit:$junitVer"
29-
androidTestImplementation "com.android.support.test:runner:$androidTestRunnerVer"
30-
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoCoreVer"
29+
androidTestImplementation "androidx.test:runner:$androidTestRunnerVer"
30+
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoCoreVer"
3131

32-
implementation "com.android.support:appcompat-v7:$supportLibVer"
32+
implementation "androidx.appcompat:appcompat:$appCompat"
3333

3434
// Add Google Play Services Drive api
35-
implementation "com.google.android.gms:play-services-drive:$googlePlayServicesVer"
35+
implementation "com.google.android.gms:play-services-drive:$gpsDrive"
3636
}

Diff for: AccessingGoogleDrive/app/src/androidTest/java/github/nisrulz/sample/accessinggoogledrive/ExampleInstrumentedTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package github.nisrulz.sample.accessinggoogledrive;
22

33
import android.content.Context;
4-
import android.support.test.InstrumentationRegistry;
5-
import android.support.test.runner.AndroidJUnit4;
4+
import androidx.test.InstrumentationRegistry;
5+
import androidx.test.runner.AndroidJUnit4;
66

77
import org.junit.Test;
88
import org.junit.runner.RunWith;

Diff for: AccessingGoogleDrive/app/src/main/java/github/nisrulz/sample/accessinggoogledrive/MainActivity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package github.nisrulz.sample.accessinggoogledrive;
22

3-
import android.support.v7.app.AppCompatActivity;
3+
import androidx.appcompat.app.AppCompatActivity;
44
import android.os.Bundle;
55

66
public class MainActivity extends AppCompatActivity {

Diff for: AccessingGoogleDrive/gradle.properties

+8
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,11 @@ 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+
# When set to true, the Android plugin uses the appropriate AndroidX library
19+
# instead of a Support Library. The flag is false by default if it is not specified.
20+
android.useAndroidX=true
21+
22+
# When set to true, the Android plugin automatically migrates existing third-party
23+
# libraries to use AndroidX by rewriting their binaries. The flag is false by default if it
24+
# is not specified.
25+
android.enableJetifier=true
426 Bytes
Binary file not shown.

Diff for: AccessingGoogleDrive/gradlew

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS='"-Xmx64m"'
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"

Diff for: AccessingGoogleDrive/gradlew.bat

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem http://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

1632
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS="-Xmx64m"
33+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
1834

1935
@rem Find java.exe
2036
if defined JAVA_HOME goto findJavaFromJavaHome

Diff for: ActivityLifecycle/app/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ android {
1111
versionCode 1
1212
versionName "1.0"
1313

14-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1515
}
1616
buildTypes {
1717
release {
@@ -26,9 +26,9 @@ dependencies {
2626

2727
// Testing-only dependencies
2828
testImplementation "junit:junit:$junitVer"
29-
androidTestImplementation "com.android.support.test:runner:$androidTestRunnerVer"
30-
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoCoreVer"
29+
androidTestImplementation "androidx.test:runner:$androidTestRunnerVer"
30+
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoCoreVer"
3131

32-
implementation "com.android.support:appcompat-v7:$supportLibVer"
33-
implementation "com.android.support:design:$supportLibVer"
32+
implementation "androidx.appcompat:appcompat:$appCompat"
33+
implementation "com.google.android.material:material:$supportLibVer"
3434
}

Diff for: ActivityLifecycle/app/src/main/java/github/nisrulz/activitylifecycle/MainActivity.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package github.nisrulz.activitylifecycle;
22

33
import android.os.Bundle;
4-
import android.support.design.widget.FloatingActionButton;
5-
import android.support.design.widget.Snackbar;
6-
import android.support.v7.app.AppCompatActivity;
7-
import android.support.v7.widget.Toolbar;
4+
import com.google.android.material.floatingactionbutton.FloatingActionButton;
5+
import com.google.android.material.snackbar.Snackbar;
6+
import androidx.appcompat.app.AppCompatActivity;
7+
import androidx.appcompat.widget.Toolbar;
88
import android.util.Log;
99
import android.view.Menu;
1010
import android.view.MenuItem;
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.design.widget.CoordinatorLayout
2+
<androidx.coordinatorlayout.widget.CoordinatorLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:app="http://schemas.android.com/apk/res-auto"
55
xmlns:tools="http://schemas.android.com/tools"
@@ -8,28 +8,28 @@
88
android:fitsSystemWindows="true"
99
tools:context="github.nisrulz.activitylifecycle.MainActivity">
1010

11-
<android.support.design.widget.AppBarLayout
11+
<com.google.android.material.appbar.AppBarLayout
1212
android:layout_width="match_parent"
1313
android:layout_height="wrap_content"
1414
android:theme="@style/AppTheme.AppBarOverlay">
1515

16-
<android.support.v7.widget.Toolbar
16+
<androidx.appcompat.widget.Toolbar
1717
android:id="@+id/toolbar"
1818
android:layout_width="match_parent"
1919
android:layout_height="?attr/actionBarSize"
2020
android:background="?attr/colorPrimary"
2121
app:popupTheme="@style/AppTheme.PopupOverlay"/>
2222

23-
</android.support.design.widget.AppBarLayout>
23+
</com.google.android.material.appbar.AppBarLayout>
2424

2525
<include layout="@layout/content_main"/>
2626

27-
<android.support.design.widget.FloatingActionButton
27+
<com.google.android.material.floatingactionbutton.FloatingActionButton
2828
android:id="@+id/fab"
2929
android:layout_width="wrap_content"
3030
android:layout_height="wrap_content"
3131
android:layout_gravity="bottom|end"
3232
android:layout_margin="@dimen/fab_margin"
3333
android:src="@android:drawable/ic_dialog_email"/>
3434

35-
</android.support.design.widget.CoordinatorLayout>
35+
</androidx.coordinatorlayout.widget.CoordinatorLayout>

Diff for: ActivityLifecycle/gradle.properties

+9-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,12 @@
1515
# When configured, Gradle will run in incubating parallel mode.
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18-
# org.gradle.parallel=true
18+
# org.gradle.parallel=true
19+
# When set to true, the Android plugin uses the appropriate AndroidX library
20+
# instead of a Support Library. The flag is false by default if it is not specified.
21+
android.useAndroidX=true
22+
23+
# When set to true, the Android plugin automatically migrates existing third-party
24+
# libraries to use AndroidX by rewriting their binaries. The flag is false by default if it
25+
# is not specified.
26+
android.enableJetifier=true

Diff for: ActivityLifecycle/gradle/wrapper/gradle-wrapper.jar

426 Bytes
Binary file not shown.

Diff for: ActivityLifecycle/gradlew

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS='"-Xmx64m"'
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"

Diff for: ActivityLifecycle/gradlew.bat

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem http://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
117
@if "%DEBUG%" == "" @echo off
218
@rem ##########################################################################
319
@rem
@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
1430
set APP_HOME=%DIRNAME%
1531

1632
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS="-Xmx64m"
33+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
1834

1935
@rem Find java.exe
2036
if defined JAVA_HOME goto findJavaFromJavaHome

Diff for: AnimatedGradientBackground/app/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android {
1010
versionCode 1
1111
versionName "1.0"
1212

13-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
13+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1414
}
1515
buildTypes {
1616
release {
@@ -25,9 +25,9 @@ dependencies {
2525

2626
// Testing-only dependencies
2727
testImplementation "junit:junit:$junitVer"
28-
androidTestImplementation "com.android.support.test:runner:$androidTestRunnerVer"
29-
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoCoreVer"
28+
androidTestImplementation "androidx.test:runner:$androidTestRunnerVer"
29+
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoCoreVer"
3030

31-
implementation "com.android.support:appcompat-v7:$supportLibVer"
32-
implementation "com.android.support.constraint:constraint-layout:$constraintLayoutVer"
31+
implementation "androidx.appcompat:appcompat:$appCompat"
32+
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVer"
3333
}

Diff for: AnimatedGradientBackground/app/src/androidTest/java/sample/github/nisrulz/animatedgradientbackground/ExampleInstrumentedTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package sample.github.nisrulz.animatedgradientbackground;
22

33
import android.content.Context;
4-
import android.support.test.InstrumentationRegistry;
5-
import android.support.test.runner.AndroidJUnit4;
4+
import androidx.test.InstrumentationRegistry;
5+
import androidx.test.runner.AndroidJUnit4;
66

77
import org.junit.Test;
88
import org.junit.runner.RunWith;

Diff for: AnimatedGradientBackground/app/src/main/java/sample/github/nisrulz/animatedgradientbackground/MainActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import android.graphics.drawable.AnimationDrawable;
44
import android.os.Bundle;
5-
import android.support.constraint.ConstraintLayout;
6-
import android.support.v7.app.AppCompatActivity;
5+
import androidx.constraintlayout.widget.ConstraintLayout;
6+
import androidx.appcompat.app.AppCompatActivity;
77

88
public class MainActivity extends AppCompatActivity {
99
private ConstraintLayout constraintLayout;

Diff for: AnimatedGradientBackground/app/src/main/res/layout/activity_main.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:id="@+id/constraintLayout"
@@ -28,4 +28,4 @@
2828
app:layout_constraintTop_toTopOf="parent"
2929
tools:text="@string/app_name"
3030
/>
31-
</android.support.constraint.ConstraintLayout>
31+
</androidx.constraintlayout.widget.ConstraintLayout>

Diff for: AnimatedGradientBackground/gradle.properties

+8
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,11 @@ 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+
# When set to true, the Android plugin uses the appropriate AndroidX library
19+
# instead of a Support Library. The flag is false by default if it is not specified.
20+
android.useAndroidX=true
21+
22+
# When set to true, the Android plugin automatically migrates existing third-party
23+
# libraries to use AndroidX by rewriting their binaries. The flag is false by default if it
24+
# is not specified.
25+
android.enableJetifier=true
426 Bytes
Binary file not shown.

Diff for: AnimatedGradientBackground/gradlew

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env sh
22

3+
#
4+
# Copyright 2015 the original author or authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
319
##############################################################################
420
##
521
## Gradle start up script for UN*X
@@ -28,7 +44,7 @@ APP_NAME="Gradle"
2844
APP_BASE_NAME=`basename "$0"`
2945

3046
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS='"-Xmx64m"'
47+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
3248

3349
# Use the maximum available, or set MAX_FD != -1 to use that value.
3450
MAX_FD="maximum"

0 commit comments

Comments
 (0)