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

Error when running in multi dimensional flavor setup #13

Open
G00fY2 opened this issue Jun 11, 2024 · 2 comments
Open

Error when running in multi dimensional flavor setup #13

G00fY2 opened this issue Jun 11, 2024 · 2 comments

Comments

@G00fY2
Copy link

G00fY2 commented Jun 11, 2024

When running any upload task we get the following error for every Gradle Android module in our app:

- Configuration ':features:orders:orders-local:debugRuntimeElements' variant android-lint-local-aar declares a library for use during runtime, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.4.2', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm':
           - Unmatched attributes:
               - Doesn't say anything about com.android.build.api.attributes.ProductFlavor:distribution (required 'dev')
               - Doesn't say anything about com.android.build.api.attributes.ProductFlavor:platform (required 'google')
               - Provides attribute 'artifactType' with value 'android-lint-local-aar' but the consumer didn't ask for it
               - Provides attribute 'com.android.build.gradle.internal.attributes.VariantAttr' with value 'debug' but the consumer didn't ask for it

* Try:
> Ambiguity errors are explained in more detail at https://docs.gradle.org/8.8/userguide/variant_model.html#sub:variant-ambiguity.
> Review the variant matching algorithm at https://docs.gradle.org/8.8/userguide/variant_attributes.html#sec:abm_algorithm.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.8/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 4s

Our flavor setup looks like this:

    flavorDimensions += listOf("platform", "distribution")
    productFlavors {
        create("google") {
            dimension = "platform"
        }
        create("huawei") {
            dimension = "platform"
        }
        create("dev") {
            dimension = "distribution"
            applicationIdSuffix = ".app.dev"
        }
        create("stage") {
            dimension = "distribution"
            applicationIdSuffix = ".app.stage"
        }
        create("production") {
            dimension = "distribution"
            applicationIdSuffix = ".mobileapp"
        }
    }
@titze
Copy link
Contributor

titze commented Jun 12, 2024

Hey @G00fY2,

which version of the plugin did you use? We released [1.5.9](https://github.com/Guardsquare/appsweep-gradle/releases/tag/v1.5.9) last Friday which fixed an issue with multiple product flavors.

In any case, it seems you are using Gradle 8.8 here, so this would not work anyway at the moment (see #12)

@G00fY2
Copy link
Author

G00fY2 commented Jun 12, 2024

Hi and thanks for the answer!
Sorry, I missed that part. I was using latest version 1.5.9.

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