Created
July 10, 2022 21:42
-
-
Save iamcodder/fc4aa1b254057acb0248fb09c162947e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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