renative icon indicating copy to clipboard operation
renative copied to clipboard

feat(Android:Settings.gradle): Add ability to inject code on plugin level

Open RicardasN opened this issue 9 months ago • 2 comments

Description

  • Adds the ability to inject extra bit of code into settings.gradle for when you need to do that configuring a plugin

Related issues

Notes for QA

To test, you should try the module user in question was having trouble configuring, code should look like this:

 "react-native-code-push": {
            "android": {
                "templateAndroid": {
                    "app_build_gradle": {
                        "apply": ["from: \"{{PLUGIN_ROOT}}/codepush.gradle\""]
                    },
                    "settings_gradle": {
                        "project": ["project(':react-native-code-push').projectDir = new File(\"{{PLUGIN_ROOT}}/android/app\")"],
                        "include": ["':react-native-code-push'"]
                    }
                },
                "package": "com.microsoft.codepush.react.CodePush",
                "path": "{{PLUGIN_ROOT}}/android",
                "projectName": "react-native-code-push"
            },
            "version": "^8.1.0"
        }

And as a result of the test, settings.gradle should have the necessary things added to it as per description of the plugin here

RicardasN avatar May 21 '24 13:05 RicardasN