gradle-buildconfig-plugin icon indicating copy to clipboard operation
gradle-buildconfig-plugin copied to clipboard

How do you add the gen/buildconfg directory to be part of your source for an IDE?

Open gcstang opened this issue 7 years ago • 2 comments

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.

gcstang avatar Apr 05 '17 19:04 gcstang

Is this project still maintained?

gcstang avatar Sep 11 '17 16:09 gcstang

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.

arteme avatar Oct 25 '17 11:10 arteme