Skip to content

Instantly share code, notes, and snippets.

@iamcodder
Created July 10, 2022 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamcodder/fc4aa1b254057acb0248fb09c162947e to your computer and use it in GitHub Desktop.
Save iamcodder/fc4aa1b254057acb0248fb09c162947e to your computer and use it in GitHub Desktop.
android {
applicationVariants.all { variant ->
delete rootProject.buildDir
if(variant.name.toString().toLowerCase().contains("appgallery")){
copy {
from "src/appgallery"
include "agconnect-services.json"
into "."
}
} else if(variant.name.toString().toLowerCase().contains("playstore")){
def isThereAgconnectFile = fileTree("src/appGallery").filter { it.isFile() }
.files.name.contains("agconnect-services.json")
if(isThereAgconnectFile){
clean{
delete "$rootProject.projectDir/app/agconnect-services.json"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment