gradle-buildconfig-plugin
gradle-buildconfig-plugin copied to clipboard
How do you add the gen/buildconfg directory to be part of your source for an IDE?
I'm using IntelliJ and I can add the gen/buildconfig directory to be part of my source but next time I make a build.gradle change it loses it again. By default anything under build/ is marked excluded since it's reading the build.gradle file to setup the application.
Is this project still maintained?
I do the following in build.gradle
:
// Add generated build-config directories to the main source set, so that the
// IDE doesn't complain when the app references BuildConfig classes
sourceSets.main.java {
srcDir new File(buildDir, 'gen')
}
That seems to work with gradle 2.14.1, I haven't tried with newer versions of gradle though.