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

Android - plugin 1.2.0.0 and 3 dimensions build #110

Closed
santanaluiz opened this issue Aug 10, 2018 · 10 comments
Closed

Android - plugin 1.2.0.0 and 3 dimensions build #110

santanaluiz opened this issue Aug 10, 2018 · 10 comments
Assignees
Labels

Comments

@santanaluiz
Copy link

santanaluiz commented Aug 10, 2018

Hi,

I have a build with multiple dimensions and I'm having problems to add JUnit 5 (with AS 3.3 canary).
I've followed this wiki page

Problem is, it can not find extension and I don't see how to solve this:

Gradle sync failed: Extension with name 'appDevelopmentFilters' does not exist. Currently registered extension names: [ext, filters, debugFilters, releaseFilters, appFilters, localFilters, developmentFilters, productionFilters, ciFilters, appDevelopmentDebugFilters, appDevelopmentReleaseFilters, appDevelopmentCiFilters, appProductionDebugFilters, appProductionReleaseFilters, appProductionCiFilters, appLocalDebugFilters, appLocalReleaseFilters, appLocalCiFilters]
@mannodermaus
Copy link
Owner

Could you share the excerpt from your build.gradle file in which you define the productFlavors and their dimensions? Seems like there might be a hole where not all variants get their extensions configured properly. As a quick workaround, you can copy your appDevelopmentFilters block three times, one time for each of these variants: appDevelopmentDebugFilters, appDevelopmentReleaseFilters, appDevelopmentCiFilters

@mannodermaus mannodermaus self-assigned this Aug 10, 2018
@santanaluiz
Copy link
Author

That is (more or less) my gradle flavors and build types

android {
     
      //....

    flavorDimensions 'brand', 'environment'

    productFlavors {
        brandA {
            dimension 'brand'
            // ...
        }
        brandB {
            dimension 'brand'
            // ...
        }

        local {
            dimension 'environment'
            // ...
        }

        development {
            dimension 'environment'
            // ...

        }

        production {
            dimension 'environment'
            // ...
        }

    }

    // ....

   buildTypes {

        release {
            debuggable false
            minifyEnabled true
            shrinkResources true
            useProguard true

            proguardFiles // FILES HERE

            signingConfig // CONFIG
        }


        debug {
            // ...
        }

        ci {
            initWith debug
            // ...
        }
    }
}

@santanaluiz
Copy link
Author

so you can substitue brandA (or brandB) with app

In this case tasks would look like
brandADevelopmentDebugFilters

@pawel-prochniak
Copy link

I have exactly the same problem.
I don't add any filter blocks to my build.gradle.
Basing on @santanaluiz build.gradle example, it looks like plugin expects for instance:

brandAFilters
developmentFilters

whereas it should detect:

brandADevelopmentFilters

@santanaluiz
Copy link
Author

@mannodermaus could you be more specific on how to copy the filter as workaround?

@mannodermaus
Copy link
Owner

mannodermaus commented Sep 2, 2018

@santanaluiz Thank you! This snippet should help to reproduce this inside a test environment.

Edit: I can indeed reproduce this locally. Will work on a fix and report back afterwards!

@mannodermaus
Copy link
Owner

A fix has been merged to master, and will be included in the next release. If you could, please check if the latest 1.2.0.1-SNAPSHOT indeed fixes the problem for you!

@ebrowne72
Copy link

Any idea when 1.2.0.1 will be released?

@mannodermaus
Copy link
Owner

I was hoping to get some clarification on the snapshot, because the applied change works at least for me. I was aiming for the second half of this week for the bugfix release!

@mannodermaus
Copy link
Owner

The fix has been included in the new 1.3.1.0 release. Please check it out!

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

No branches or pull requests

4 participants