Remove preference-stub (moved into extension-lib 1.2)

This commit is contained in:
arkon 2020-05-09 11:43:41 -04:00
parent 252d72c204
commit dbcb0117cd
36 changed files with 5 additions and 432 deletions

View File

@ -61,17 +61,8 @@ Notice that we're using `compileOnly` instead of `implementation`, since the app
#### Extensions library
Extensions rely on stubs defined in [tachiyomi-extensions-lib](https://github.com/inorichi/tachiyomi-extensions-lib), which simply provides some interfaces for compiling extensions. These interfaces match what's found in the main Tachiyomi app. The exact version used is configured with `libVersion`. The latest version should be preferred.
Extensions rely on stubs defined in [tachiyomi-extensions-lib](https://github.com/tachiyomi/extensions-lib), which simply provides some interfaces for compiling extensions. These interfaces match what's found in the main Tachiyomi app. The exact version used is configured with `libVersion`. The latest version should be preferred.
#### Preference stub
[`preference-stub`](https://github.com/inorichi/tachiyomi-extensions/tree/master/lib/preference-stub) provides the [`ConfigurableSource` interface](https://github.com/inorichi/tachiyomi-extensions/blob/master/lib/preference-stub/src/main/java/eu/kanade/tachiyomi/source/ConfigurableSource.java) for extensions, as well as stubs for Android preferences.
```
dependencies {
compileOnly project(':preference-stub')
}
```
#### Duktape stub
@ -107,7 +98,7 @@ The structure for an extension is very strict. In the future 1.x release this w
- fetchPopularManga (Optional to override)
- This method takes the results from a manga listing page and parses it.
- popularMangaRequest (Must be overridden)
- The GET/POST for the HTML Page of the manga listings
- The GET/POST for the HTML Page of the manga listings
- popularMangaParse (Optional to override)
- parses the manga listing page returns boolean if has another page, and the manga objects as MangasPage
- popularMangaSelector (must be overridden)
@ -116,10 +107,10 @@ The structure for an extension is very strict. In the future 1.x release this w
- jsoup selectors to parse the individual manga html on the page (most sites this is just link, title, cover url)
- popularMangaNextPageSelector (must be overridden)
- jsoup css selector to see if there is a another page after current one
This will provide the initial viewing once a user clicks into a manga you will need to override mangaDetailsParse and this is where you need to parse the actual manga site's manga page and parse the standard info (title, author, description etc etc)
###### Note:
###### Note:
Must be overriden are required to be overridden even if you override the parent method and its not being called anymore. (for example i override popularMangaParse and dont need popularMangaNextPage selector I would just override in the extension and throw a not used exception)

View File

@ -1,8 +0,0 @@
apply plugin: 'java-library'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
sourceCompatibility = "1.6"
targetCompatibility = "1.6"

View File

@ -1,7 +0,0 @@
package android.content;
/**
* Created by Carlos on 5/9/2018.
*/
public class Context {}

View File

@ -1,9 +0,0 @@
package android.support.v7.preference;
import android.content.Context;
public class CheckBoxPreference extends Preference {
public CheckBoxPreference(Context context) { throw new RuntimeException("Stub!"); }
}

View File

@ -1,21 +0,0 @@
package android.support.v7.preference;
public abstract class DialogPreference extends Preference {
public CharSequence getDialogTitle() {
throw new RuntimeException("Stub!");
}
public void setDialogTitle(CharSequence dialogTitle) {
throw new RuntimeException("Stub!");
}
public CharSequence getDialogMessage() {
throw new RuntimeException("Stub!");
}
public void setDialogMessage(CharSequence dialogMessage) {
throw new RuntimeException("Stub!");
}
}

View File

@ -1,19 +0,0 @@
package android.support.v7.preference;
import android.content.Context;
public class EditTextPreference extends DialogPreference {
public EditTextPreference(Context context) {
throw new RuntimeException("Stub!");
}
public String getText() {
throw new RuntimeException("Stub!");
}
public void setText(String text) {
throw new RuntimeException("Stub!");
}
}

View File

@ -1,43 +0,0 @@
package android.support.v7.preference;
import android.content.Context;
public class ListPreference extends Preference {
public ListPreference(Context context) {
throw new RuntimeException("Stub!");
}
public CharSequence[] getEntries() {
throw new RuntimeException("Stub!");
}
public void setEntries(CharSequence[] entries) {
throw new RuntimeException("Stub!");
}
public int findIndexOfValue(String value) {
throw new RuntimeException("Stub!");
}
public CharSequence[] getEntryValues() {
throw new RuntimeException("Stub!");
}
public void setEntryValues(CharSequence[] entryValues) {
throw new RuntimeException("Stub!");
}
public void setValueIndex(int index) {
throw new RuntimeException("Stub!");
}
public String getValue() {
throw new RuntimeException("Stub!");
}
public void setValue(String value) {
throw new RuntimeException("Stub!");
}
}

View File

@ -1,53 +0,0 @@
package android.support.v7.preference;
public class Preference {
public void setOnPreferenceChangeListener(OnPreferenceChangeListener onPreferenceChangeListener) {
throw new RuntimeException("Stub!");
}
public void setOnPreferenceClickListener(OnPreferenceClickListener onPreferenceClickListener) {
throw new RuntimeException("Stub!");
}
public CharSequence getTitle() {
throw new RuntimeException("Stub!");
}
public void setTitle(CharSequence title) {
throw new RuntimeException("Stub!");
}
public CharSequence getSummary() {
throw new RuntimeException("Stub!");
}
public void setSummary(CharSequence summary) {
throw new RuntimeException("Stub!");
}
public void setEnabled(boolean enabled) {
throw new RuntimeException("Stub!");
}
public String getKey() {
throw new RuntimeException("Stub!");
}
public void setKey(String key) {
throw new RuntimeException("Stub!");
}
public void setDefaultValue(Object defaultValue) {
throw new RuntimeException("Stub!");
}
public interface OnPreferenceChangeListener {
boolean onPreferenceChange(Preference preference, Object newValue);
}
public interface OnPreferenceClickListener {
boolean onPreferenceClick(Preference preference);
}
}

View File

@ -1,15 +0,0 @@
package android.support.v7.preference;
import android.content.Context;
public class PreferenceScreen {
public boolean addPreference(Preference preference) {
throw new RuntimeException("Stub!");
}
public Context getContext() {
throw new RuntimeException("Stub!");
}
}

View File

@ -1,25 +0,0 @@
package android.support.v7.preference;
import android.content.Context;
public class TwoStatePreference extends Preference {
public TwoStatePreference(Context context) { throw new RuntimeException("Stub!"); }
public boolean isChecked() { throw new RuntimeException("Stub!"); }
public void setChecked(boolean checked) { throw new RuntimeException("Stub!"); }
public CharSequence getSummaryOn() { throw new RuntimeException("Stub!"); }
public void setSummaryOn(CharSequence summary) { throw new RuntimeException("Stub!"); }
public CharSequence getSummaryOff() { throw new RuntimeException("Stub!"); }
public void setSummaryOff(CharSequence summary) { throw new RuntimeException("Stub!"); }
public boolean getDisableDependentsState() { throw new RuntimeException("Stub!"); }
public void setDisableDependentsState(boolean disableDependentsState) { throw new RuntimeException("Stub!"); }
}

View File

@ -1,11 +0,0 @@
package androidx.preference;
import android.content.Context;
public class CheckBoxPreference extends Preference {
public CheckBoxPreference(Context context) {
throw new RuntimeException("Stub!");
}
}

View File

@ -1,21 +0,0 @@
package androidx.preference;
public abstract class DialogPreference extends Preference {
public CharSequence getDialogTitle() {
throw new RuntimeException("Stub!");
}
public void setDialogTitle(CharSequence dialogTitle) {
throw new RuntimeException("Stub!");
}
public CharSequence getDialogMessage() {
throw new RuntimeException("Stub!");
}
public void setDialogMessage(CharSequence dialogMessage) {
throw new RuntimeException("Stub!");
}
}

View File

@ -1,19 +0,0 @@
package androidx.preference;
import android.content.Context;
public class EditTextPreference extends DialogPreference {
public EditTextPreference(Context context) {
throw new RuntimeException("Stub!");
}
public String getText() {
throw new RuntimeException("Stub!");
}
public void setText(String text) {
throw new RuntimeException("Stub!");
}
}

View File

@ -1,43 +0,0 @@
package androidx.preference;
import android.content.Context;
public class ListPreference extends Preference {
public ListPreference(Context context) {
throw new RuntimeException("Stub!");
}
public CharSequence[] getEntries() {
throw new RuntimeException("Stub!");
}
public void setEntries(CharSequence[] entries) {
throw new RuntimeException("Stub!");
}
public int findIndexOfValue(String value) {
throw new RuntimeException("Stub!");
}
public CharSequence[] getEntryValues() {
throw new RuntimeException("Stub!");
}
public void setEntryValues(CharSequence[] entryValues) {
throw new RuntimeException("Stub!");
}
public void setValueIndex(int index) {
throw new RuntimeException("Stub!");
}
public String getValue() {
throw new RuntimeException("Stub!");
}
public void setValue(String value) {
throw new RuntimeException("Stub!");
}
}

View File

@ -1,53 +0,0 @@
package androidx.preference;
public class Preference {
public void setOnPreferenceChangeListener(OnPreferenceChangeListener onPreferenceChangeListener) {
throw new RuntimeException("Stub!");
}
public void setOnPreferenceClickListener(OnPreferenceClickListener onPreferenceClickListener) {
throw new RuntimeException("Stub!");
}
public CharSequence getTitle() {
throw new RuntimeException("Stub!");
}
public void setTitle(CharSequence title) {
throw new RuntimeException("Stub!");
}
public CharSequence getSummary() {
throw new RuntimeException("Stub!");
}
public void setSummary(CharSequence summary) {
throw new RuntimeException("Stub!");
}
public void setEnabled(boolean enabled) {
throw new RuntimeException("Stub!");
}
public String getKey() {
throw new RuntimeException("Stub!");
}
public void setKey(String key) {
throw new RuntimeException("Stub!");
}
public void setDefaultValue(Object defaultValue) {
throw new RuntimeException("Stub!");
}
public interface OnPreferenceChangeListener {
boolean onPreferenceChange(Preference preference, Object newValue);
}
public interface OnPreferenceClickListener {
boolean onPreferenceClick(Preference preference);
}
}

View File

@ -1,15 +0,0 @@
package androidx.preference;
import android.content.Context;
public class PreferenceScreen {
public boolean addPreference(Preference preference) {
throw new RuntimeException("Stub!");
}
public Context getContext() {
throw new RuntimeException("Stub!");
}
}

View File

@ -1,25 +0,0 @@
package androidx.preference;
import android.content.Context;
public class TwoStatePreference extends Preference {
public TwoStatePreference(Context context) { throw new RuntimeException("Stub!"); }
public boolean isChecked() { throw new RuntimeException("Stub!"); }
public void setChecked(boolean checked) { throw new RuntimeException("Stub!"); }
public CharSequence getSummaryOn() { throw new RuntimeException("Stub!"); }
public void setSummaryOn(CharSequence summary) { throw new RuntimeException("Stub!"); }
public CharSequence getSummaryOff() { throw new RuntimeException("Stub!"); }
public void setSummaryOff(CharSequence summary) { throw new RuntimeException("Stub!"); }
public boolean getDisableDependentsState() { throw new RuntimeException("Stub!"); }
public void setDisableDependentsState(boolean disableDependentsState) { throw new RuntimeException("Stub!"); }
}

View File

@ -1,9 +0,0 @@
package eu.kanade.tachiyomi.source;
public interface ConfigurableSource {
void setupPreferenceScreen(android.support.v7.preference.PreferenceScreen screen);
void setupPreferenceScreen(androidx.preference.PreferenceScreen screen);
}

View File

@ -4,9 +4,6 @@ project(':lib-ratelimit').projectDir = new File("lib/ratelimit")
include ':duktape-stub'
project(':duktape-stub').projectDir = new File("lib/duktape-stub")
include ':preference-stub'
project(':preference-stub').projectDir = new File("lib/preference-stub")
new File(rootDir, "src").eachDir { dir ->
dir.eachDir { subdir ->
String name = ":${dir.name}-${subdir.name}"

View File

@ -12,7 +12,6 @@ ext {
dependencies {
compileOnly 'com.google.code.gson:gson:2.8.2'
compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0'
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}

View File

@ -10,7 +10,6 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.google.code.gson:gson:2.8.2'
compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0'
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'

View File

@ -10,10 +10,7 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
compileOnly 'com.google.code.gson:gson:2.8.2'
compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0'
}

View File

@ -11,7 +11,6 @@ ext {
dependencies {
implementation project(':lib-ratelimit')
compileOnly project(':preference-stub')
compileOnly 'com.google.code.gson:gson:2.8.2'
compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0'
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'

View File

@ -15,7 +15,6 @@ dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.20.0'
compileOnly 'com.google.code.gson:gson:2.8.2'
compileOnly project(':duktape-stub')
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}

View File

@ -10,7 +10,6 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}

View File

@ -11,7 +11,6 @@ ext {
dependencies {
implementation project(':lib-ratelimit')
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}
apply from: "$rootDir/common.gradle"

View File

@ -10,7 +10,6 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}

View File

@ -10,7 +10,6 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}

View File

@ -10,7 +10,6 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}

View File

@ -10,7 +10,6 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}

View File

@ -10,7 +10,6 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}

View File

@ -10,7 +10,6 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}

View File

@ -10,7 +10,6 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}

View File

@ -10,7 +10,6 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}

View File

@ -10,7 +10,6 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'
}

View File

@ -10,7 +10,6 @@ ext {
}
dependencies {
compileOnly project(':preference-stub')
compileOnly 'com.google.code.gson:gson:2.8.2'
compileOnly 'com.github.salomonbrys.kotson:kotson:2.5.0'
compileOnly 'com.github.inorichi.injekt:injekt-core:65b0440'