Skip to content

Commit

Permalink
[0.74] Stub com.facebook.react.settings on 0.74
Browse files Browse the repository at this point in the history
  • Loading branch information
cortinico committed Jul 26, 2024
1 parent 8e5a936 commit 0111caa
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react-native-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ gradlePlugin {
id = "com.facebook.react.rootproject"
implementationClass = "com.facebook.react.ReactRootProjectPlugin"
}
create("react.settings") {
id = "com.facebook.react.settings"
implementationClass = "com.facebook.react.ReactSettingsPlugin"
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react

import org.gradle.api.Plugin
import org.gradle.api.initialization.Settings

/**
* This is a stub of the com.facebook.react.settings plugin.
*
* The plugin got added in 0.75, but to make it easier for 0.74 users to upgrade to 0.75, we're
* creating a stub plugin that does nothing. This way, users can include a `id("com.facebook.react.settings")`
* in their settings.gradle file without causing a build failure on 0.74.
*/
class ReactSettingsPlugin : Plugin<Settings> {
override fun apply(settings: Settings) {
// Do nothing, just register the plugin.
}
}

0 comments on commit 0111caa

Please sign in to comment.