import * as path from '../../path' ; import * as fs from '../../fs' ; import { Config } from '../../../types' ; import { logInfo } from '../../../helpers' ; export function postLink ( configuration ) { let gradleAppBuild = fs . readFileSync ( path . android . gradlePath ( ) , { encoding : 'utf8' } ) ; gradleAppBuild = gradleAppBuild . replace ( 'defaultConfig {' , `defaultConfig {
        missingDimensionStrategy 'react-native-camera', 'general'` ) ; fs . writeFileSync ( path . android . gradlePath ( ) , gradleAppBuild ) ; logInfo ( 'updated ./android/app/build.gradle' ) ; let gradleProps = fs . readFileSync ( path . android . gradlePropertiesPath ( ) , { encoding : 'utf8' } ) ; gradleProps += '\nandroid.enableAapt2=false\n' ; fs . writeFileSync ( path . android . gradlePropertiesPath ( ) , gradleProps ) ; logInfo ( 'disabled aapt2 in gradle.properties' ) ; logInfo ( 'finished updating Android for react-native-camera' ) ; }