We have a single package which is built for different sites, which needs some prebuild steps to be executed before actual build steps.
In flutter android, these steps are executed in "preBuild.dependsOn" (in android/app/build.gradle)
Edit (additional info):
MyFlutterMob/android/app/build.gradle
Following prebuild steps are run :
def option = System.getenv('APK_FOR')
setConfig()
{
if(option == "DEMO"){
copy{
from "../../DemoAppAsset/AppLogo.png"
into "../../assets/images"
}
}
else if(option == "PROD"){
copy{
from "../../ProdAppAsset/AppLogo.png"
into "../../assets/images"
}
}
}
preBuild.dependsOn setConfig
Is same possible in flutter web build (Not able to find gradle script for same )