From 692ea5efee1dd733c045b7d74d403fbe8fda8846 Mon Sep 17 00:00:00 2001 From: dkanada Date: Fri, 1 May 2020 15:27:55 +0900 Subject: [PATCH] conditionally use local api client --- app/build.gradle | 11 ++++------- build.gradle | 7 +++++-- settings.gradle | 13 +++++++++---- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 09d7a97a..572579c4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,6 +18,7 @@ android { minifyEnabled true shrinkResources true } + debug { applicationIdSuffix '.debug' } @@ -46,7 +47,6 @@ dependencies { implementation 'androidx.gridlayout:gridlayout:1.0.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.palette:palette:1.0.0' - implementation 'com.google.android.material:material:1.0.0' implementation 'androidx.annotation:annotation:1.1.0' implementation 'androidx.percentlayout:percentlayout:1.0.0' implementation 'androidx.preference:preference:1.0.0' @@ -63,9 +63,7 @@ dependencies { implementation 'com.github.ksoichiro:android-observablescrollview:1.6.0' implementation 'com.heinrichreimersoftware:material-intro:1.6' implementation 'me.zhanghai.android.materialprogressbar:library:1.4.2' - implementation('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.11.0@aar') { - transitive = true - } + implementation('com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.11.0') implementation 'com.jakewharton:butterknife:10.1.0' annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0' @@ -73,6 +71,7 @@ dependencies { implementation 'com.squareup.retrofit2:retrofit:2.5.0' implementation 'com.squareup.retrofit2:converter-gson:2.5.0' implementation 'com.google.code.gson:gson:2.8.5' + implementation 'com.google.android.material:material:1.0.0' implementation 'com.anjlab.android.iab.v3:library:1.0.44' implementation 'de.psdev.licensesdialog:licensesdialog:2.0.0' @@ -83,7 +82,5 @@ dependencies { implementation 'com.github.AdrienPoupa:jaudiotagger:2.2.3' - implementation 'com.github.jellyfin:jellyfin-apiclient-java:-SNAPSHOT' - //implementation project(':apiclient') - //implementation project(':library') + implementation 'com.github.jellyfin.jellyfin-apiclient-java:android:0.6.0' } diff --git a/build.gradle b/build.gradle index bf6ed5f8..d21f3ad6 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,9 @@ buildscript { google() jcenter() } + dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' + classpath 'com.android.tools.build:gradle:3.5.3' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' } } @@ -13,6 +14,8 @@ allprojects { repositories { google() jcenter() - maven { url "https://jitpack.io" } + maven { + url "https://jitpack.io" + } } } diff --git a/settings.gradle b/settings.gradle index 0f7f4c2c..0008bb76 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,7 +1,12 @@ include ':app' -// include ':apiclient' -// project(':apiclient').projectDir = new File(settingsDir, '../jellyfin-apiclient-java/android') +def enableDependencySubstitution = properties.get('enable.dependency.substitution', 'true').equalsIgnoreCase('true') +def apiClientLocation = '../jellyfin-apiclient-java' -// include ':library' -// project(':library').projectDir = new File(settingsDir, '../jellyfin-apiclient-java/library') \ No newline at end of file +if (new File(apiClientLocation).exists() && enableDependencySubstitution) { + includeBuild(apiClientLocation) { + dependencySubstitution { + substitute module('com.github.jellyfin.jellyfin-apiclient-java:android') with project(':android') + } + } +} \ No newline at end of file