Skip to content
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.

Does not work with some libraries #8

Open
lepicekmichal opened this issue Feb 25, 2019 · 5 comments
Open

Does not work with some libraries #8

lepicekmichal opened this issue Feb 25, 2019 · 5 comments

Comments

@lepicekmichal
Copy link

com.instabug.library:instabug
com.facebook.android:facebook-android-sdk

@plnice
Copy link
Owner

plnice commented Feb 25, 2019

Hi, thanks for reporting the issue! Could you please give some more details, does the analysis give wrong results for those libraries or an error/exception occurs?

@lepicekmichal
Copy link
Author

It's a multimodule project and when I run the plugin with parameter to disable jetifier (or disable it in gradle.properties) I get output saying "You can turn off jetifier" for all modules, but when I do, it cannot be built.

I traversed output of gradlew dependencies and found at least these two above depending on support libraries.

@plnice
Copy link
Owner

plnice commented Feb 27, 2019

Hi, both libraries are correctly reported when I add them to sample module in this repository:

Miloszs-MacBook-Pro:can-i-drop-jetifier miloszlewandowski$ git diff
diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts
index 1eaff34..397209e 100644
--- a/sample/build.gradle.kts
+++ b/sample/build.gradle.kts
@@ -37,6 +37,8 @@ dependencies {
     // Example obsolete dependencies
     implementation("com.squareup.leakcanary:leakcanary-android:1.6.3")
     implementation("com.android.support:cardview-v7:28.0.0")
+    implementation("com.instabug.library:instabug:8.0.19")
+    implementation("com.facebook.android:facebook-android-sdk:4.40.0")
 }

 canIDropJetifier {
Miloszs-MacBook-Pro:can-i-drop-jetifier miloszlewandowski$ ./gradlew -Pandroid.enableJetifier=false canIDropJetifier

> Configure project :canidropjetifier
WARNING: Unsupported Kotlin plugin version.
The `embedded-kotlin` and `kotlin-dsl` plugins rely on features of Kotlin `1.3.11` that might work differently than in the requested version `1.3.20`.
========================================
Project sample
========================================

Cannot drop Jetifier due to following dependencies:

* com.android.support:cardview-v7:28.0.0

* com.squareup.leakcanary:leakcanary-android:1.6.3
  \-- com.android.support:support-core-utils:28.0.0
  \-- com.squareup.leakcanary:leakcanary-analyzer:1.6.3
   \-- com.android.support:support-annotations:28.0.0

* com.instabug.library:instabug:8.0.19
  \-- com.instabug.library:instabug-survey:8.0.19
   \-- com.instabug.library:instabug-core:8.0.19
    \-- com.android.support:design:28.0.0
  \-- com.instabug.library:instabug-survey:8.0.19
   \-- com.instabug.library:instabug-core:8.0.19
    \-- com.android.support:support-v4:28.0.0
  \-- com.instabug.library:instabug-crash:8.0.19
   \-- com.instabug.library:instabug-core:8.0.19
    \-- com.android.support:design:28.0.0
  \-- com.instabug.library:instabug-crash:8.0.19
   \-- com.instabug.library:instabug-core:8.0.19
    \-- com.android.support:support-v4:28.0.0
  \-- com.instabug.library:instabug-bug:8.0.19
   \-- com.instabug.library:instabug-core:8.0.19
    \-- com.android.support:design:28.0.0
  \-- com.instabug.library:instabug-bug:8.0.19
   \-- com.instabug.library:instabug-core:8.0.19
    \-- com.android.support:support-v4:28.0.0
  \-- com.instabug.library:instabug-chat:8.0.19
   \-- com.instabug.library:instabug-core:8.0.19
    \-- com.android.support:design:28.0.0
  \-- com.instabug.library:instabug-chat:8.0.19
   \-- com.instabug.library:instabug-core:8.0.19
    \-- com.android.support:support-v4:28.0.0
  \-- com.instabug.library:instabug-features-request:8.0.19
   \-- com.instabug.library:instabug-core:8.0.19
    \-- com.android.support:design:28.0.0
  \-- com.instabug.library:instabug-features-request:8.0.19
   \-- com.instabug.library:instabug-core:8.0.19
    \-- com.android.support:support-v4:28.0.0
  \-- com.instabug.library:instabug-bug:8.0.19
   \-- com.instabug.library:instabug-chat:8.0.19
    \-- com.instabug.library:instabug-core:8.0.19
     \-- com.android.support:design:28.0.0
  \-- com.instabug.library:instabug-bug:8.0.19
   \-- com.instabug.library:instabug-chat:8.0.19
    \-- com.instabug.library:instabug-core:8.0.19
     \-- com.android.support:support-v4:28.0.0

* com.facebook.android:facebook-android-sdk:4.40.0
  \-- com.facebook.android:facebook-login:4.40.0
   \-- com.android.support:appcompat-v7:28.0.0
  \-- com.facebook.android:facebook-common:4.40.0
   \-- com.android.support:cardview-v7:28.0.0
  \-- com.facebook.android:facebook-common:4.40.0
   \-- com.android.support:support-v4:28.0.0
  \-- com.facebook.android:facebook-common:4.40.0
   \-- com.android.support:appcompat-v7:28.0.0
  \-- com.facebook.android:facebook-common:4.40.0
   \-- com.android.support:customtabs:27.0.2
  \-- com.facebook.android:facebook-marketing:4.40.0
   \-- com.android.support:support-annotations:28.0.0
  \-- com.facebook.android:facebook-core:4.40.0
   \-- com.android.support:support-core-utils:28.0.0
  \-- com.facebook.android:facebook-core:4.40.0
   \-- com.android.support:support-annotations:28.0.0
  \-- com.facebook.android:facebook-login:4.40.0
   \-- com.facebook.android:facebook-common:4.40.0
    \-- com.android.support:cardview-v7:28.0.0
  \-- com.facebook.android:facebook-login:4.40.0
   \-- com.facebook.android:facebook-common:4.40.0
    \-- com.android.support:support-v4:28.0.0
  \-- com.facebook.android:facebook-login:4.40.0
   \-- com.facebook.android:facebook-common:4.40.0
    \-- com.android.support:appcompat-v7:28.0.0
  \-- com.facebook.android:facebook-login:4.40.0
   \-- com.facebook.android:facebook-common:4.40.0
    \-- com.android.support:customtabs:27.0.2
  \-- com.facebook.android:facebook-login:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-core-utils:28.0.0
  \-- com.facebook.android:facebook-login:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-annotations:28.0.0
  \-- com.facebook.android:facebook-share:4.40.0
   \-- com.facebook.android:facebook-common:4.40.0
    \-- com.android.support:cardview-v7:28.0.0
  \-- com.facebook.android:facebook-share:4.40.0
   \-- com.facebook.android:facebook-common:4.40.0
    \-- com.android.support:support-v4:28.0.0
  \-- com.facebook.android:facebook-share:4.40.0
   \-- com.facebook.android:facebook-common:4.40.0
    \-- com.android.support:appcompat-v7:28.0.0
  \-- com.facebook.android:facebook-share:4.40.0
   \-- com.facebook.android:facebook-common:4.40.0
    \-- com.android.support:customtabs:27.0.2
  \-- com.facebook.android:facebook-share:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-core-utils:28.0.0
  \-- com.facebook.android:facebook-share:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-annotations:28.0.0
  \-- com.facebook.android:facebook-common:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-core-utils:28.0.0
  \-- com.facebook.android:facebook-common:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-annotations:28.0.0
  \-- com.facebook.android:facebook-places:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-core-utils:28.0.0
  \-- com.facebook.android:facebook-places:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-annotations:28.0.0
  \-- com.facebook.android:facebook-applinks:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-core-utils:28.0.0
  \-- com.facebook.android:facebook-applinks:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-annotations:28.0.0
  \-- com.facebook.android:facebook-messenger:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-core-utils:28.0.0
  \-- com.facebook.android:facebook-messenger:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-annotations:28.0.0
  \-- com.facebook.android:facebook-marketing:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-core-utils:28.0.0
  \-- com.facebook.android:facebook-marketing:4.40.0
   \-- com.facebook.android:facebook-core:4.40.0
    \-- com.android.support:support-annotations:28.0.0
  \-- com.facebook.android:facebook-login:4.40.0
   \-- com.facebook.android:facebook-common:4.40.0
    \-- com.facebook.android:facebook-core:4.40.0
     \-- com.android.support:support-core-utils:28.0.0
  \-- com.facebook.android:facebook-login:4.40.0
   \-- com.facebook.android:facebook-common:4.40.0
    \-- com.facebook.android:facebook-core:4.40.0
     \-- com.android.support:support-annotations:28.0.0
  \-- com.facebook.android:facebook-share:4.40.0
   \-- com.facebook.android:facebook-common:4.40.0
    \-- com.facebook.android:facebook-core:4.40.0
     \-- com.android.support:support-core-utils:28.0.0
  \-- com.facebook.android:facebook-share:4.40.0
   \-- com.facebook.android:facebook-common:4.40.0
    \-- com.facebook.android:facebook-core:4.40.0
     \-- com.android.support:support-annotations:28.0.0

The issue can be related to the default options of the plugin. Could you please try following possible solutions:

  1. By default, only Android modules (modules that apply com.android.library or com.android.application plugin) are the subject of the analysis. Setting analyzeOnlyAndroidModules to false in plugin configuration will analyze all the modules in the project.
  2. By default, only some configurations are the subject of the analysis. Setting configurationRegex ".*" in plugin configuration should analyze all the configurations.

@Firestar99
Copy link

Maybe related? #11

@bartek-wesolowski
Copy link

I'm having a similar issue. I use com.facebook.android:facebook-android-sdk:7.1.0, com.emarsys:mobile-engage-sdk:1.7.1 and com.appsflyer:af-android-sdk:5.1.1. All of those libraries depend on the old support library. Bye Bye Jetifier Gradle Plugin detects them correctly while this plugin doesn't.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants