pull/32/head
kunfei 5 years ago
parent 8f1a1e7866
commit 6f9d8d7d08
  1. 4
      app/build.gradle
  2. 35
      app/src/debug/res/xml/shortcuts.xml
  3. 4
      app/src/main/res/xml/shortcuts.xml
  4. 6
      build.gradle

@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-kapt'
apply plugin: "de.timfreiheit.resourceplaceholders"
androidExtensions { androidExtensions {
experimental = true experimental = true
@ -66,6 +67,9 @@ android {
} }
} }
resourcePlaceholders {
files = ['xml/shortcuts.xml']
}
kapt { kapt {
arguments { arguments {

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shortcuts xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<shortcut
android:shortcutId="bookRead"
android:enabled="true"
android:icon="@drawable/icon_read_book"
android:shortcutShortLabel="@string/last_read"
android:shortcutLongLabel="@string/last_read"
android:shortcutDisabledMessage="@string/last_read"
tools:ignore="UnusedAttribute">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="io.legado.app.debug"
android:targetClass="io.legado.app.ui.readbook.ReadBookActivity" />
<categories android:name="android.shortcut.conversation" />
</shortcut>
<shortcut
android:shortcutId="bookshelf"
android:enabled="true"
android:icon="@drawable/icon_read_book"
android:shortcutShortLabel="@string/bookshelf"
android:shortcutLongLabel="@string/bookshelf"
android:shortcutDisabledMessage="@string/bookshelf"
tools:ignore="UnusedAttribute">
<intent
android:action="android.intent.action.VIEW"
android:targetPackage="io.legado.app.debug"
android:targetClass="io.legado.app.ui.main.MainActivity" />
<categories android:name="android.shortcut.conversation" />
</shortcut>
</shortcuts>

@ -12,7 +12,7 @@
<intent <intent
android:action="android.intent.action.VIEW" android:action="android.intent.action.VIEW"
android:targetPackage="io.legado.app" android:targetPackage="${applicationId}"
android:targetClass="io.legado.app.ui.readbook.ReadBookActivity" /> android:targetClass="io.legado.app.ui.readbook.ReadBookActivity" />
<categories android:name="android.shortcut.conversation" /> <categories android:name="android.shortcut.conversation" />
</shortcut> </shortcut>
@ -28,7 +28,7 @@
<intent <intent
android:action="android.intent.action.VIEW" android:action="android.intent.action.VIEW"
android:targetPackage="io.legado.app" android:targetPackage="${applicationId}"
android:targetClass="io.legado.app.ui.main.MainActivity" /> android:targetClass="io.legado.app.ui.main.MainActivity" />
<categories android:name="android.shortcut.conversation" /> <categories android:name="android.shortcut.conversation" />
</shortcut> </shortcut>

@ -1,17 +1,17 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.3.41' ext.kotlin_version = '1.3.50'
repositories { repositories {
google() google()
jcenter() jcenter()
maven { url 'https://maven.fabric.io/public' } maven { url 'https://maven.fabric.io/public' }
maven { url 'https://plugins.gradle.org/m2/' }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.0' classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.3'
// in the individual module build.gradle files
} }
} }

Loading…
Cancel
Save