One of source directories is not marked as source set when using different flavors

30 views Asked by At

I am building an app with two variants: root version and rootless version. Snippet of what I've manually added in the build.gradle:

   flavorDimensions "default"
    productFlavors {
        root {
            dimension "default"
            applicationIdSuffix ".root"
        }
        rootless {
            dimension "default"
            applicationIdSuffix ".rootless"
        }
    }

Then I proceeded to create directory root and rootless in the src directory of my project.

I have the main directory (where shared classes used by both flavors should be stored). Then in the root and rootless directories should be stored the java classes, the layouts and the manifest unique for each variant.

But for some reason the rootless directory is not marked as a source set, it says "Java file outside of source root" but the folder rootless it's exactly in the same src directory where main and root directories are.

Here some screenshots: enter image description here enter image description here

0

There are 0 answers