Skip to content

[Catalog] Remove Multidex #4637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions catalog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ dependencies {
api libs.dagger.android.support
annotationProcessor libs.dagger.android.processor

api libs.androidx.multidex
api libs.androidx.constraintlayout
api libs.androidx.gridlayout
api libs.androidx.recyclerview
Expand Down Expand Up @@ -53,7 +52,6 @@ def srcDirs = [
'adaptive',
'application',
'application/attrs',
'application/legacymultidex',
'application/scope',
'application/theme',
'assets',
Expand Down Expand Up @@ -113,7 +111,6 @@ android {

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
minSdkVersion 21
targetSdkVersion 33
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import android.app.Application;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import androidx.multidex.MultiDexApplication;
import androidx.appcompat.app.AppCompatDelegate;
import android.util.Log;
import dagger.android.AndroidInjector;
Expand All @@ -30,7 +29,7 @@
import javax.inject.Inject;

/** Catalog application class that provides support for using dispatching Dagger injectors. */
public class CatalogApplication extends MultiDexApplication implements HasAndroidInjector {
public class CatalogApplication extends Application implements HasAndroidInjector {

/** Logging tag */
public static final String TAG = "CatalogApplication";
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ androidXFragment = "1.2.5"
androidXGridLayout = "1.0.0"
androidXGraphicsShapes = "1.0.1"
androidXLifecycle = "2.0.0"
androidXMultidex = "2.0.1"
androidXPreference = "1.1.1"
androidXRecyclerView = "1.2.1"
androidXRecyclerViewSelection = "1.0.0"
Expand Down Expand Up @@ -56,7 +55,6 @@ androidx-dynamicanimation = { group = "androidx.dynamicanimation", name = "dynam
androidx-fragment = { group = "androidx.fragment", name = "fragment", version.ref = "androidXFragment" }
androidx-gridlayout = { group = "androidx.gridlayout", name = "gridlayout", version.ref = "androidXGridLayout" }
androidx-lifecycle-runtime = { group = "androidx.lifecycle", name = "lifecycle-runtime", version.ref = "androidXLifecycle" }
androidx-multidex = { group = "androidx.multidex", name= "multidex", version.ref = "androidXMultidex" }
androidx-preference = { group = "androidx.preference", name = "preference", version.ref = "androidXPreference" }
androidx-recyclerview = { group = "androidx.recyclerview", name = "recyclerview", version.ref = "androidXRecyclerView" }
androidx-transition = { group = "androidx.transition", name = "transition", version.ref = "androidXTransition" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION_CODES;
import android.os.Parcelable;
import android.transition.Transition;
import android.view.View;
import android.view.View.MeasureSpec;
import android.view.Window;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.core.graphics.BlendModeColorFilterCompat;
import androidx.core.graphics.BlendModeCompat;
import com.google.android.material.internal.ContextUtils;
Expand All @@ -49,7 +47,6 @@
/**
* A {@link SharedElementCallback} to be used for {@link MaterialContainerTransform} transitions.
*/
@RequiresApi(VERSION_CODES.LOLLIPOP)
public class MaterialContainerTransformSharedElementCallback extends SharedElementCallback {

@Nullable private static WeakReference<View> capturedSharedElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.android.material.internal;

import static android.os.Build.VERSION_CODES.LOLLIPOP;
import static com.google.common.truth.Truth.assertThat;

import android.os.Build.VERSION_CODES;
Expand All @@ -40,7 +39,7 @@ public class StaticLayoutBuilderCompatTest {
+ "Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, "
+ "vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a";

@Config(minSdk = LOLLIPOP, maxSdk = VERSION_CODES.P)
@Config(maxSdk = VERSION_CODES.P)
@Test
public void createStaticLayout_withMaxLines_LongString() throws Exception {
int maxLines = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import android.view.animation.Interpolator;
import android.view.animation.LinearInterpolator;
import android.view.animation.PathInterpolator;
import androidx.annotation.RequiresApi;
import androidx.core.content.res.ResourcesCompat;
import androidx.dynamicanimation.animation.SpringForce;
import androidx.test.core.app.ApplicationProvider;
Expand All @@ -48,7 +47,6 @@
@RunWith(RobolectricTestRunner.class)
@Config(sdk = VERSION_CODES.LOLLIPOP)
@DoNotInstrument
@RequiresApi(api = VERSION_CODES.LOLLIPOP)
public class MotionUtilsTest {

private ActivityController<AppCompatActivity> activityController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
-->
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/test_coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -38,8 +37,7 @@
android:layout_width="256dp"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_behavior="@string/side_sheet_behavior"
tools:targetApi="lollipop">
app:layout_behavior="@string/side_sheet_behavior">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
-->
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/test_coordinator_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -28,8 +27,7 @@
android:layout_width="256dp"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_behavior="@string/side_sheet_behavior"
tools:targetApi="lollipop">
app:layout_behavior="@string/side_sheet_behavior">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
tools:overrideLibrary="androidx.test, android.app, androidx.test.rule, androidx.test.espresso, androidx.test.espresso.idling"/>

<application
android:name="androidx.multidex.MultiDexApplication"
android:supportsRtl="true"
android:theme="@style/Theme.MaterialComponents.Light">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package="com.google.android.material.testapp.animation">

<application
android:name="androidx.multidex.MultiDexApplication"
android:supportsRtl="true"
android:theme="@style/Theme.Design">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ dependencies {

api project(fromPath("lib"))
api project(fromPath("testing/java/com/google/android/material/testapp/base"))

api libs.androidx.multidex
}

android {
Expand All @@ -33,7 +31,6 @@ android {
main.res.srcDirs = [ 'res' ]
}
defaultConfig {
multiDexEnabled true
minSdkVersion 21
targetSdkVersion 33
}
Expand Down
4 changes: 0 additions & 4 deletions testing/java/com/google/android/material/testapp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

apply plugin: 'com.android.application'

dependencies {
Expand All @@ -8,14 +7,11 @@ dependencies {
api project(fromPath("lib"))
api project(fromPath("testing/java/com/google/android/material/testapp/base"))
api project(fromPath("testing/java/com/google/android/material/testapp/custom"))

api libs.androidx.multidex
}

android {
namespace "com.google.android.material.testapp"
defaultConfig {
multiDexEnabled true
minSdkVersion 21
targetSdkVersion 33
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<resources xmlns:tools="http://schemas.android.com/tools">
<resources>

<style name="TextSmallStyle" parent="@android:style/TextAppearance">
<item name="android:textSize">@dimen/text_small_size</item>
Expand All @@ -28,15 +28,13 @@
</style>

<style name="Theme.TranslucentStatus"
parent="Theme.AppCompat.Light.NoActionBar"
tools:targetApi="lollipop">
parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>

<style name="Theme.TranslucentNavBar"
parent="Theme.AppCompat.Light.NoActionBar"
tools:targetApi="lollipop">
parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
</style>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
tools:overrideLibrary="androidx.test, android.app, androidx.test.rule, androidx.test.espresso, androidx.test.espresso.idling"/>

<application
android:name="androidx.multidex.MultiDexApplication"
android:supportsRtl="true"
android:theme="@style/Theme.MaterialComponents.ViewInflaterTest">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ dependencies {

api project(fromPath("lib"))
api project(fromPath("testing/java/com/google/android/material/testapp/base"))

api libs.androidx.multidex
}

android {
Expand All @@ -39,7 +37,6 @@ android {
main.res.srcDirs = [ 'res' ]
}
defaultConfig {
multiDexEnabled true
minSdkVersion 21
targetSdkVersion 33
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ dependencies {
implementation libs.androidx.annotation
implementation libs.androidx.appcompat
implementation libs.androidx.core

api libs.androidx.multidex
}

android {
defaultConfig {
multiDexEnabled true
testApplicationId "com.google.android.material.tests"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
minSdkVersion 21
Expand Down