Last active
September 13, 2021 09:34
-
-
Save ezilox/7255f179652daff811fd9c7d02f8eb29 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
import { withProjectBuildGradle } from '@expo/config-plugins'; | |
const withFFmpegPackage = (config) => { | |
return withProjectBuildGradle(config, async config => { | |
const newContents = config.modResults.contents.replace( | |
'targetSdkVersion = 30\n', | |
'targetSdkVersion = 30\nreactNativeFFmpegPackage = "min-gpl-lts"\n' | |
); | |
config.modResults.contents = newContents | |
console.log(config); | |
return config; | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. Coincidentally, I was also trying to get this working yesterday. These are also my first config plugins, so I am sure they can be improved.
By the way, how are you referencing your plugins? When I initially tried using
import
andexport
I got errors.Anyway, here's what I managed to get working:
plugins/withMinAndroidSdkVersion.js
:plugins/withFfmpegPackage.js
:app.json
:I later created this one because I saw another forum post that needed these for various other dependencies:
plugins/withPickFirst.js
:and you can use that from
app.json
as follows: