play-services-plugins icon indicating copy to clipboard operation
play-services-plugins copied to clipboard

[Feature request] Provide ability to configure google-services.json location via plugin DSL

Open originx opened this issue 1 year ago • 2 comments

It would be a nice feature from dev-user perspective to decide where to keep config files especially in more complex projects, would you consider providing a way to configure this part of the plugin via the DSL.

Actual: Plugin search for locations of google-services.json file in various locations as best guess depending on project where plugin is applied on

Change:

  • Let plugin be configurable via DSL so location of the file can be configurable and users can better organize their projects
  • if file location is passed do not check fallback locations that are currently searched for

Kotlin DSL (KTS)

android {
    // ...
    productFlavors {
        create("myFlavor") {
            // Other flavor configurations
            googleServices {
                // Customize the google-services.json file location
                googleServicesFileLocation.set(file("$rootProject/config/google-services.json"))
            }
        }
    }
    // ...
}

Groovy DSL

android {
    // ...
    productFlavors {
        myFlavor {
            // Other flavor configurations
            googleServices {
                // Customize the google-services.json file location
                googleServicesFileLocation = file("$rootProject/config/google-services.json")
            }
        }
    }
    // ...
}

originx avatar Sep 12 '23 14:09 originx

this seems like a reasonable request, it is possible to do a PR but I see no activity on this repo, is this project still being maintained?

originx avatar Jun 11 '24 06:06 originx

+1 Would be nice to get a response?

ivanorsolic avatar Jul 05 '24 16:07 ivanorsolic