update kotlin plugin for gradle

This commit is contained in:
dkanada 2021-04-24 18:57:32 +09:00
commit d301b34453
7 changed files with 24 additions and 26 deletions

View file

@ -46,18 +46,17 @@ android {
}
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.30'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
implementation 'com.github.jellyfin.jellyfin-apiclient-java:android:0.7.3'
implementation 'com.github.woltapp:blurhash:f41a23cc50'
implementation 'com.google.android.exoplayer:exoplayer:2.12.2'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.media:media:1.3.0'
implementation 'androidx.fragment:fragment-ktx:1.3.2'
implementation 'androidx.fragment:fragment-ktx:1.3.3'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.2.0'

View file

@ -27,7 +27,6 @@ public class AppShortcutLauncherActivity extends Activity {
Bundle extras = getIntent().getExtras();
if (extras != null) {
// noinspection WrongConstant
shortcutType = extras.getInt(EXTRA_SHORTCUT, SHORTCUT_TYPE_DEFAULT);
}

View file

@ -28,11 +28,11 @@ public class DynamicShortcutManager {
public static ShortcutInfo createShortcut(Context context, String id, String shortLabel, String longLabel, Icon icon, Intent intent) {
return new ShortcutInfo.Builder(context, id)
.setShortLabel(shortLabel)
.setLongLabel(longLabel)
.setIcon(icon)
.setIntent(intent)
.build();
.setShortLabel(shortLabel)
.setLongLabel(longLabel)
.setIcon(icon)
.setIntent(intent)
.build();
}
public void initDynamicShortcuts() {
@ -47,13 +47,13 @@ public class DynamicShortcutManager {
public List<ShortcutInfo> getDefaultShortcuts() {
return Arrays.asList(
new ShuffleShortcutType(context).getShortcutInfo(),
new FrequentShortcutType(context).getShortcutInfo(),
new LatestShortcutType(context).getShortcutInfo()
new ShuffleShortcutType(context).getShortcutInfo(),
new FrequentShortcutType(context).getShortcutInfo(),
new LatestShortcutType(context).getShortcutInfo()
);
}
public static void reportShortcutUsed(Context context, String shortcutId){
public static void reportShortcutUsed(Context context, String shortcutId) {
context.getSystemService(ShortcutManager.class).reportShortcutUsed(shortcutId);
}
}

View file

@ -21,9 +21,9 @@ public final class FrequentShortcutType extends BaseShortcutType {
public ShortcutInfo getShortcutInfo() {
return new ShortcutInfo.Builder(context, getId())
.setShortLabel(context.getString(R.string.my_top_tracks))
.setIcon(AppShortcutIconGenerator.generateThemedIcon(context, R.drawable.ic_app_shortcut_top_tracks))
.setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_FREQUENT))
.build();
.setShortLabel(context.getString(R.string.my_top_tracks))
.setIcon(AppShortcutIconGenerator.generateThemedIcon(context, R.drawable.ic_app_shortcut_top_tracks))
.setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_FREQUENT))
.build();
}
}

View file

@ -21,9 +21,9 @@ public final class LatestShortcutType extends BaseShortcutType {
public ShortcutInfo getShortcutInfo() {
return new ShortcutInfo.Builder(context, getId())
.setShortLabel(context.getString(R.string.last_added))
.setIcon(AppShortcutIconGenerator.generateThemedIcon(context, R.drawable.ic_app_shortcut_last_added))
.setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_LATEST))
.build();
.setShortLabel(context.getString(R.string.last_added))
.setIcon(AppShortcutIconGenerator.generateThemedIcon(context, R.drawable.ic_app_shortcut_last_added))
.setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_LATEST))
.build();
}
}

View file

@ -21,9 +21,9 @@ public final class ShuffleShortcutType extends BaseShortcutType {
public ShortcutInfo getShortcutInfo() {
return new ShortcutInfo.Builder(context, getId())
.setShortLabel(context.getString(R.string.action_shuffle))
.setIcon(AppShortcutIconGenerator.generateThemedIcon(context, R.drawable.ic_app_shortcut_shuffle_all))
.setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_SHUFFLE))
.build();
.setShortLabel(context.getString(R.string.action_shuffle))
.setIcon(AppShortcutIconGenerator.generateThemedIcon(context, R.drawable.ic_app_shortcut_shuffle_all))
.setIntent(getPlaySongsIntent(AppShortcutLauncherActivity.SHORTCUT_TYPE_SHUFFLE))
.build();
}
}

View file

@ -7,7 +7,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.30'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.32'
}
}