Merge pull request #4269 from nextcloud/daggerBump

combined dagger bump
This commit is contained in:
Tobias Kaminsky 2019-07-29 09:17:07 +02:00 committed by GitHub
commit 53a4844ab2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 54 deletions

View file

@ -56,6 +56,7 @@ configurations {
ext {
jacocoVersion = "0.8.2"
daggerVersion = "2.24"
androidLibraryVersion = "master-SNAPSHOT"
travisBuild = System.getenv("TRAVIS") == "true"
@ -285,11 +286,11 @@ dependencies {
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.9.0'
spotbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.4.6'
implementation 'com.google.dagger:dagger:2.23.2'
implementation 'com.google.dagger:dagger-android:2.23.2'
implementation 'com.google.dagger:dagger-android-support:2.23.2'
kapt 'com.google.dagger:dagger-compiler:2.23.2'
kapt 'com.google.dagger:dagger-android-processor:2.23.2'
implementation "com.google.dagger:dagger:$daggerVersion"
implementation "com.google.dagger:dagger-android:$daggerVersion"
implementation "com.google.dagger:dagger-android-support:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
compileOnly "org.projectlombok:lombok:1.18.8"
annotationProcessor "org.projectlombok:lombok:1.18.8"

View file

@ -27,9 +27,6 @@ import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@ -91,15 +88,10 @@ import androidx.annotation.RequiresApi;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.core.util.Pair;
import androidx.fragment.app.Fragment;
import androidx.multidex.MultiDexApplication;
import dagger.android.AndroidInjector;
import dagger.android.DispatchingAndroidInjector;
import dagger.android.HasActivityInjector;
import dagger.android.HasBroadcastReceiverInjector;
import dagger.android.HasContentProviderInjector;
import dagger.android.HasServiceInjector;
import dagger.android.support.HasSupportFragmentInjector;
import dagger.android.HasAndroidInjector;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import static com.owncloud.android.ui.activity.ContactsPreferenceActivity.PREFERENCE_CONTACTS_AUTOMATIC_BACKUP;
@ -110,12 +102,7 @@ import static com.owncloud.android.ui.activity.ContactsPreferenceActivity.PREFER
* <p>
* Contains methods to build the "static" strings. These strings were before constants in different classes
*/
public class MainApp extends MultiDexApplication implements
HasActivityInjector,
HasSupportFragmentInjector,
HasServiceInjector,
HasContentProviderInjector,
HasBroadcastReceiverInjector {
public class MainApp extends MultiDexApplication implements HasAndroidInjector {
public static final OwnCloudVersion OUTDATED_SERVER_VERSION = OwnCloudVersion.nextcloud_13;
public static final OwnCloudVersion MINIMUM_SUPPORTED_SERVER_VERSION = OwnCloudVersion.nextcloud_12;
@ -132,19 +119,7 @@ public class MainApp extends MultiDexApplication implements
protected AppPreferences preferences;
@Inject
protected DispatchingAndroidInjector<Activity> dispatchingActivityInjector;
@Inject
protected DispatchingAndroidInjector<Fragment> dispatchingFragmentInjector;
@Inject
protected DispatchingAndroidInjector<Service> dispatchingServiceInjector;
@Inject
protected DispatchingAndroidInjector<ContentProvider> dispatchingContentProviderInjector;
@Inject
protected DispatchingAndroidInjector<BroadcastReceiver> dispatchingBroadcastReceiverInjector;
protected DispatchingAndroidInjector<Object> dispatchingAndroidInjector;
@Inject
protected UserAccountManager accountManager;
@ -732,27 +707,8 @@ public class MainApp extends MultiDexApplication implements
}
@Override
public AndroidInjector<Activity> activityInjector() {
return dispatchingActivityInjector;
public AndroidInjector<Object> androidInjector() {
return dispatchingAndroidInjector;
}
@Override
public AndroidInjector<Fragment> supportFragmentInjector() {
return dispatchingFragmentInjector;
}
@Override
public AndroidInjector<Service> serviceInjector() {
return dispatchingServiceInjector;
}
@Override
public AndroidInjector<ContentProvider> contentProviderInjector() {
return dispatchingContentProviderInjector;
}
@Override
public AndroidInjector<BroadcastReceiver> broadcastReceiverInjector() {
return dispatchingBroadcastReceiverInjector;
}
}