Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkaW committed Feb 18, 2021
1 parent f3c0d70 commit a2e6382
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 51 deletions.
22 changes: 20 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,26 @@ android.applicationVariants.all { variant ->
}

repositories {
maven {
url 'https://jitpack.io'
content {
includeGroup("com.github.topjohnwu.libsu")
}
}
maven {
url 'https://dl.bintray.com/rikkaw/MaterialPreference'
content {
includeGroup("moe.shizuku.preference")
}
}
maven {
url 'https://dl.bintray.com/rikkaw/Libraries'
content {
includeGroupByRegex("rikka.*")
}
}
jcenter()
google()
maven { url 'https://dl.bintray.com/rikkaw/Libraries' }
}

configurations.all {
Expand All @@ -105,10 +122,11 @@ dependencies {
implementation "rikka.html:html-ktx:$rikka_html_version"
implementation "rikka.material:material:$rikka_material_version"
implementation "rikka.recyclerview:recyclerview-utils:$rikka_recyclerview_utils_version"
implementation "rikka.widget:borderview:1.0.0"
implementation "moe.shizuku.preference:preference-appcompat:$rikka_preference_version"
implementation "moe.shizuku.preference:preference-simplemenu-appcompat:$rikka_preference_version"

def libsuVersion = '3.0.2'
def libsuVersion = '3.1.1'
implementation "com.github.topjohnwu.libsu:core:${libsuVersion}"

def shizuku_version = '11.0.2'
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/moe/haruue/wadb/component/HomeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import moe.haruue.wadb.util.NotificationHelper
import moe.haruue.wadb.util.ScreenKeeper
import moe.haruue.wadb.wadbApplication
import moe.shizuku.preference.*
import rikka.material.widget.BorderRecyclerView
import rikka.material.widget.BorderView
import rikka.recyclerview.addVerticalPadding
import rikka.recyclerview.fixEdgeEffect
import rikka.widget.borderview.BorderRecyclerView
import rikka.widget.borderview.BorderView

class HomeFragment : PreferenceFragment(), WadbStateChangedEvent, WadbFailureEvent, SharedPreferences.OnSharedPreferenceChangeListener {

Expand Down
45 changes: 5 additions & 40 deletions app/src/main/java/moe/haruue/wadb/util/SuShell.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
public class SuShell {

static {
Shell.Config.setFlags(Shell.FLAG_REDIRECT_STDERR);
Shell.Config.verboseLogging(BuildConfig.DEBUG);
Shell.Config.setTimeout(10);
Shell.enableVerboseLogging = BuildConfig.DEBUG;
Shell.setDefaultBuilder(Shell.Builder.create()
.setFlags(Shell.FLAG_REDIRECT_STDERR)
.setTimeout(10));
}

/**
Expand Down Expand Up @@ -84,7 +85,7 @@ public synchronized static boolean available() {
} catch (IOException e) {
e.printStackTrace();
}
Shell.newInstance();
Shell.getShell();
Shell.su("echo test").exec();
}
return Shell.rootAccess();
Expand Down Expand Up @@ -118,40 +119,4 @@ public synchronized static Result run(String... commands) {
Shell.Result result = Shell.su(commands).exec();
return new Result(result.getCode(), result.getOut());
}

public static class Interactive {

public interface Callback {
void onLine(String line);

void onResult(Result result);
}

public static void run(String command, Callback callback) {
run(new String[]{command}, callback);
}

public static void run(List<String> commands, Callback callback) {
run(commands.toArray(new String[0]), callback);
}

public static void run(String[] commands, Callback callback) {
Shell.su(commands).to(new CallbackList<String>() {
@Override
public void onAddElement(String s) {
if (callback != null) {
callback.onLine(s);
}
}
}).submit(result -> {
if (callback != null) {
callback.onResult(new Result(result.getCode(), result.getOut()));
}
});
}

public static void close() {
SuShell.close();
}
}
}
6 changes: 3 additions & 3 deletions app/src/main/res/layout/preference_recyclerview.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<rikka.material.widget.BorderRecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
<rikka.widget.borderview.BorderRecyclerView 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="@android:id/list"
Expand All @@ -11,9 +11,9 @@
android:paddingBottom="0dp"
android:scrollbarStyle="insideOverlay"
android:scrollbars="vertical"
app:borderBottomStyle="never"
app:borderBottomVisibility="never"
app:borderTopDrawable="@null"
app:borderTopStyle="whenTop"
app:borderTopVisibility="whenTop"
app:fitSystemWindowsInsets="bottom"
app:layout_fitSystemWindowsInsets="top"
tools:ignore="UnusedResources"
Expand Down
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ allprojects {
repositories {
jcenter()
google()
maven { url 'https://jitpack.io' }
maven { url 'https://dl.bintray.com/rikkaw/MaterialPreference' }
}
}

Expand Down
4 changes: 2 additions & 2 deletions manifest.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ext {
gradle_plugin_version = '4.1.2'
kotlin_version = '1.4.21'
kotlin_version = '1.4.30'

min_sdk = 23
target_sdk = 30
Expand All @@ -14,7 +14,7 @@ ext {
rikka_annotation_version = "1.0.0"
rikka_appcompat_version = "1.2.0-rc01"
rikka_core_version = "1.3.0"
rikka_material_version = "1.5.0"
rikka_material_version = "1.6.0"
rikka_html_version = "1.1.1"
rikka_recyclerview_utils_version = "1.2.0"

Expand Down

0 comments on commit a2e6382

Please sign in to comment.