Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade libs #297

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@ android {
}

dependencies {
api 'androidx.palette:palette:1.0.0-rc01'
api 'androidx.appcompat:appcompat:1.0.0-rc01'
api 'androidx.annotation:annotation:1.0.0-rc01'
api 'com.google.android.material:material:1.0.0-rc01'
api 'androidx.palette:palette:1.0.0'
api "androidx.appcompat:appcompat:$androidXVersion"
api "androidx.annotation:annotation:$androidXVersion"
api "com.google.android.material:material:1.0.0"

debugImplementation 'com.github.simonpercic:oklog3:2.2.0'

api 'com.jakewharton.timber:timber:4.7.0'
api "com.squareup.okhttp3:okhttp:$okHttpVersion"
api "com.google.code.gson:gson:$gsonVersion"
api "com.jakewharton:butterknife:$butterknifeVersion"
implementation "com.jakewharton:butterknife:$butterknifeVersion"
kapt "com.jakewharton:butterknife-compiler:$butterknifeVersion"
api "com.github.gabrielemariotti.changeloglib:changelog:$changeloglibVersion"
api 'com.jakewharton.threetenabp:threetenabp:1.1.0'
api 'com.koushikdutta.async:androidasync:2.1.9'
Expand Down Expand Up @@ -72,10 +73,9 @@ dependencies {
api project(':provider:subs:mock')
api project(':provider:subs:opensubs')

annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
annotationProcessor "com.google.dagger:dagger-android-processor:$daggerVersion"
annotationProcessor "com.jakewharton:butterknife-compiler:$butterknifeVersion"
annotationProcessor "com.github.bumptech.glide:compiler:$glideVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"
kapt "com.github.bumptech.glide:compiler:$glideVersion"

compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@

package butter.droid.base.data;

import butter.droid.provider.base.ProviderScope;
import java.util.Set;

import dagger.Module;
import dagger.multibindings.Multibinds;
import java.util.Set;
import okhttp3.Interceptor;

@Module
public interface DataBindModule {

@Multibinds @ProviderScope Set<Interceptor> provideIntercptors();
@Multibinds
Set<Interceptor> provideIntercptors();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PeroviderScope should stay in as it is important for third parties implementing ther own providers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed as I updated Dagger and it does not allow Scopes on Multibinding anymore


}
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
package butter.droid.base.providers;

import butter.droid.base.manager.internal.provider.model.ProviderWrapper;
import butter.droid.provider.base.ProviderScope;
import dagger.Module;
import dagger.multibindings.Multibinds;
import java.util.Set;

@Module
public interface ProviderBindModule {

@Multibinds @ProviderScope Set<ProviderWrapper> multibindProviderWrapper();
@Multibinds Set<ProviderWrapper> multibindProviderWrapper();

}
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
)
public class ProviderModule {

@Provides @ProviderScope @IntoSet ProviderWrapper provideVodoWrapper(final VodoProvider vodoProvider,
@Provides @IntoSet ProviderWrapper provideVodoWrapper(final VodoProvider vodoProvider,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ProviderScope should stay in

final OpenSubsProvider openSubsProvider) {
return new ProviderWrapper(vodoProvider, openSubsProvider, R.string.vodo_label, R.drawable.ic_nav_movies, 2);
}

@Provides @ProviderScope @IntoSet ProviderWrapper provideMockWrapper(final MockMediaProvider mockProvider,
@Provides @IntoSet ProviderWrapper provideMockWrapper(final MockMediaProvider mockProvider,
final MockSubsProvider mockSubsProvider) {
return new ProviderWrapper(mockProvider, mockSubsProvider, butter.droid.provider.mock.R.string.title_movies,
butter.droid.provider.mock.R.drawable.ic_nav_movies, 1);
Expand Down
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import si.kamino.gradle.extensions.version.code.IncreaseVersionCode

buildscript {
ext {
kotlinVersion = '1.2.60'
kotlinVersion = '1.3.50'
}

repositories {
Expand All @@ -12,7 +12,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.0-alpha08'
classpath 'com.android.tools.build:gradle:3.6.0-beta03'
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath "gradle.plugin.si.kamino.gradle:android-version:1.5.3"
Expand All @@ -29,17 +29,18 @@ ext {
compileSdk = 28
minSdk = 19
minSdkTV = 21
butterknifeVersion = "9.0.0-SNAPSHOT"
butterknifeVersion = "10.2.0"
okHttpVersion = "3.10.0"
daggerVersion = "2.16"
daggerVersion = "2.24"
javaxAnnotationVersion = "1.2"
torrentstreamVersion = '2.5.0'
filePickerVersion = '1.1.0'
changeloglibVersion = '2.1.0'
gsonVersion = '2.8.1'
rxJavaVersion = '2.1.13'
retrofitVersion = '2.4.0'
glideVersion = '4.8.0-SNAPSHOT'
glideVersion = '4.9.0'
androidXVersion = '1.1.0'
}

allprojects {
Expand Down
1 change: 1 addition & 0 deletions config/gradle/android-common-config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

apply from: "${project.rootDir}/config/gradle/checkstyle.gradle"
apply from: "${project.rootDir}/config/gradle/android-kotlin-config.gradle"

android {
compileSdkVersion rootProject.ext.compileSdk
Expand Down
4 changes: 2 additions & 2 deletions connectsdk/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ dependencies {
implementation files('libs/java-websocket-patch.jar')
implementation files('libs/javax.jmdns_3.4.1-patch2.jar')

implementation 'androidx.appcompat:appcompat:1.0.0-rc01'
implementation 'androidx.mediarouter:mediarouter:1.0.0-alpha5'
implementation "androidx.appcompat:appcompat:$androidXVersion"
implementation "androidx.mediarouter:mediarouter:$androidXVersion"

testImplementation 'org.apache.maven:maven-ant-tasks:2.1.3'
testImplementation 'junit:junit:4.12'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryErro
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.parallel=true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may cause issues in ci

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it actually do it? would you mind if I add a check to disable on CI? this helps speed when building locally

org.gradle.daemon=true
android.useAndroidX=true
android.enableJetifier=true
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sat Aug 25 14:36:02 CEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 2 additions & 0 deletions mobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ dependencies {

kapt "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"

implementation "com.jakewharton:butterknife:$butterknifeVersion"
kapt "com.jakewharton:butterknife-compiler:$butterknifeVersion"

compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
Expand Down
4 changes: 2 additions & 2 deletions provider/media/mock/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Butter. If not, see <http://www.gnu.org/licenses/>.
*/

apply plugin: 'com.android.library'
apply from: "${project.rootDir}/config/gradle/android-library-config.gradle"

android {
compileSdkVersion rootProject.ext.compileSdk
Expand Down Expand Up @@ -57,7 +57,7 @@ dependencies {
implementation "com.google.code.gson:gson:$gsonVersion"
implementation 'com.squareup.okio:okio:1.14.0'

annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"

compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"

Expand Down
4 changes: 2 additions & 2 deletions provider/media/vodo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Butter. If not, see <http://www.gnu.org/licenses/>.
*/

apply plugin: 'com.android.library'
apply from: "${project.rootDir}/config/gradle/android-library-config.gradle"

android {
compileSdkVersion rootProject.ext.compileSdk
Expand Down Expand Up @@ -58,7 +58,7 @@ dependencies {
api "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
api "com.squareup.retrofit2:converter-gson:$retrofitVersion"

annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"

testImplementation 'junit:junit:4.12'
testImplementation 'org.robolectric:robolectric:3.4'
Expand Down
4 changes: 2 additions & 2 deletions provider/subs/mock/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Butter. If not, see <http://www.gnu.org/licenses/>.
*/

apply plugin: 'com.android.library'
apply from: "${project.rootDir}/config/gradle/android-library-config.gradle"

android {
compileSdkVersion rootProject.ext.compileSdk
Expand Down Expand Up @@ -57,7 +57,7 @@ dependencies {
api "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"
api "com.squareup.retrofit2:converter-gson:$retrofitVersion"

annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"

testImplementation 'junit:junit:4.12'
testImplementation 'org.robolectric:robolectric:3.4'
Expand Down
4 changes: 2 additions & 2 deletions provider/subs/opensubs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with Butter. If not, see <http://www.gnu.org/licenses/>.
*/

apply plugin: 'com.android.library'
apply from: "${project.rootDir}/config/gradle/android-library-config.gradle"

android {
compileSdkVersion rootProject.ext.compileSdk
Expand Down Expand Up @@ -60,7 +60,7 @@ dependencies {
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion"

annotationProcessor "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"

testImplementation 'junit:junit:4.12'

Expand Down
2 changes: 2 additions & 0 deletions tv/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ dependencies {

kapt "com.google.dagger:dagger-compiler:$daggerVersion"
kapt "com.google.dagger:dagger-android-processor:$daggerVersion"

implementation "com.jakewharton:butterknife:$butterknifeVersion"
kapt "com.jakewharton:butterknife-compiler:$butterknifeVersion"

compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
Expand Down
26 changes: 16 additions & 10 deletions tv/src/main/java/butter/droid/tv/ui/TVTorrentBaseActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
import android.os.Bundle;
import android.os.IBinder;

import androidx.fragment.app.FragmentActivity;

import javax.inject.Inject;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import butter.droid.base.ButterApplication;
import butter.droid.base.content.preferences.PreferencesHandler;
import butter.droid.base.torrent.TorrentService;
Expand All @@ -34,17 +34,20 @@
import dagger.android.AndroidInjection;
import dagger.android.AndroidInjector;
import dagger.android.DispatchingAndroidInjector;
import dagger.android.support.HasSupportFragmentInjector;
import dagger.android.HasAndroidInjector;

public abstract class TVTorrentBaseActivity extends FragmentActivity implements TorrentActivity,
HasSupportFragmentInjector {
HasAndroidInjector {

@Inject DispatchingAndroidInjector<androidx.fragment.app.Fragment> supportFragmentInjector;
@Inject PreferencesHandler preferencesHandler;
@Inject
DispatchingAndroidInjector<Object> supportFragmentInjector;
@Inject
PreferencesHandler preferencesHandler;

protected TorrentService torrentStream;

@Override protected void onCreate(Bundle savedInstanceState) {
@Override
protected void onCreate(Bundle savedInstanceState) {
AndroidInjection.inject(this);

String language = preferencesHandler.getLocale();
Expand All @@ -53,12 +56,14 @@ public abstract class TVTorrentBaseActivity extends FragmentActivity implements
super.onCreate(savedInstanceState);
}

@Override protected void onStart() {
@Override
protected void onStart() {
super.onStart();
TorrentService.bindHere(this, serviceConnection);
}

@Override protected void onStop() {
@Override
protected void onStop() {
super.onStop();
unbindService(serviceConnection);
onTorrentServiceDisconnected(torrentStream);
Expand Down Expand Up @@ -87,7 +92,8 @@ public void onTorrentServiceDisconnected(final TorrentService service) {
// Placeholder
}

@Override public AndroidInjector<Fragment> supportFragmentInjector() {
@Override
public AndroidInjector<Object> androidInjector() {
return supportFragmentInjector;
}

Expand Down