fix build issues

Signed-off-by: androidacy-user <opensource@androidacy.com>
pull/27/head
androidacy-user 2 years ago
parent d51dbef19f
commit 93b44ac4b0

@ -7,11 +7,12 @@ import java.util.Properties
plugins { plugins {
// Gradle doesn't allow conditionally enabling/disabling plugins // Gradle doesn't allow conditionally enabling/disabling plugins
id("io.sentry.android.gradle")
id("com.android.application") id("com.android.application")
id("org.gradle.android.cache-fix")
id("com.mikepenz.aboutlibraries.plugin") id("com.mikepenz.aboutlibraries.plugin")
kotlin("android") kotlin("android")
kotlin("kapt") kotlin("kapt")
id("io.sentry.android.gradle")
} }
// apply realm-android // apply realm-android

@ -170,4 +170,4 @@ class AppUpdateManager private constructor() {
) && appUpdateManager.getCompatibilityFlags(repoId) and FLAG_COMPAT_FORCE_HIDE != 0 ) && appUpdateManager.getCompatibilityFlags(repoId) and FLAG_COMPAT_FORCE_HIDE != 0
} }
} }
} }

@ -351,7 +351,7 @@ public class MainActivity extends FoxActivity implements SwipeRefreshLayout.OnRe
} }
// update compat metadata // update compat metadata
if (BuildConfig.DEBUG) Timber.i("Check Update Compat"); if (BuildConfig.DEBUG) Timber.i("Check Update Compat");
AppUpdateManager.getAppUpdateManager().checkUpdateCompat(); AppUpdateManager.Companion.getAppUpdateManager().checkUpdateCompat();
if (BuildConfig.DEBUG) Timber.i("Check Update"); if (BuildConfig.DEBUG) Timber.i("Check Update");
// update repos // update repos
if (Http.hasWebView()) { if (Http.hasWebView()) {
@ -375,7 +375,7 @@ public class MainActivity extends FoxActivity implements SwipeRefreshLayout.OnRe
return; return;
} }
// Compatibility data still needs to be updated // Compatibility data still needs to be updated
AppUpdateManager appUpdateManager = AppUpdateManager.getAppUpdateManager(); AppUpdateManager appUpdateManager = AppUpdateManager.Companion.getAppUpdateManager();
if (BuildConfig.DEBUG) Timber.i("Check App Update"); if (BuildConfig.DEBUG) Timber.i("Check App Update");
if (BuildConfig.ENABLE_AUTO_UPDATER && appUpdateManager.checkUpdate(true)) if (BuildConfig.ENABLE_AUTO_UPDATER && appUpdateManager.checkUpdate(true))
moduleViewListBuilder.addNotification(NotificationType.UPDATE_AVAILABLE); moduleViewListBuilder.addNotification(NotificationType.UPDATE_AVAILABLE);
@ -554,7 +554,7 @@ public class MainActivity extends FoxActivity implements SwipeRefreshLayout.OnRe
moduleViewListBuilder.addNotification(NotificationType.SHOWCASE_MODE); moduleViewListBuilder.addNotification(NotificationType.SHOWCASE_MODE);
NotificationType.NEED_CAPTCHA_ANDROIDACY.autoAdd(moduleViewListBuilderOnline); NotificationType.NEED_CAPTCHA_ANDROIDACY.autoAdd(moduleViewListBuilderOnline);
NotificationType.NO_INTERNET.autoAdd(moduleViewListBuilderOnline); NotificationType.NO_INTERNET.autoAdd(moduleViewListBuilderOnline);
if (AppUpdateManager.getAppUpdateManager().checkUpdate(false)) if (AppUpdateManager.Companion.getAppUpdateManager().checkUpdate(false))
moduleViewListBuilder.addNotification(NotificationType.UPDATE_AVAILABLE); moduleViewListBuilder.addNotification(NotificationType.UPDATE_AVAILABLE);
RepoManager.getINSTANCE().updateEnabledStates(); RepoManager.getINSTANCE().updateEnabledStates();
if (RepoManager.getINSTANCE().getCustomRepoManager().needUpdate()) { if (RepoManager.getINSTANCE().getCustomRepoManager().needUpdate()) {
@ -607,7 +607,7 @@ public class MainActivity extends FoxActivity implements SwipeRefreshLayout.OnRe
moduleViewListBuilder.addNotification(NotificationType.REPO_UPDATE_FAILED); moduleViewListBuilder.addNotification(NotificationType.REPO_UPDATE_FAILED);
} else { } else {
// Compatibility data still needs to be updated // Compatibility data still needs to be updated
AppUpdateManager appUpdateManager = AppUpdateManager.getAppUpdateManager(); AppUpdateManager appUpdateManager = AppUpdateManager.Companion.getAppUpdateManager();
if (BuildConfig.DEBUG) Timber.i("Check App Update"); if (BuildConfig.DEBUG) Timber.i("Check App Update");
if (BuildConfig.ENABLE_AUTO_UPDATER && appUpdateManager.checkUpdate(true)) if (BuildConfig.ENABLE_AUTO_UPDATER && appUpdateManager.checkUpdate(true))
moduleViewListBuilder.addNotification(NotificationType.UPDATE_AVAILABLE); moduleViewListBuilder.addNotification(NotificationType.UPDATE_AVAILABLE);

@ -12,9 +12,9 @@ import timber.log.Timber
import java.nio.charset.StandardCharsets import java.nio.charset.StandardCharsets
import java.util.concurrent.atomic.AtomicBoolean import java.util.concurrent.atomic.AtomicBoolean
class RepoUpdater(val repoData: RepoData) { class RepoUpdater(val repoData2: RepoData) {
private var indexRaw: ByteArray? = null private var indexRaw: ByteArray? = null
public var repoData = repoData @JvmField public var repoData: RepoData = repoData2
private var toUpdate: List<RepoModule>? = null private var toUpdate: List<RepoModule>? = null
private var toApply: Collection<RepoModule>? = null private var toApply: Collection<RepoModule>? = null
fun fetchIndex(): Int { fun fetchIndex(): Int {

@ -686,7 +686,7 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
final LibsBuilder libsBuilder = new LibsBuilder().withShowLoadingProgress(false).withLicenseShown(true).withAboutMinimalDesign(false); final LibsBuilder libsBuilder = new LibsBuilder().withShowLoadingProgress(false).withLicenseShown(true).withAboutMinimalDesign(false);
ClipboardManager clipboard = (ClipboardManager) requireContext().getSystemService(Context.CLIPBOARD_SERVICE); ClipboardManager clipboard = (ClipboardManager) requireContext().getSystemService(Context.CLIPBOARD_SERVICE);
LongClickablePreference linkClickable = findPreference("pref_update"); LongClickablePreference linkClickable = findPreference("pref_update");
linkClickable.setVisible(BuildConfig.ENABLE_AUTO_UPDATER && (BuildConfig.DEBUG || AppUpdateManager.getAppUpdateManager().peekHasUpdate())); linkClickable.setVisible(BuildConfig.ENABLE_AUTO_UPDATER && (BuildConfig.DEBUG || AppUpdateManager.Companion.getAppUpdateManager().peekHasUpdate()));
linkClickable.setOnPreferenceClickListener(p -> { linkClickable.setOnPreferenceClickListener(p -> {
devModeStep = 0; devModeStep = 0;
// open UpdateActivity with CHECK action // open UpdateActivity with CHECK action

@ -20,8 +20,9 @@ buildscript {
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
classpath("io.realm:realm-gradle-plugin:10.15.1") classpath("io.realm:realm-gradle-plugin:10.16.0")
classpath("io.sentry:sentry-android-gradle-plugin:3.7.0") classpath("io.sentry:sentry-android-gradle-plugin:3.7.0")
classpath("org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin:2.7.1")
} }
} }

Loading…
Cancel
Save