Initial migration to Leanback PlaybackSupportFragment

This commit is contained in:
Florianisme committed 2020-01-03 13:52:15 +01:00
1 parent 911f00f8b2
commit e4cc64200e
9 files changed
+335 -142

No files matched your search

@@ -13,6 +13,7 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentManager;
import androidx.leanback.app.RowsSupportFragment;
import androidx.leanback.widget.ArrayObjectAdapter;
import androidx.leanback.widget.HeaderItem;
@@ -288,6 +289,7 @@ public class CustomPlaybackOverlayFragment extends Fragment implements IPlayback
super.onActivityCreated(savedInstanceState);
if (mItemsToPlay == null || mItemsToPlay.size() == 0) return;
prepareOverlayFragment();
mPoster = mActivity.findViewById(R.id.poster);
mNextUpPoster = mActivity.findViewById(R.id.nextUpPoster);
mStudioImage = mActivity.findViewById(R.id.studioImg);
@@ -442,6 +444,14 @@ public class CustomPlaybackOverlayFragment extends Fragment implements IPlayback
mPlayPauseBtn.requestFocus();
}
private void prepareOverlayFragment() {
LeanbackOverlayFragment leanbackOverlayFragment = (LeanbackOverlayFragment) getFragmentManager().findFragmentById(R.id.leanback_fragment);
if (leanbackOverlayFragment != null) {
leanbackOverlayFragment.setData(mPlaybackController);
leanbackOverlayFragment.setMediaInfo();
}
}
private void setupPopupAnimations() {
showPopup = AnimationUtils.loadAnimation(mActivity, R.anim.abc_slide_in_bottom);
showPopup.setAnimationListener(new Animation.AnimationListener() {
@@ -0,0 +1,58 @@
package org.jellyfin.androidtv.playback;
import android.content.Context;
import androidx.leanback.media.PlaybackTransportControlGlue;
import androidx.leanback.media.PlayerAdapter;
import androidx.leanback.widget.Action;
import androidx.leanback.widget.ArrayObjectAdapter;
import androidx.leanback.widget.PlaybackControlsRow;
import androidx.leanback.widget.PlaybackRowPresenter;
public class CustomPlaybackTransportControlGlue extends PlaybackTransportControlGlue {
private PlaybackControlsRow.PlayPauseAction playPauseAction;
private PlaybackControlsRow.RewindAction rewindAction;
private PlaybackControlsRow.FastForwardAction fastForwardAction;
private PlaybackControlsRow.ClosedCaptioningAction closedCaptioningAction;
private PlaybackControlsRow.RepeatAction repeatAction;
private PlaybackControlsRow.ShuffleAction shuffleAction;
private final PlaybackController playbackController;
CustomPlaybackTransportControlGlue(Context context, PlayerAdapter playerAdapter, PlaybackController playbackController) {
super(context, playerAdapter);
this.playbackController = playbackController;
}
/*
@Override
protected void onCreatePrimaryActions(ArrayObjectAdapter primaryActionsAdapter) {
primaryActionsAdapter.add(rewindAction);
primaryActionsAdapter.add(playPauseAction);
primaryActionsAdapter.add(fastForwardAction);
}
@Override
protected void onCreateSecondaryActions(ArrayObjectAdapter secondaryActionsAdapter) {
secondaryActionsAdapter.add(closedCaptioningAction);
secondaryActionsAdapter.add(repeatAction);
secondaryActionsAdapter.add(shuffleAction);
}
@Override
public void onActionClicked(Action action) {
if (action == playPauseAction) {
if (getPlayerAdapter().isPlaying()) {
getPlayerAdapter().play();
} else {
getPlayerAdapter().pause();
}
} else if (action == rewindAction) {
getPlayerAdapter().rewind();
} else if (action == fastForwardAction) {
getPlayerAdapter().fastForward();
}
}*/
}
@@ -0,0 +1,11 @@
package org.jellyfin.androidtv.playback;
import androidx.leanback.widget.PlaybackSeekDataProvider;
public class CustomSeekProvider extends PlaybackSeekDataProvider {
@Override
public long[] getSeekPositions() {
return new long[5];
}
}
@@ -0,0 +1,43 @@
package org.jellyfin.androidtv.playback;
import android.net.Uri;
import android.os.Bundle;
import androidx.leanback.app.PlaybackSupportFragment;
import androidx.leanback.app.PlaybackSupportFragmentGlueHost;
import androidx.leanback.app.VideoSupportFragment;
import androidx.leanback.app.VideoSupportFragmentGlueHost;
import androidx.leanback.media.MediaPlayerAdapter;
import androidx.leanback.media.PlaybackGlue;
import androidx.leanback.media.PlaybackTransportControlGlue;
import androidx.leanback.media.PlayerAdapter;
import org.jellyfin.androidtv.TvApp;
import org.jellyfin.apiclient.model.dto.BaseItemDto;
public class LeanbackOverlayFragment extends PlaybackSupportFragment {
PlaybackController playbackController;
PlaybackTransportControlGlue playerGlue;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TvApp application = TvApp.getApplication();
PlaybackController playbackController = application.getPlaybackController();
playerGlue = new CustomPlaybackTransportControlGlue(getContext(), new VideoPlayerAdapter(playbackController), playbackController);
playerGlue.setHost(new PlaybackSupportFragmentGlueHost(this));
}
public void setData(PlaybackController playbackController) {
this.playbackController = playbackController;
}
public void setMediaInfo() {
BaseItemDto currentlyPlayingItem = playbackController.getCurrentlyPlayingItem();
playerGlue.setTitle(currentlyPlayingItem.getOriginalTitle());
}
}
@@ -871,7 +871,7 @@ public class PlaybackController {
if (mVideoManager.isNativeMode() && !isLiveTv && ContainerTypes.TS.equals(mCurrentStreamInfo.getContainer())) {
//Exo does not support seeking in .ts
Utils.showToast(TvApp.getApplication(), "Unable to seek");
} else if (mVideoManager.seekTo(pos) >= 0) {
} else if (mVideoManager.seekToPosition(pos) >= 0) {
if (mFragment != null) {
mFragment.updateEndTime(mVideoManager.getDuration() - pos);
}
@@ -1011,7 +1011,7 @@ public class PlaybackController {
mHandler.postDelayed(this, 25);
} else {
// do the seek
if (mVideoManager.seekTo(position) < 0)
if (mVideoManager.seekToPosition(position) < 0)
Utils.showToast(TvApp.getApplication(), "Unable to seek");
mPlaybackState = PlaybackState.PLAYING;
@@ -12,6 +12,8 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import androidx.leanback.media.PlayerAdapter;
import com.devbrackets.android.exomedia.EMVideoView;
import org.jellyfin.androidtv.R;
@@ -29,7 +31,7 @@ import org.jellyfin.apiclient.model.dto.MediaSourceInfo;
import org.jellyfin.apiclient.model.entities.MediaStream;
import org.jellyfin.apiclient.model.entities.MediaStreamType;
public class VideoManager implements IVLCVout.OnNewVideoLayoutListener {
public class VideoManager extends PlayerAdapter implements IVLCVout.OnNewVideoLayoutListener {
public final static int ZOOM_NORMAL = 0;
public final static int ZOOM_VERTICAL = 1;
@@ -220,7 +222,7 @@ public class VideoManager implements IVLCVout.OnNewVideoLayoutListener {
stopProgressLoop();
}
public long seekTo(long pos) {
public long seekToPosition(long pos) {
if (nativeMode) {
Long intPos = pos;
TvApp.getApplication().getLogger().Info("Exo length in seek is: " + mVideoView.getDuration());
@@ -712,4 +714,6 @@ public class VideoManager implements IVLCVout.OnNewVideoLayoutListener {
}
return ourIndex;
}
}
@@ -0,0 +1,40 @@
package org.jellyfin.androidtv.playback;
import androidx.leanback.media.PlayerAdapter;
public class VideoPlayerAdapter extends PlayerAdapter {
private final PlaybackController playbackController;
public VideoPlayerAdapter(PlaybackController playbackController) {
this.playbackController = playbackController;
}
@Override
public void play() {
playbackController.play(playbackController.getCurrentPosition());
}
@Override
public void pause() {
playbackController.pause();
}
@Override
public long getDuration() {
return playbackController.getCurrentlyPlayingItem().getRunTimeTicks()!= null ?
playbackController.getCurrentlyPlayingItem().getRunTimeTicks() / 10000 : -1;
}
@Override
public long getCurrentPosition() {
return playbackController.getCurrentPosition();
}
@Override
public boolean isPlaying() {
return playbackController.isPlaying();
}
}
+150 -137
View File
@@ -8,7 +8,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="false" >
android:fitsSystemWindows="false">
<FrameLayout
android:id="@+id/player_surface_frame"
@@ -18,7 +18,8 @@
android:foregroundGravity="clip_horizontal|clip_vertical"
tools:ignore="true">
<SurfaceView android:id="@+id/player_surface"
<SurfaceView
android:id="@+id/player_surface"
android:layout_width="1dp"
android:layout_height="1dp" />
@@ -29,156 +30,167 @@
</FrameLayout>
<com.devbrackets.android.exomedia.EMVideoView
android:id="@+id/videoView" android:layout_width="fill_parent"
android:layout_height="match_parent" android:layout_gravity="center" android:visibility="gone" />
<TextView
android:id="@+id/offLine_subtitleText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:ellipsize="middle"
android:gravity="center"
android:padding="3dp"
android:textStyle="bold"
android:textColor="@color/white" />
<com.devbrackets.android.exomedia.EMVideoView
android:id="@+id/videoView"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:visibility="gone" />
<fragment
android:id="@+id/leanback_fragment"
android:name="org.jellyfin.androidtv.playback.LeanbackOverlayFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />
<TextView
android:id="@+id/offLine_subtitleText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:ellipsize="middle"
android:gravity="center"
android:padding="3dp"
android:textColor="@color/white"
android:textStyle="bold" />
</FrameLayout>
<ProgressBar
android:id="@+id/bufferingProgress"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/bufferingProgress"
android:layout_gravity="center"
android:indeterminate="false"
android:visibility="invisible" />
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="206dp"
android:layout_gravity="center_horizontal|bottom"
android:id="@+id/bottomPanel"
android:focusable="true"
android:focusableInTouchMode="true"
android:visibility="invisible">
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_gravity="center_horizontal|bottom"
android:focusable="false"
android:focusableInTouchMode="false"
android:visibility="gone">
<ImageView
android:id="@+id/imageView13"
android:layout_width="match_parent"
android:layout_height="165sp"
android:id="@+id/imageView13"
android:layout_centerHorizontal="true"
android:layout_alignParentEnd="false"
android:layout_alignParentBottom="true"
android:background="@color/black"
android:alpha=".65" />
android:layout_centerHorizontal="true"
android:alpha=".65"
android:background="@color/black" />
<ImageView
android:id="@+id/poster"
android:layout_width="150sp"
android:layout_height="300sp"
android:id="@+id/poster"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_marginLeft="30sp" />
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text=""
android:id="@+id/title"
android:layout_alignTop="@+id/imageView13"
android:layout_marginLeft="20sp"
android:layout_marginTop="5sp"
android:layout_toEndOf="@+id/poster"
android:layout_toRightOf="@+id/poster"
android:layout_marginTop="5sp"
android:layout_marginLeft="20sp"
android:maxWidth="600sp"
android:maxLines="1" />
android:maxLines="1"
android:text=""
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/endTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="@+id/endTime"
android:layout_alignTop="@+id/title"
android:layout_alignParentEnd="true"
android:layout_marginTop="5sp"
android:layout_marginRight="20sp"
android:alpha=".6" />
android:alpha=".6"
android:textAppearance="?android:attr/textAppearanceMedium" />
<LinearLayout
android:orientation="horizontal"
android:id="@+id/infoRow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@+id/title"
android:id="@+id/infoRow"
android:measureWithLargestChild="false"
android:layout_alignEnd="@+id/endTime"
android:layout_below="@+id/title"
android:layout_alignStart="@+id/title"
android:layout_alignEnd="@+id/endTime"
android:layout_marginTop="5sp"
android:minHeight="30sp"/>
android:measureWithLargestChild="false"
android:minHeight="30sp"
android:orientation="horizontal" />
<TextView
android:id="@+id/infoSummary"
android:layout_width="wrap_content"
android:layout_height="110sp"
android:id="@+id/infoSummary"
android:maxLines="5"
android:layout_below="@+id/infoRow"
android:layout_alignLeft="@+id/infoRow"
android:layout_alignRight="@+id/playerProgress"
android:visibility="invisible"
android:ellipsize="end"
android:maxLines="5"
android:textSize="14sp"
android:layout_below="@+id/infoRow"
android:ellipsize="end"/>
android:visibility="invisible" />
<ProgressBar
android:id="@+id/playerProgress"
style="@style/player_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/playerProgress"
android:minWidth="525sp"
android:layout_alignParentBottom="false"
android:maxHeight="5sp"
android:layout_marginLeft="325sp"
android:layout_below="@+id/infoRow"
android:layout_marginTop="20sp" />
android:layout_alignParentBottom="false"
android:layout_marginLeft="325sp"
android:layout_marginTop="20sp"
android:maxHeight="5sp"
android:minWidth="525sp" />
<TextView
android:id="@+id/currentPos"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
tools:text="1:23:00"
android:id="@+id/currentPos"
android:layout_alignStart="@+id/infoRow"
android:layout_alignBottom="@+id/playerProgress"
android:layout_marginLeft="15sp"
android:layout_marginBottom="-7sp"
android:maxLines="1"
android:layout_marginLeft="15sp"
android:layout_alignStart="@+id/infoRow"
android:textSize="16sp" />
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="16sp"
tools:text="1:23:00" />
<TextView
android:id="@+id/remainingTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
tools:text="-1:25:00"
android:id="@+id/remainingTime"
android:layout_alignBottom="@+id/currentPos"
android:layout_alignParentEnd="false"
android:layout_toRightOf="@+id/playerProgress"
android:layout_marginLeft="10sp"
android:textSize="16sp" />
android:layout_toRightOf="@+id/playerProgress"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="16sp"
tools:text="-1:25:00" />
<ImageView
android:id="@+id/studioImg"
android:layout_width="70sp"
android:layout_height="30sp"
android:id="@+id/studioImg"
android:layout_alignParentBottom="false"
android:layout_alignEnd="@+id/remainingTime"
android:layout_alignTop="@+id/playerProgress"
android:layout_alignEnd="@+id/remainingTime"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="false"
android:layout_marginTop="30sp"
android:layout_marginRight="30sp"
android:layout_alignParentRight="true" />
android:layout_marginRight="30sp" />
<LinearLayout
android:layout_width="wrap_content"
@@ -213,153 +225,154 @@
</RelativeLayout>
<include layout="@layout/small_upnext_panel"
<include
android:id="@+id/smNextUpPanel"
layout="@layout/small_upnext_panel"
android:layout_width="match_parent"
android:layout_height="75dp"
android:layout_gravity="bottom"
android:id="@+id/smNextUpPanel" />
android:layout_gravity="bottom" />
<RelativeLayout
android:id="@+id/nextUpPanel"
android:layout_width="fill_parent"
android:layout_height="206dp"
android:layout_gravity="center_horizontal|bottom"
android:id="@+id/nextUpPanel"
android:focusable="true"
android:focusableInTouchMode="true"
android:visibility="invisible">
<ImageView
android:id="@+id/imageView14"
android:layout_width="match_parent"
android:layout_height="165sp"
android:id="@+id/imageView14"
android:layout_centerHorizontal="true"
android:layout_alignParentEnd="false"
android:layout_alignParentBottom="true"
android:background="@color/black"
android:alpha=".95" />
android:layout_centerHorizontal="true"
android:alpha=".95"
android:background="@color/black" />
<ImageView
android:id="@+id/nextUpPoster"
android:layout_width="150sp"
android:layout_height="300sp"
android:id="@+id/nextUpPoster"
android:layout_centerVertical="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_marginLeft="30sp" />
<TextView
android:id="@+id/nextUpTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Large Text"
android:id="@+id/nextUpTitle"
android:layout_alignTop="@+id/imageView14"
android:layout_marginLeft="20sp"
android:layout_marginTop="5sp"
android:layout_toEndOf="@+id/nextUpPoster"
android:layout_toRightOf="@+id/nextUpPoster"
android:layout_marginTop="5sp"
android:layout_marginLeft="20sp"
android:maxWidth="600sp"
android:maxLines="1" />
android:maxLines="1"
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge" />
<LinearLayout
android:orientation="horizontal"
android:id="@+id/nextUpInfoRow"
android:layout_width="600sp"
android:layout_height="wrap_content"
android:layout_alignStart="@+id/nextUpTitle"
android:id="@+id/nextUpInfoRow"
android:measureWithLargestChild="false"
android:layout_below="@+id/nextUpTitle"
android:layout_alignStart="@+id/nextUpTitle"
android:layout_marginTop="5sp"
android:minHeight="30sp"/>
android:measureWithLargestChild="false"
android:minHeight="30sp"
android:orientation="horizontal" />
<TextView
android:id="@+id/startsIn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="@+id/startsIn"
android:layout_alignParentEnd="true"
android:textSize="18sp"
android:layout_alignBottom="@+id/nextUpTitle"
android:layout_marginRight="40sp" />
android:layout_alignParentEnd="true"
android:layout_marginRight="40sp"
android:text=""
android:textSize="18sp" />
<TextView
android:id="@+id/nextUpSummary"
android:layout_width="wrap_content"
android:layout_height="100sp"
android:id="@+id/nextUpSummary"
android:layout_below="@+id/nextUpInfoRow"
android:layout_toEndOf="@+id/nextUpInfoRow"
android:layout_alignParentEnd="false"
android:layout_alignLeft="@+id/nextUpTitle"
android:layout_marginTop="5sp"
android:layout_alignRight="@+id/nextUpInfoRow"
android:textSize="14sp"
android:maxLines="4"
android:ellipsize="end" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_start_now"
android:id="@+id/nextButton"
android:layout_below="@+id/nextUpInfoRow"
android:background="@drawable/jellyfin_button"
android:layout_alignParentEnd="true"
android:minWidth="120sp"
android:layout_marginRight="20sp" />
<Button
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/btn_stop"
android:id="@+id/cancelButton"
android:background="@drawable/jellyfin_button"
android:layout_below="@+id/nextButton"
android:layout_alignEnd="@+id/nextButton"
android:minWidth="120sp"
android:layout_alignParentEnd="false"
android:layout_marginTop="5sp"
android:layout_alignStart="@+id/nextButton" />
android:layout_toEndOf="@+id/nextUpInfoRow"
android:ellipsize="end"
android:maxLines="4"
android:textSize="14sp" />
<Button
android:id="@+id/nextButton"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/nextUpInfoRow"
android:layout_alignParentEnd="true"
android:layout_marginRight="20sp"
android:background="@drawable/jellyfin_button"
android:minWidth="120sp"
android:text="@string/btn_start_now" />
<Button
android:id="@+id/cancelButton"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/nextButton"
android:layout_alignStart="@+id/nextButton"
android:layout_alignEnd="@+id/nextButton"
android:layout_marginTop="5sp"
android:background="@drawable/jellyfin_button"
android:minWidth="120sp"
android:text="@string/btn_stop" />
</RelativeLayout>
<FrameLayout
android:id="@+id/popupArea"
android:layout_width="fill_parent"
android:layout_height="225sp"
android:id="@+id/popupArea"
android:visibility="gone"
android:layout_gravity="bottom"
android:background="@color/black"
android:layout_gravity="bottom">
android:visibility="gone">
<LinearLayout
android:orientation="horizontal"
android:id="@+id/rows_area"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="left|center_vertical"
android:id="@+id/rows_area"/>
android:orientation="horizontal" />
</FrameLayout>
<RelativeLayout
android:id="@+id/topPanel"
android:layout_width="fill_parent"
android:layout_height="155dp"
android:layout_gravity="center_horizontal|top"
android:id="@+id/topPanel"
android:clickable="false"
android:visibility="invisible">
<org.jellyfin.androidtv.ui.ClockUserView
android:id="@+id/textClock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textClock"
android:layout_alignParentEnd="true"
android:layout_gravity="right|top"
android:layout_marginTop="20sp"
android:layout_marginRight="40sp"
android:layout_alignParentEnd="true" />
android:layout_marginRight="40sp" />
<ImageView
android:id="@+id/logoImage"
android:layout_width="190sp"
android:layout_height="60sp"
android:id="@+id/logoImage"
android:layout_alignTop="@+id/textClock"
android:layout_alignParentStart="true"
android:layout_marginLeft="40sp"
+15 -1
View File
@@ -1,2 +1,16 @@
## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Fri Jan 03 01:05:56 CET 2020
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1024M
android.useAndroidX=true