Store icon indicating copy to clipboard operation
Store copied to clipboard

Issue with gradle plugin 3.4.0

Open kalyandechiraju opened this issue 5 years ago • 11 comments

When I update my gradle plugin version to 3.4.0, import com.nytimes.android.external.store3.base.impl.Store is not able to be resolved. But it's working fine if I revert back to gradle plugin version 3.3.2.

Is this any problem with the library or just another plugin issue?

kalyandechiraju avatar May 13 '19 08:05 kalyandechiraju

Hey @kalyandechiraju do you have a stacktrace?

pavlospt avatar May 13 '19 09:05 pavlospt

It's just a compile-time error saying unable to resolve com.nytimes.android.external.store3.base.impl.Store Due to which my build is failing.

kalyandechiraju avatar May 13 '19 11:05 kalyandechiraju

Can you create a failing sample project? I'm unable to reproduce. Could be a proguard configuration you are using

digitalbuddha avatar May 13 '19 12:05 digitalbuddha

Sure. @digitalbuddha

Here is a sample project running on AS Gradle plugin 3.4.1 and gradle 5.1.1 https://github.com/kalyandechiraju/StoreDemo

Check the Main Activity class (master branch) where the Store interface is not resolvable.

Whereas in gradle3.3 branch running on gradle plugin 3.3.x and gradle 4.10.1, it's resolved properly.

kalyandechiraju avatar May 21 '19 06:05 kalyandechiraju

I've been able to reproduce this in the sample app as well. Both upgrading to AGP 3.4.1 or upgrading Gradle to 5.0> seems to cause compile errors. I will try to see if I can take a closer look at this.

cybo42 avatar May 21 '19 15:05 cybo42

Any update on this?

kalyandechiraju avatar Jun 07 '19 06:06 kalyandechiraju

Any updates?

polivmi1 avatar Jun 27 '19 07:06 polivmi1

Any workaround for this? I am not able to upgrade the gradle plugin due to this.

kalyandechiraju avatar Jul 29 '19 07:07 kalyandechiraju

I tried cloning the project and updating the Gradle plugin. After updating, Gradle sync fails with this error: ERROR: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher. The following dependencies do not satisfy the required version: root project 'Store' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0 Affected Modules: app

Can anyone check this and take necessary action? Also, please confirm if this is the cause for the issue.

kalyandechiraju avatar Jul 30 '19 06:07 kalyandechiraju

Finally able to solve the issue by adding Store3 dependency in addition to store-kotlin3 dependency.

implementation 'com.nytimes.android:store3:3.1.1' <-- Previously I dont have this dependency implementation 'com.nytimes.android:store-kotlin3:3.1.1' implementation 'com.nytimes.android:middleware3:3.1.1'

kalyandechiraju avatar Jul 30 '19 06:07 kalyandechiraju

Just add com.nytimes.android:cache3:3.1.1 dependency

polivmi1 avatar Aug 28 '19 10:08 polivmi1