Skip to content

Commit b4a3192

Browse files
author
Christopher J. Brody
committed
add references & links to generated build.gradle (see PR #152)
as a followup to updates from PR #135 * move the other recommended references * remove react-native template reference no longer needed
1 parent ab0a800 commit b4a3192

File tree

24 files changed

+288
-48
lines changed

24 files changed

+288
-48
lines changed

templates/android.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ module.exports = platform => [{
22
name: () => `${platform}/build.gradle`,
33
content: ({ packageIdentifier }) => `// ${platform}/build.gradle
44
5+
// based on:
6+
//
7+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
8+
// original location:
9+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
10+
//
11+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
12+
// original location:
13+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
14+
515
def DEFAULT_COMPILE_SDK_VERSION = 28
616
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
717
def DEFAULT_MIN_SDK_VERSION = 16
@@ -18,6 +28,7 @@ buildscript {
1828
// The Android Gradle plugin is only required when opening the android folder stand-alone.
1929
// This avoids unnecessary downloads and potential conflicts when the library is included as a
2030
// module dependency in an application project.
31+
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
2132
if (project == rootProject) {
2233
repositories {
2334
google()
@@ -47,6 +58,7 @@ android {
4758
}
4859
4960
repositories {
61+
// ref: https://www.baeldung.com/maven-local-repository
5062
mavenLocal()
5163
maven {
5264
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
@@ -61,8 +73,6 @@ repositories {
6173
}
6274
6375
dependencies {
64-
// ref:
65-
// https://github.com/facebook/react-native/blob/0.61-stable/template/android/app/build.gradle#L192
6676
//noinspection GradleDynamicVersion
6777
implementation 'com.facebook.react:react-native:+' // From node_modules
6878
}

tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap

+12-2
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,16 @@ sdk.dir=/Users/{username}/Library/Android/sdk
100100
"name": "react-native-integration-view-test-package/android/build.gradle",
101101
"theContent": "// android/build.gradle
102102
103+
// based on:
104+
//
105+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
106+
// original location:
107+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
108+
//
109+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
110+
// original location:
111+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
112+
103113
def DEFAULT_COMPILE_SDK_VERSION = 28
104114
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
105115
def DEFAULT_MIN_SDK_VERSION = 16
@@ -116,6 +126,7 @@ buildscript {
116126
// The Android Gradle plugin is only required when opening the android folder stand-alone.
117127
// This avoids unnecessary downloads and potential conflicts when the library is included as a
118128
// module dependency in an application project.
129+
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
119130
if (project == rootProject) {
120131
repositories {
121132
google()
@@ -145,6 +156,7 @@ android {
145156
}
146157
147158
repositories {
159+
// ref: https://www.baeldung.com/maven-local-repository
148160
mavenLocal()
149161
maven {
150162
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
@@ -159,8 +171,6 @@ repositories {
159171
}
160172
161173
dependencies {
162-
// ref:
163-
// https://github.com/facebook/react-native/blob/0.61-stable/template/android/app/build.gradle#L192
164174
//noinspection GradleDynamicVersion
165175
implementation 'com.facebook.react:react-native:+' // From node_modules
166176
}

tests/integration/cli/create/with-defaults/__snapshots__/cli-create-with-defaults.test.js.snap

+12-2
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,16 @@ sdk.dir=/Users/{username}/Library/Android/sdk
100100
"name": "react-native-integration-test-package/android/build.gradle",
101101
"theContent": "// android/build.gradle
102102
103+
// based on:
104+
//
105+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
106+
// original location:
107+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
108+
//
109+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
110+
// original location:
111+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
112+
103113
def DEFAULT_COMPILE_SDK_VERSION = 28
104114
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
105115
def DEFAULT_MIN_SDK_VERSION = 16
@@ -116,6 +126,7 @@ buildscript {
116126
// The Android Gradle plugin is only required when opening the android folder stand-alone.
117127
// This avoids unnecessary downloads and potential conflicts when the library is included as a
118128
// module dependency in an application project.
129+
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
119130
if (project == rootProject) {
120131
repositories {
121132
google()
@@ -145,6 +156,7 @@ android {
145156
}
146157
147158
repositories {
159+
// ref: https://www.baeldung.com/maven-local-repository
148160
mavenLocal()
149161
maven {
150162
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
@@ -159,8 +171,6 @@ repositories {
159171
}
160172
161173
dependencies {
162-
// ref:
163-
// https://github.com/facebook/react-native/blob/0.61-stable/template/android/app/build.gradle#L192
164174
//noinspection GradleDynamicVersion
165175
implementation 'com.facebook.react:react-native:+' // From node_modules
166176
}

tests/with-injection/create/view/with-defaults/__snapshots__/create-view-with-defaults.test.js.snap

+12-2
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,16 @@ content:
175175
--------
176176
// android/build.gradle
177177
178+
// based on:
179+
//
180+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
181+
// original location:
182+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
183+
//
184+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
185+
// original location:
186+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
187+
178188
def DEFAULT_COMPILE_SDK_VERSION = 28
179189
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
180190
def DEFAULT_MIN_SDK_VERSION = 16
@@ -191,6 +201,7 @@ buildscript {
191201
// The Android Gradle plugin is only required when opening the android folder stand-alone.
192202
// This avoids unnecessary downloads and potential conflicts when the library is included as a
193203
// module dependency in an application project.
204+
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
194205
if (project == rootProject) {
195206
repositories {
196207
google()
@@ -220,6 +231,7 @@ android {
220231
}
221232
222233
repositories {
234+
// ref: https://www.baeldung.com/maven-local-repository
223235
mavenLocal()
224236
maven {
225237
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
@@ -234,8 +246,6 @@ repositories {
234246
}
235247
236248
dependencies {
237-
// ref:
238-
// https://github.com/facebook/react-native/blob/0.61-stable/template/android/app/build.gradle#L192
239249
//noinspection GradleDynamicVersion
240250
implementation 'com.facebook.react:react-native:+' // From node_modules
241251
}

tests/with-injection/create/view/with-example/with-defaults/__snapshots__/create-view-with-example-with-defaults.test.js.snap

+12-2
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,16 @@ content:
180180
--------
181181
// android/build.gradle
182182
183+
// based on:
184+
//
185+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
186+
// original location:
187+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
188+
//
189+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
190+
// original location:
191+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
192+
183193
def DEFAULT_COMPILE_SDK_VERSION = 28
184194
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
185195
def DEFAULT_MIN_SDK_VERSION = 16
@@ -196,6 +206,7 @@ buildscript {
196206
// The Android Gradle plugin is only required when opening the android folder stand-alone.
197207
// This avoids unnecessary downloads and potential conflicts when the library is included as a
198208
// module dependency in an application project.
209+
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
199210
if (project == rootProject) {
200211
repositories {
201212
google()
@@ -225,6 +236,7 @@ android {
225236
}
226237
227238
repositories {
239+
// ref: https://www.baeldung.com/maven-local-repository
228240
mavenLocal()
229241
maven {
230242
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
@@ -239,8 +251,6 @@ repositories {
239251
}
240252
241253
dependencies {
242-
// ref:
243-
// https://github.com/facebook/react-native/blob/0.61-stable/template/android/app/build.gradle#L192
244254
//noinspection GradleDynamicVersion
245255
implementation 'com.facebook.react:react-native:+' // From node_modules
246256
}

tests/with-injection/create/view/with-example/with-options/__snapshots__/create-view-with-example-with-options.test.js.snap

+12-2
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,16 @@ content:
180180
--------
181181
// android/build.gradle
182182
183+
// based on:
184+
//
185+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
186+
// original location:
187+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
188+
//
189+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
190+
// original location:
191+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
192+
183193
def DEFAULT_COMPILE_SDK_VERSION = 28
184194
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
185195
def DEFAULT_MIN_SDK_VERSION = 16
@@ -196,6 +206,7 @@ buildscript {
196206
// The Android Gradle plugin is only required when opening the android folder stand-alone.
197207
// This avoids unnecessary downloads and potential conflicts when the library is included as a
198208
// module dependency in an application project.
209+
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
199210
if (project == rootProject) {
200211
repositories {
201212
google()
@@ -225,6 +236,7 @@ android {
225236
}
226237
227238
repositories {
239+
// ref: https://www.baeldung.com/maven-local-repository
228240
mavenLocal()
229241
maven {
230242
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
@@ -239,8 +251,6 @@ repositories {
239251
}
240252
241253
dependencies {
242-
// ref:
243-
// https://github.com/facebook/react-native/blob/0.61-stable/template/android/app/build.gradle#L192
244254
//noinspection GradleDynamicVersion
245255
implementation 'com.facebook.react:react-native:+' // From node_modules
246256
}

tests/with-injection/create/view/with-options/for-android/__snapshots__/lib-view-android-config-options.test.js.snap

+12-2
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,16 @@ content:
144144
--------
145145
// android/build.gradle
146146
147+
// based on:
148+
//
149+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
150+
// original location:
151+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
152+
//
153+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
154+
// original location:
155+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
156+
147157
def DEFAULT_COMPILE_SDK_VERSION = 28
148158
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
149159
def DEFAULT_MIN_SDK_VERSION = 16
@@ -160,6 +170,7 @@ buildscript {
160170
// The Android Gradle plugin is only required when opening the android folder stand-alone.
161171
// This avoids unnecessary downloads and potential conflicts when the library is included as a
162172
// module dependency in an application project.
173+
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
163174
if (project == rootProject) {
164175
repositories {
165176
google()
@@ -189,6 +200,7 @@ android {
189200
}
190201
191202
repositories {
203+
// ref: https://www.baeldung.com/maven-local-repository
192204
mavenLocal()
193205
maven {
194206
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
@@ -203,8 +215,6 @@ repositories {
203215
}
204216
205217
dependencies {
206-
// ref:
207-
// https://github.com/facebook/react-native/blob/0.61-stable/template/android/app/build.gradle#L192
208218
//noinspection GradleDynamicVersion
209219
implementation 'com.facebook.react:react-native:+' // From node_modules
210220
}

tests/with-injection/create/with-defaults/__snapshots__/create-with-defaults.test.js.snap

+12-2
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,16 @@ content:
175175
--------
176176
// android/build.gradle
177177
178+
// based on:
179+
//
180+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
181+
// original location:
182+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
183+
//
184+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
185+
// original location:
186+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
187+
178188
def DEFAULT_COMPILE_SDK_VERSION = 28
179189
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
180190
def DEFAULT_MIN_SDK_VERSION = 16
@@ -191,6 +201,7 @@ buildscript {
191201
// The Android Gradle plugin is only required when opening the android folder stand-alone.
192202
// This avoids unnecessary downloads and potential conflicts when the library is included as a
193203
// module dependency in an application project.
204+
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
194205
if (project == rootProject) {
195206
repositories {
196207
google()
@@ -220,6 +231,7 @@ android {
220231
}
221232
222233
repositories {
234+
// ref: https://www.baeldung.com/maven-local-repository
223235
mavenLocal()
224236
maven {
225237
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
@@ -234,8 +246,6 @@ repositories {
234246
}
235247
236248
dependencies {
237-
// ref:
238-
// https://github.com/facebook/react-native/blob/0.61-stable/template/android/app/build.gradle#L192
239249
//noinspection GradleDynamicVersion
240250
implementation 'com.facebook.react:react-native:+' // From node_modules
241251
}

tests/with-injection/create/with-example/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap

+12-2
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,16 @@ content:
180180
--------
181181
// android/build.gradle
182182
183+
// based on:
184+
//
185+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle
186+
// original location:
187+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
188+
//
189+
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
190+
// original location:
191+
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
192+
183193
def DEFAULT_COMPILE_SDK_VERSION = 28
184194
def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3'
185195
def DEFAULT_MIN_SDK_VERSION = 16
@@ -196,6 +206,7 @@ buildscript {
196206
// The Android Gradle plugin is only required when opening the android folder stand-alone.
197207
// This avoids unnecessary downloads and potential conflicts when the library is included as a
198208
// module dependency in an application project.
209+
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
199210
if (project == rootProject) {
200211
repositories {
201212
google()
@@ -225,6 +236,7 @@ android {
225236
}
226237
227238
repositories {
239+
// ref: https://www.baeldung.com/maven-local-repository
228240
mavenLocal()
229241
maven {
230242
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
@@ -239,8 +251,6 @@ repositories {
239251
}
240252
241253
dependencies {
242-
// ref:
243-
// https://github.com/facebook/react-native/blob/0.61-stable/template/android/app/build.gradle#L192
244254
//noinspection GradleDynamicVersion
245255
implementation 'com.facebook.react:react-native:+' // From node_modules
246256
}

0 commit comments

Comments
 (0)