Trying to Add own repo

pull/107/head
DerGoogler 2 years ago
parent 7b186dc257
commit 5ea45b8a59

@ -32,6 +32,12 @@ public final class RepoManager {
public static final String ANDROIDACY_MAGISK_REPO_HOMEPAGE =
"https://www.androidacy.com/modules-repo";
public static final String DG_MAGISK_REPO =
"https://raw.githubusercontent.com/Googlers-Magisk-Repo/json/master/modules.json";
public static final String DG_MAGISK_REPO_HOMEPAGE =
"https://github.com/orgs/Googlers-Magisk-Repo/repositories?type=source";
private static final Object lock = new Object();
private static volatile RepoManager INSTANCE;
@ -237,6 +243,8 @@ public final class RepoManager {
return "magisk_alt_repo";
case ANDROIDACY_MAGISK_REPO_ENDPOINT:
return "androidacy_repo";
case DG_MAGISK_REPO:
return "dg_magisk_repo";
default:
return "repo_" + Hashes.hashSha1(
url.getBytes(StandardCharsets.UTF_8));

@ -190,6 +190,12 @@ public class SettingsActivity extends CompatActivity {
"https://t.me/androidacy_discussions",
"https://patreon.com/androidacy",
"https://www.androidacy.com/module-repository-applications/");
setRepoData(RepoManager.DG_MAGISK_REPO,
"Googlers Magisk Repo",
RepoManager.DG_MAGISK_REPO_HOMEPAGE,
null,
null,
null);
}
private void setRepoData(String url,

@ -56,4 +56,19 @@
app:summary="@string/androidacy_repo_info"
app:singleLineTitle="false" />
</PreferenceCategory>
<PreferenceCategory
app:key="pref_dg_magisk_repo"
app:title="@string/loading">
<SwitchPreferenceCompat
app:key="pref_dg_magisk_repo_enabled"
app:icon="@drawable/ic_baseline_extension_24"
app:switchTextOn="@string/repo_enabled"
app:switchTextOff="@string/repo_enabled"
app:singleLineTitle="false" />
<Preference
app:key="pref_dg_magisk_repo_website"
app:icon="@drawable/ic_baseline_language_24"
app:title="@string/website"
app:singleLineTitle="false" />
</PreferenceCategory>
</PreferenceScreen>

@ -2,5 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionSha256Sum=9afb3ca688fc12c761a0e9e4321e4d24e977a4a8916c8a768b1fe05ddb4d6b66
zipStorePath=wrapper/dists
Loading…
Cancel
Save