diff --git a/base/build.gradle b/base/build.gradle index e9d752ddf..d8daaea2f 100644 --- a/base/build.gradle +++ b/base/build.gradle @@ -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' @@ -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" diff --git a/base/src/main/java/butter/droid/base/data/DataBindModule.java b/base/src/main/java/butter/droid/base/data/DataBindModule.java index 8d61b6579..68a9fc108 100644 --- a/base/src/main/java/butter/droid/base/data/DataBindModule.java +++ b/base/src/main/java/butter/droid/base/data/DataBindModule.java @@ -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 provideIntercptors(); + @Multibinds + Set provideIntercptors(); } diff --git a/base/src/main/java/butter/droid/base/providers/ProviderBindModule.java b/base/src/main/java/butter/droid/base/providers/ProviderBindModule.java index 54391257b..038cb419a 100644 --- a/base/src/main/java/butter/droid/base/providers/ProviderBindModule.java +++ b/base/src/main/java/butter/droid/base/providers/ProviderBindModule.java @@ -18,7 +18,6 @@ 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; @@ -26,6 +25,6 @@ @Module public interface ProviderBindModule { - @Multibinds @ProviderScope Set multibindProviderWrapper(); + @Multibinds Set multibindProviderWrapper(); } diff --git a/base/src/main/java/butter/droid/base/providers/ProviderModule.java b/base/src/main/java/butter/droid/base/providers/ProviderModule.java index 7c82563bd..30009c74b 100644 --- a/base/src/main/java/butter/droid/base/providers/ProviderModule.java +++ b/base/src/main/java/butter/droid/base/providers/ProviderModule.java @@ -39,12 +39,12 @@ ) public class ProviderModule { - @Provides @ProviderScope @IntoSet ProviderWrapper provideVodoWrapper(final VodoProvider vodoProvider, + @Provides @IntoSet ProviderWrapper provideVodoWrapper(final VodoProvider vodoProvider, 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); diff --git a/build.gradle b/build.gradle index 0d4c31575..e421c4af1 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ import si.kamino.gradle.extensions.version.code.IncreaseVersionCode buildscript { ext { - kotlinVersion = '1.2.60' + kotlinVersion = '1.3.50' } repositories { @@ -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" @@ -29,9 +29,9 @@ 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' @@ -39,7 +39,8 @@ ext { 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 { diff --git a/config/gradle/android-common-config.gradle b/config/gradle/android-common-config.gradle index 2f24728e7..268fbc3b3 100644 --- a/config/gradle/android-common-config.gradle +++ b/config/gradle/android-common-config.gradle @@ -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 diff --git a/connectsdk/core/build.gradle b/connectsdk/core/build.gradle index 1016344e0..b9609a3ff 100755 --- a/connectsdk/core/build.gradle +++ b/connectsdk/core/build.gradle @@ -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' diff --git a/gradle.properties b/gradle.properties index fb2847b5f..b3d228c2f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 org.gradle.daemon=true android.useAndroidX=true android.enableJetifier=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6ebba4ab8..8a70ba078 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/mobile/build.gradle b/mobile/build.gradle index 98652486c..90fc4ea5b 100644 --- a/mobile/build.gradle +++ b/mobile/build.gradle @@ -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" diff --git a/provider/media/mock/build.gradle b/provider/media/mock/build.gradle index 9f41cbe8f..ea2bf3aac 100644 --- a/provider/media/mock/build.gradle +++ b/provider/media/mock/build.gradle @@ -15,7 +15,7 @@ * along with Butter. If not, see . */ -apply plugin: 'com.android.library' +apply from: "${project.rootDir}/config/gradle/android-library-config.gradle" android { compileSdkVersion rootProject.ext.compileSdk @@ -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" diff --git a/provider/media/vodo/build.gradle b/provider/media/vodo/build.gradle index e50b7415c..b500adc72 100644 --- a/provider/media/vodo/build.gradle +++ b/provider/media/vodo/build.gradle @@ -15,7 +15,7 @@ * along with Butter. If not, see . */ -apply plugin: 'com.android.library' +apply from: "${project.rootDir}/config/gradle/android-library-config.gradle" android { compileSdkVersion rootProject.ext.compileSdk @@ -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' diff --git a/provider/subs/mock/build.gradle b/provider/subs/mock/build.gradle index 828f470a9..bc6794624 100644 --- a/provider/subs/mock/build.gradle +++ b/provider/subs/mock/build.gradle @@ -15,7 +15,7 @@ * along with Butter. If not, see . */ -apply plugin: 'com.android.library' +apply from: "${project.rootDir}/config/gradle/android-library-config.gradle" android { compileSdkVersion rootProject.ext.compileSdk @@ -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' diff --git a/provider/subs/opensubs/build.gradle b/provider/subs/opensubs/build.gradle index d1de41e82..e522fb9a4 100644 --- a/provider/subs/opensubs/build.gradle +++ b/provider/subs/opensubs/build.gradle @@ -15,7 +15,7 @@ * along with Butter. If not, see . */ -apply plugin: 'com.android.library' +apply from: "${project.rootDir}/config/gradle/android-library-config.gradle" android { compileSdkVersion rootProject.ext.compileSdk @@ -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' diff --git a/tv/build.gradle b/tv/build.gradle index 58cdbf056..d9f2b6b00 100644 --- a/tv/build.gradle +++ b/tv/build.gradle @@ -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" diff --git a/tv/src/main/java/butter/droid/tv/ui/TVTorrentBaseActivity.java b/tv/src/main/java/butter/droid/tv/ui/TVTorrentBaseActivity.java index ce81c5fa8..03fe4501f 100644 --- a/tv/src/main/java/butter/droid/tv/ui/TVTorrentBaseActivity.java +++ b/tv/src/main/java/butter/droid/tv/ui/TVTorrentBaseActivity.java @@ -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; @@ -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 supportFragmentInjector; - @Inject PreferencesHandler preferencesHandler; + @Inject + DispatchingAndroidInjector 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(); @@ -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); @@ -87,7 +92,8 @@ public void onTorrentServiceDisconnected(final TorrentService service) { // Placeholder } - @Override public AndroidInjector supportFragmentInjector() { + @Override + public AndroidInjector androidInjector() { return supportFragmentInjector; }