Marco Pierucci
12/14/2022, 2:46 PMCould not set unknown property 'nameSuffix' for extension 'apollo'
🤔Marco Pierucci
12/14/2022, 2:47 PMcreateAllAndroidVariantServices(sourceFolder = ".", nameSuffix = "") {
packageName.set("package-here")
schemaFile.set(file("src/main/graphql/core/schema.json"))
mapScalar("DateTime", "org.threeten.bp.ZonedDateTime")
mapScalar("Date", "org.threeten.bp.LocalDate")
mapScalar("UUID", "kotlin.String")
generateAsInternal.set(true)
}
mbonnin
12/14/2022, 2:53 PMmbonnin
12/14/2022, 2:54 PMcreateAllAndroidVariantServices
function. It was put there for compat with 2.x mainly but it creates a lot of tasks while most of the times, you usually want debug vs release or sombonnin
12/14/2022, 2:55 PMMarco Pierucci
12/14/2022, 3:00 PMapollo {
packageName.set("energy.octopus.fieldservices.library.network.datasource.graphql")
mapScalar("DateTime", "org.threeten.bp.ZonedDateTime")
mapScalar("Date", "org.threeten.bp.LocalDate")
mapScalar("UUID", "kotlin.String")
generateAsInternal.set(true)
schemaFile.set(file("src/main/graphql/core/schema.json"))
srcDir(file("src/main/graphql"))
}
Marco Pierucci
12/14/2022, 3:01 PMMarco Pierucci
12/14/2022, 3:01 PMmbonnin
12/14/2022, 3:03 PMI'd say (but not 100% sure) this doesn't work in GroovyCopy codecreateAllAndroidVariantServices(sourceFolder = ".", nameSuffix = "")
mbonnin
12/14/2022, 3:03 PMdifferent countries will have different schemasDoes that mean they have different queries too ? 👀
Marco Pierucci
12/14/2022, 3:03 PMmbonnin
12/14/2022, 3:04 PMmbonnin
12/14/2022, 3:05 PMmbonnin
12/14/2022, 3:06 PMMarco Pierucci
12/14/2022, 3:07 PMMarco Pierucci
12/14/2022, 3:07 PMIf you have many variants and don't need to configure an Apollo Service for each one of them, it may be simpler to declare the Services manually, for instance:Might as well try this
Marco Pierucci
12/14/2022, 3:07 PMmbonnin
12/14/2022, 3:07 PMMarco Pierucci
12/14/2022, 3:08 PMmbonnin
12/14/2022, 3:08 PM