Cannot be used for qa/release builds
srinivaasang1 opened this issue · 11 comments
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')
Hi @srinivaasang1
Are you using release variant or debug variant in QA build?
i am using debugvariant io.github.rotbolt:flaker-android-okhttp, what's the difference between debug/release variant?
@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
sqldelight had a incompatible version, but managed with a work around by adding matchingfallback.
do we need to add release variant, if not would it still install flaker for release builds?
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
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?
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.
You are right @srinivaasang1
I will add to documentation if having more than debug and release variants. Then one must add matchingFallbacks