diff --git a/build.gradle b/build.gradle index ba5e367d4..d426d29b9 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,6 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:7.3.1' - classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } diff --git a/mastodon/build.gradle b/mastodon/build.gradle index d47c002c0..4307de622 100644 --- a/mastodon/build.gradle +++ b/mastodon/build.gradle @@ -1,6 +1,5 @@ plugins { id 'com.android.application' - id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' } android { @@ -30,16 +29,6 @@ android { versionNameSuffix '-debug' applicationIdSuffix '.debug' } - appcenterPrivateBeta{ - initWith release - minifyEnabled false - shrinkResources false - versionNameSuffix "-priv-beta" - } - appcenterPublicBeta{ - initWith release - versionNameSuffix "-beta" - } githubRelease{ initWith release } @@ -50,12 +39,6 @@ android { coreLibraryDesugaringEnabled true } sourceSets{ - appcenterPrivateBeta{ - setRoot "src/appcenter" - } - appcenterPublicBeta{ - setRoot "src/appcenter" - } githubRelease{ setRoot "src/github" } @@ -87,12 +70,6 @@ dependencies { annotationProcessor 'org.parceler:parceler:1.1.12' coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' - def appCenterSdkVersion = "4.4.2" - appcenterPrivateBetaImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}" - appcenterPrivateBetaImplementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}" - appcenterPublicBetaImplementation "com.microsoft.appcenter:appcenter-crashes:${appCenterSdkVersion}" - appcenterPublicBetaImplementation "com.microsoft.appcenter:appcenter-distribute:${appCenterSdkVersion}" - androidTestImplementation 'androidx.test:core:1.4.1-alpha05' androidTestImplementation 'androidx.test.ext:junit:1.1.4-alpha05' androidTestImplementation 'androidx.test:runner:1.5.0-alpha02' diff --git a/mastodon/proguard-rules.pro b/mastodon/proguard-rules.pro index 5df0bfc22..506be84e2 100644 --- a/mastodon/proguard-rules.pro +++ b/mastodon/proguard-rules.pro @@ -40,12 +40,6 @@ @com.squareup.otto.Subscribe ; } --keep class com.microsoft.appcenter.** { - *; -} - --keep class org.joinmastodon.android.AppCenterWrapper { *; } - -keepattributes LineNumberTable # Parceler library diff --git a/mastodon/src/appcenter/java/org/joinmastodon/android/AppCenterWrapper.java b/mastodon/src/appcenter/java/org/joinmastodon/android/AppCenterWrapper.java deleted file mode 100644 index e027da17c..000000000 --- a/mastodon/src/appcenter/java/org/joinmastodon/android/AppCenterWrapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.joinmastodon.android; - -import android.app.Application; -import android.util.Log; - -import com.microsoft.appcenter.AppCenter; -import com.microsoft.appcenter.crashes.Crashes; -import com.microsoft.appcenter.distribute.Distribute; -import com.microsoft.appcenter.distribute.UpdateTrack; - -public class AppCenterWrapper{ - private static final String TAG="AppCenterWrapper"; - - public static void init(Application app){ - if(AppCenter.isConfigured()) - return; - Log.i(TAG, "initializing AppCenter SDK, build type is "+BuildConfig.BUILD_TYPE); - - if(BuildConfig.BUILD_TYPE.equals("appcenterPrivateBeta")) - Distribute.setUpdateTrack(UpdateTrack.PRIVATE); - AppCenter.start(app, BuildConfig.appCenterKey, Distribute.class, Crashes.class); - } -} diff --git a/mastodon/src/main/java/org/joinmastodon/android/MainActivity.java b/mastodon/src/main/java/org/joinmastodon/android/MainActivity.java index 81bbf89b6..d98df3d10 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/MainActivity.java +++ b/mastodon/src/main/java/org/joinmastodon/android/MainActivity.java @@ -1,10 +1,8 @@ package org.joinmastodon.android; import android.Manifest; -import android.app.Application; import android.app.Fragment; import android.content.Intent; -import android.content.pm.PackageInstaller; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; @@ -24,8 +22,6 @@ import org.joinmastodon.android.ui.utils.UiUtils; import org.joinmastodon.android.updater.GithubSelfUpdater; import org.parceler.Parcels; -import java.lang.reflect.InvocationTargetException; - import androidx.annotation.Nullable; import me.grishka.appkit.FragmentStackActivity; @@ -70,12 +66,7 @@ public class MainActivity extends FragmentStackActivity{ } } - if(BuildConfig.BUILD_TYPE.startsWith("appcenter")){ - // Call the appcenter SDK wrapper through reflection because it is only present in beta builds - try{ - Class.forName("org.joinmastodon.android.AppCenterWrapper").getMethod("init", Application.class).invoke(null, getApplication()); - }catch(ClassNotFoundException|NoSuchMethodException|IllegalAccessException|InvocationTargetException ignore){} - }else if(GithubSelfUpdater.needSelfUpdating()){ + if(GithubSelfUpdater.needSelfUpdating()){ GithubSelfUpdater.getInstance().maybeCheckForUpdates(); } } diff --git a/mastodon/src/main/java/org/joinmastodon/android/MastodonApp.java b/mastodon/src/main/java/org/joinmastodon/android/MastodonApp.java index 84333cbe9..8561fd7f2 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/MastodonApp.java +++ b/mastodon/src/main/java/org/joinmastodon/android/MastodonApp.java @@ -6,8 +6,6 @@ import android.content.Context; import org.joinmastodon.android.api.PushSubscriptionManager; -import java.lang.reflect.InvocationTargetException; - import me.grishka.appkit.imageloader.ImageCache; import me.grishka.appkit.utils.NetworkUtils; import me.grishka.appkit.utils.V;