-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Add Sonatype Central repository for users of nightly builds only #55305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Sonatype Central repository for users of nightly builds only #55305
Conversation
Summary: Even though Sonatype Central repository isn't used by an app, still the React Native Gradle plugin adds the Sonatype Central to repositories. In some cases it leads to a considerable amount of failed requests on Gradle downloading dependencies. I'm introducing a Gradle property to control if Sonatype Central should be included by default or not. User can control this behavior by changing their `gradle.properties` file as such: ``` includeSonatypeRepository=false ``` The default value of this property is true Changelog: [Android] [Added] - Make the addition of Sonatype Central repository configurable
|
That's not the right approach. Instead we should add the snapshot repository only if you're using a nightly version of React Native. |
Summary: Even though Sonatype Central repository isn't used by an app, still the React Native Gradle plugin adds the Sonatype Central to repositories. In some cases it leads to a considerable amount of failed requests on Gradle downloading dependencies. I'm introducing a change where Sonatype Central repository is included for users of nightly builds only. Changelog: [ANDROID] [CHANGED] - Add Sonatype Central repository for users of nightly builds only
@cortinico Ah, I see, thank you I've changed the PR accordingly :) |
| private fun String.isNightly(): Boolean = | ||
| this.startsWith("0.0.0") || "-nightly-" in this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you write some unit tests for this function as well?
| val hermesGroupString: String = DEFAULT_INTERNAL_HERMES_PUBLISHING_GROUP, | ||
| ) | ||
| ) { | ||
| val isNightly: Boolean = versionString.isNightly() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| val isNightly: Boolean = versionString.isNightly() | |
| val isNightly: Boolean get() = versionString.isNightly() |
|
a couple of nits to fix and then we can merge this |
Summary:
Even though Sonatype Central repository isn't used by an app, still the React Native Gradle plugin adds the Sonatype Central to repositories.
In some cases it leads to a considerable amount of failed requests on Gradle downloading dependencies.
I'm introducing a change where Sonatype Central repository is included for users of nightly builds only.
Changelog:
[ANDROID] [CHANGED] - Add Sonatype Central repository for users of nightly builds only
Test Plan:
All of the tests in gradle plugin are green