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

Folder path #74

Closed
xjrcode opened this issue May 19, 2015 · 5 comments
Closed

Folder path #74

xjrcode opened this issue May 19, 2015 · 5 comments

Comments

@xjrcode
Copy link

xjrcode commented May 19, 2015

The play folder must be in src/${flavor}/play but there is any way to configure another path?
Perhaps something like:

play {
    track 'production'
    path 'src/customer/${flavor}/play'
}
@bhurling
Copy link
Contributor

Isn't your customer a flavor dimension on its own? If so, files in src/${customer}/${flavorDimension2}/play should already be packaged correctly.

@xjrcode
Copy link
Author

xjrcode commented May 28, 2015

I do not use flavorDimension, only productFlavors like:

productFlavors {
        flavor1 {
            packageName "com.example.flavor1"
            versionCode 20
        }

        flavor2 {
            packageName "com.example.flavor2"
            minSdkVersion 14
        }
}

sourceSets {
        flavor1 {
            res.srcDir  'src/main/adhocs/flavor1/res'
            assets.srcDir 'src/main/adhocs/flavor1/assets'
        }

        flavor2 {
            res.srcDir  'src/main/adhocs/flavor2/res'
            assets.srcDir 'src/main/adhocs/flavor2/assets'
        }
}

@bhurling
Copy link
Contributor

Can you explain why you are overriding the default source sets? Do you have multiple customers, where each customer has those two flavors? That would be exactly what flavor dimensions are for.

I could, however, think of a solution where we extend the sourceSets DSL. Something like:

sourceSets {
        flavor1 {
            res.srcDir  'src/main/adhocs/flavor1/res'
            assets.srcDir 'src/main/adhocs/flavor1/assets'
            play.srcDir 'src/main/adhocs/flavor1/play'
        }

        flavor2 {
            res.srcDir  'src/main/adhocs/flavor2/res'
            assets.srcDir 'src/main/adhocs/flavor2/assets'
            play.srcDir 'src/main/adhocs/flavor1/play'
        }
}

But that seems a little ambitious and I don't see the real benefit for now.

@xjrcode
Copy link
Author

xjrcode commented Aug 20, 2015

We have a base app fully customizable. We make one flavor for each customer with its own assets folder.

Your solution is perfect for these cases, as each customer has his own google play info.

@SUPERCILEX
Copy link
Collaborator

Since the solution above works and changing source sets is unconventional, the original feature request is no longer needed.

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

3 participants