Could not find property 'generateResources' on

Hey guys. I’m using gradle in my Android project and I’m trying to bundle an android string resource file that’s generated by a script at build time. However I only want to do this during a debug build, so I’ve written something like this.

applicationVariants.all {
    variant ->
        variant.outputs.each { output ->
            if (variant.buildType.debuggable) {
            } else {

The problem I’m having is that I get “Could not find property ‘generateResources’ on”. I’ve tried processResources, but that’s too late in the process and the file isn’t placed in the resources folder before they’re all compiled into the R file.

Any ideas on another task I could use or how to get generateResources working?

1 Like