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

Cannot be used for qa/release builds #80

Closed
srinivaasang1 opened this issue Dec 5, 2023 · 11 comments
Closed

Cannot be used for qa/release builds #80

srinivaasang1 opened this issue Dec 5, 2023 · 11 comments

Comments

@srinivaasang1
Copy link

Should not be used for Release builds but QA builds are a valid use case scenario and when we try to use the library for qa builds it fails to build with the following exception.

" implementation(deplibs.flaker)" version 0.1.2

Error while evaluating property 'content' of task ':app:generateQaFeatureTransitiveDeps'.
   > Could not resolve all artifacts for configuration ':app:qaRuntimeClasspath'.
      > Could not resolve app.cash.sqldelight:android-driver:2.0.0.
        Required by:
            project :app > io.github.rotbolt:flaker-android-okhttp:0.1.2 > io.github.rotbolt:flaker-data:0.1.2 > io.github.rotbolt:flaker-data-android:0.1.2
         > No matching variant of app.cash.sqldelight:android-driver:2.0.0 was found. The consumer was configured to find a component for use during runtime, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'qa', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.1.1', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
             - Variant 'debugVariantMavenApiPublication' capability app.cash.sqldelight:android-driver:2.0.0:
                 - Incompatible because this component declares a component for use during compile-time, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component for use during runtime, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'qa'
                 - Other compatible attributes:
                     - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.1.1')
                     - Doesn't say anything about its target Java environment (preferred optimized for Android)
                     - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
             - Variant 'debugVariantMavenJavaDocPublication' capability app.cash.sqldelight:android-driver:2.0.0 declares a component for use during runtime:
                 - Incompatible because this component declares a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' and the consumer needed a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'qa'
                 - Other compatible attributes:
                     - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.1.1')
                     - Doesn't say anything about its target Java environment (preferred optimized for Android)
                     - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
@RotBolt
Copy link
Owner

RotBolt commented Dec 5, 2023

Hi @srinivaasang1
Are you using release variant or debug variant in QA build?

@srinivaasang1
Copy link
Author

srinivaasang1 commented Dec 5, 2023

i am using debugvariant io.github.rotbolt:flaker-android-okhttp, what's the difference between debug/release variant?

@RotBolt
Copy link
Owner

RotBolt commented Dec 5, 2023

@srinivaasang1
release variant is just empty library which does not log anything. This library is intended for testing during debug phase of your application

Let me see if attributes could do something to cause this error

@srinivaasang1
Copy link
Author

sqldelight had a incompatible version, but managed with a work around by adding matchingfallback.

@srinivaasang1
Copy link
Author

do we need to add release variant, if not would it still install flaker for release builds?

@RotBolt
Copy link
Owner

RotBolt commented Dec 15, 2023

do we need to add release variant, if not would it still install flaker for release builds?

Yes, flaker is built for debug builds so you have to use debugImplementation and releaseImplementation with release variant.
Release variant is just thin empty layer which does nothing

@RotBolt
Copy link
Owner

RotBolt commented Dec 15, 2023

sqldelight had a incompatible version, but managed with a work around by adding matchingfallback.

What version of sqlDelight you have been using in the project?

@srinivaasang1
Copy link
Author

There was no sqldelight in my project, it came from this library. its not a version issue, its the variant. Apparently sql delight only had debug and release and that caused the issue.

@RotBolt
Copy link
Owner

RotBolt commented Dec 15, 2023 via email

@RotBolt
Copy link
Owner

RotBolt commented Apr 4, 2024

You are right @srinivaasang1
I will add to documentation if having more than debug and release variants. Then one must add matchingFallbacks

@RotBolt RotBolt closed this as completed Apr 4, 2024
@RotBolt
Copy link
Owner

RotBolt commented Apr 4, 2024

here is gh issue : #82

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

No branches or pull requests

2 participants