mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This PR adds the basic `ktfmt` setup in OSS to lint Kotlin files before they're imported into the Meta codebase, making collaboration with external contributors smoother for Android related PRs. I tried to put together certain rules that mimic the current code style and it seems to work well as I get no errors for properly formatted files but this still might need some input to have the correct configuration. Added two scripts to the main package.json: - To check the files format you can run: `yarn lint-kotlin-check` - To apply formatting fixes, run: `yarn lint-kotlin` ## Changelog: [INTERNAL] - Kotlin: Set up ktfmt in OSS Pull Request resolved: https://github.com/facebook/react-native/pull/52064 Test Plan: Unformat any random Kotlin file inside ReactAndroid and then run: ```sh yarn lint-kotlin-check yarn lint-kotlin ``` Reviewed By: cipolleschi Differential Revision: D78272876 Pulled By: cortinico fbshipit-source-id: 0cf6b976968dfc5c6c478e88d17eb21c18961a34
React Native Gradle Plugin
This plugin is used by React Native Apps to configure themselves.
NOTE: It's important that this folder is called react-native-gradle-plugin as it's used
by users in their build.gradle file as follows:
buildscript {
// ...
dependencies {
classpath("com.facebook.react:react-native-gradle-plugin")
}
}
The name of the artifact is imposed by the folder name.