Skip to content

Commit 1f905b2

Browse files
authored
Add docs on how to configure a Maven Internal Mirror (facebook#4671)
1 parent 9eca986 commit 1f905b2

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed

docs/build-speed.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,26 @@ org.gradle.configuration-cache=true
8181

8282
Please refer to the [official Gradle documentation](https://docs.gradle.org/current/userguide/configuration_cache.html) for more resources on Configuration Caching.
8383

84+
## Using a Maven Mirror (Android-only)
85+
86+
When building Android apps, your Gradle builds will need to download the necessary dependencies from Maven Central and other repositories from the internet.
87+
88+
If your organization is running a Maven repository mirror, you should consider using it as it will speed up your build, by downloading the artifacts from the mirror rather than from the internet.
89+
90+
You can configure a mirror by specifying the `exclusiveEnterpriseRepository` property in your `android/gradle.properties` file:
91+
92+
```diff
93+
# Use this property to enable or disable the Hermes JS engine.
94+
# If set to false, you will be using JSC instead.
95+
hermesEnabled=true
96+
97+
# Use this property to configure a Maven enteprise repository
98+
# that will be used exclusively to fetch all of your dependencies.
99+
+exclusiveEnterpriseRepository=https://my.internal.proxy.net/
100+
```
101+
102+
By setting this property, your build will fetch dependencies **exclusively** from your specified repository and not from others.
103+
84104
## Use a compiler cache
85105

86106
If you're running frequent native builds (either C++ or Objective-C), you might benefit from using a **compiler cache**.

website/versioned_docs/version-0.78/build-speed.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,26 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
5050

5151
Once you build a **release version** of your app, don't forget to remove those flags as you want to build an apk/app bundle that works for all the ABIs and not only for the one you're using in your daily development workflow.
5252

53+
## Using a Maven Mirror (Android-only)
54+
55+
When building Android apps, your Gradle builds will need to download the necessary dependencies from Maven Central and other repositories from the internet.
56+
57+
If your organization is running a Maven repository mirror, you should consider using as it will speed up your build, by downloading the artifacts from the mirror rather than from the internet.
58+
59+
You can configure a mirror by specifying the `exclusiveEnterpriseRepository` property in your `android/gradle.properties` file:
60+
61+
```diff
62+
# Use this property to enable or disable the Hermes JS engine.
63+
# If set to false, you will be using JSC instead.
64+
hermesEnabled=true
65+
66+
# Use this property to configure a Maven enteprise repository
67+
# that will be used exclusively to fetch all of your dependencies.
68+
+exclusiveEnterpriseRepository=https://my.internal.proxy.net/
69+
```
70+
71+
By setting this property, your build will fetch dependencies **exclusively** from your specified repository and not from others.
72+
5373
## Use a compiler cache
5474

5575
If you're running frequent native builds (either C++ or Objective-C), you might benefit from using a **compiler cache**.

website/versioned_docs/version-0.79/build-speed.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,26 @@ org.gradle.configuration-cache=true
8181

8282
Please refer to the [official Gradle documentation](https://docs.gradle.org/current/userguide/configuration_cache.html) for more resources on Configuration Caching.
8383

84+
## Using a Maven Mirror (Android-only)
85+
86+
When building Android apps, your Gradle builds will need to download the necessary dependencies from Maven Central and other repositories from the internet.
87+
88+
If your organization is running a Maven repository mirror, you should consider using as it will speed up your build, by downloading the artifacts from the mirror rather than from the internet.
89+
90+
You can configure a mirror by specifying the `exclusiveEnterpriseRepository` property in your `android/gradle.properties` file:
91+
92+
```diff
93+
# Use this property to enable or disable the Hermes JS engine.
94+
# If set to false, you will be using JSC instead.
95+
hermesEnabled=true
96+
97+
# Use this property to configure a Maven enteprise repository
98+
# that will be used exclusively to fetch all of your dependencies.
99+
+exclusiveEnterpriseRepository=https://my.internal.proxy.net/
100+
```
101+
102+
By setting this property, your build will fetch dependencies **exclusively** from your specified repository and not from others.
103+
84104
## Use a compiler cache
85105

86106
If you're running frequent native builds (either C++ or Objective-C), you might benefit from using a **compiler cache**.

website/versioned_docs/version-0.80/build-speed.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,26 @@ org.gradle.configuration-cache=true
8181

8282
Please refer to the [official Gradle documentation](https://docs.gradle.org/current/userguide/configuration_cache.html) for more resources on Configuration Caching.
8383

84+
## Using a Maven Mirror (Android-only)
85+
86+
When building Android apps, your Gradle builds will need to download the necessary dependencies from Maven Central and other repositories from the internet.
87+
88+
If your organization is running a Maven repository mirror, you should consider using as it will speed up your build, by downloading the artifacts from the mirror rather than from the internet.
89+
90+
You can configure a mirror by specifying the `exclusiveEnterpriseRepository` property in your `android/gradle.properties` file:
91+
92+
```diff
93+
# Use this property to enable or disable the Hermes JS engine.
94+
# If set to false, you will be using JSC instead.
95+
hermesEnabled=true
96+
97+
# Use this property to configure a Maven enteprise repository
98+
# that will be used exclusively to fetch all of your dependencies.
99+
+exclusiveEnterpriseRepository=https://my.internal.proxy.net/
100+
```
101+
102+
By setting this property, your build will fetch dependencies **exclusively** from your specified repository and not from others.
103+
84104
## Use a compiler cache
85105

86106
If you're running frequent native builds (either C++ or Objective-C), you might benefit from using a **compiler cache**.

0 commit comments

Comments
 (0)