Merge branch 'fork' of github.com:sk22/megalodon into fork
This commit is contained in:
commit
f2a0680af0
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -40,12 +40,6 @@
|
|||
@com.squareup.otto.Subscribe <methods>;
|
||||
}
|
||||
|
||||
-keep class com.microsoft.appcenter.** {
|
||||
*;
|
||||
}
|
||||
|
||||
-keep class org.joinmastodon.android.AppCenterWrapper { *; }
|
||||
|
||||
-keepattributes LineNumberTable
|
||||
|
||||
# Parceler library
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue