Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR centralizes RNRepo Maven repository configuration inside the Android Gradle plugin, and updates the Expo config plugin + docs to stop requiring manual allprojects { repositories { ... } } setup.
Changes:
- Add RNRepo Maven repository registration to the
PrebuildsPluginat apply-time. - Remove
allprojectsMaven repo injection from the Expo config plugin and adjust its tests accordingly. - Update website/docs/READMEs to remove instructions for manually adding the RNRepo Maven repository.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/website/src/components/GettingStarted.astro | Updates Getting Started snippets to remove manual Maven repo setup. |
| packages/expo-config-plugin/src/withRNRepoPlugin.ts | Removes the Android allprojects Maven repo injection mod. |
| packages/expo-config-plugin/tests/withRNRepoPlugin.test.ts | Updates tests to no longer expect Maven repo injection. |
| packages/build-tools/package.json | Bumps build-tools version and updates the packaged Gradle plugin jar filename. |
| packages/build-tools/gradle-plugin/src/main/kotlin/org/rnrepo/tools/prebuilds/PrebuildsPlugin.kt | Adds addRNRepoRepository(project) to register the RNRepo Maven repository programmatically. |
| packages/build-tools/gradle-plugin/build.gradle | Bumps Gradle plugin base version to 0.3.1. |
| packages/build-tools/README.md | Removes manual Maven repo instructions from Android setup docs. |
| README.md | Removes manual Maven repo instructions from the main Android setup docs. |
Comments suppressed due to low confidence (1)
packages/build-tools/README.md:49
- Same as the root README: removing the Maven repo instructions is fine when project repositories are allowed, but Gradle builds configured with
RepositoriesMode.FAIL_ON_PROJECT_REPOSmay still require adding the RNRepo repo underdependencyResolutionManagementinsettings.gradle. Consider documenting that exception here to avoid setup failures that look like plugin bugs.
### Android Configuration
Add the following to your project's `android/build.gradle` file:
```diff
buildscript {
dependencies {
...
+ def rnrepoDir = new File(
+ providers.exec {
+ workingDir(rootDir)
+ commandLine("node", "--print", "require.resolve('@rnrepo/build-tools/package.json')")
+ }.standardOutput.asText.get().trim()
+ ).getParentFile().absolutePath
+ classpath fileTree(dir: "${rnrepoDir}/gradle-plugin/build/libs", include: ["prebuilds-plugin-*.jar"])
}
}
Then, apply the plugin in your android/app/build.gradle file:
apply plugin: "com.facebook.react"
+ apply plugin: "org.rnrepo.tools.prebuilds-plugin"</details>
---
💡 <a href="/software-mansion/rnrepo/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
...ages/build-tools/gradle-plugin/src/main/kotlin/org/rnrepo/tools/prebuilds/PrebuildsPlugin.kt
Show resolved
Hide resolved
...ages/build-tools/gradle-plugin/src/main/kotlin/org/rnrepo/tools/prebuilds/PrebuildsPlugin.kt
Show resolved
Hide resolved
...ages/build-tools/gradle-plugin/src/main/kotlin/org/rnrepo/tools/prebuilds/PrebuildsPlugin.kt
Show resolved
Hide resolved
...ages/build-tools/gradle-plugin/src/main/kotlin/org/rnrepo/tools/prebuilds/PrebuildsPlugin.kt
Show resolved
Hide resolved
...ages/build-tools/gradle-plugin/src/main/kotlin/org/rnrepo/tools/prebuilds/PrebuildsPlugin.kt
Show resolved
Hide resolved
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
allprojects {repositories { url ...}}}project.uri("https://packages.rnrepo.org/releases")inside gradle plugin🎯 Type of Change