AndroidStudioAndRobolectric icon indicating copy to clipboard operation
AndroidStudioAndRobolectric copied to clipboard

BuildConfig is not by default generated for all build types

Open nenick opened this issue 10 years ago • 0 comments

This issue is tracked at https://code.google.com/p/android/issues/detail?id=52962

Solution is to make the main project depend on different build types ... ... setting this in the dependency project

android {
    publishNonDefault true
}

and this in the project that uses it

dependencies {
    releaseCompile project(path: ':theotherproject', configuration: 'release')
    debugCompile project(path: ':theotherproject', configuration: 'debug')
}

nenick avatar Mar 14 '15 05:03 nenick