Skip to content

Commit bebf2b2

Browse files
author
Christopher J. Brody
committed
remove Android Gradle tools reference
from generated code in order to avoid multiple Android build tools Gradle plugin versions in React Native projects as discussed in react-native-community/discussions-and-proposals#151
1 parent d99a90d commit bebf2b2

File tree

24 files changed

+0
-240
lines changed

24 files changed

+0
-240
lines changed

templates/android.js

-10
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@ module.exports = platform => [{
44
ext.safeExtGet = {prop, fallback ->
55
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
66
}
7-
repositories {
8-
google()
9-
jcenter()
10-
}
11-
12-
dependencies {
13-
// Matches recent template from React Native (0.60)
14-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
15-
classpath("com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}")
16-
}
177
}
188
199
apply plugin: 'com.android.library'

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

-10
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,6 @@ sdk.dir=/Users/{username}/Library/Android/sdk
128128
ext.safeExtGet = {prop, fallback ->
129129
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
130130
}
131-
repositories {
132-
google()
133-
jcenter()
134-
}
135-
136-
dependencies {
137-
// Matches recent template from React Native (0.60)
138-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
139-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
140-
}
141131
}
142132
143133
apply plugin: 'com.android.library'

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

-10
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,6 @@ sdk.dir=/Users/{username}/Library/Android/sdk
128128
ext.safeExtGet = {prop, fallback ->
129129
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
130130
}
131-
repositories {
132-
google()
133-
jcenter()
134-
}
135-
136-
dependencies {
137-
// Matches recent template from React Native (0.60)
138-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
139-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
140-
}
141131
}
142132
143133
apply plugin: 'com.android.library'

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

-10
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,6 @@ buildscript {
203203
ext.safeExtGet = {prop, fallback ->
204204
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
205205
}
206-
repositories {
207-
google()
208-
jcenter()
209-
}
210-
211-
dependencies {
212-
// Matches recent template from React Native (0.60)
213-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
214-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
215-
}
216206
}
217207
218208
apply plugin: 'com.android.library'

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

-10
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,6 @@ buildscript {
208208
ext.safeExtGet = {prop, fallback ->
209209
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
210210
}
211-
repositories {
212-
google()
213-
jcenter()
214-
}
215-
216-
dependencies {
217-
// Matches recent template from React Native (0.60)
218-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
219-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
220-
}
221211
}
222212
223213
apply plugin: 'com.android.library'

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

-10
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,6 @@ buildscript {
208208
ext.safeExtGet = {prop, fallback ->
209209
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
210210
}
211-
repositories {
212-
google()
213-
jcenter()
214-
}
215-
216-
dependencies {
217-
// Matches recent template from React Native (0.60)
218-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
219-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
220-
}
221211
}
222212
223213
apply plugin: 'com.android.library'

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

-10
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,6 @@ buildscript {
165165
ext.safeExtGet = {prop, fallback ->
166166
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
167167
}
168-
repositories {
169-
google()
170-
jcenter()
171-
}
172-
173-
dependencies {
174-
// Matches recent template from React Native (0.60)
175-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
176-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
177-
}
178168
}
179169
180170
apply plugin: 'com.android.library'

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

-10
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,6 @@ buildscript {
203203
ext.safeExtGet = {prop, fallback ->
204204
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
205205
}
206-
repositories {
207-
google()
208-
jcenter()
209-
}
210-
211-
dependencies {
212-
// Matches recent template from React Native (0.60)
213-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
214-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
215-
}
216206
}
217207
218208
apply plugin: 'com.android.library'

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

-10
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,6 @@ buildscript {
208208
ext.safeExtGet = {prop, fallback ->
209209
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
210210
}
211-
repositories {
212-
google()
213-
jcenter()
214-
}
215-
216-
dependencies {
217-
// Matches recent template from React Native (0.60)
218-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
219-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
220-
}
221211
}
222212
223213
apply plugin: 'com.android.library'

tests/with-injection/create/with-example/with-missing-package-scripts/__snapshots__/recover-from-missing-package-scripts.test.js.snap

-10
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,6 @@ buildscript {
208208
ext.safeExtGet = {prop, fallback ->
209209
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
210210
}
211-
repositories {
212-
google()
213-
jcenter()
214-
}
215-
216-
dependencies {
217-
// Matches recent template from React Native (0.60)
218-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
219-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
220-
}
221211
}
222212
223213
apply plugin: 'com.android.library'

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

-10
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,6 @@ buildscript {
208208
ext.safeExtGet = {prop, fallback ->
209209
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
210210
}
211-
repositories {
212-
google()
213-
jcenter()
214-
}
215-
216-
dependencies {
217-
// Matches recent template from React Native (0.60)
218-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
219-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
220-
}
221211
}
222212
223213
apply plugin: 'com.android.library'

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

-10
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,6 @@ buildscript {
208208
ext.safeExtGet = {prop, fallback ->
209209
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
210210
}
211-
repositories {
212-
google()
213-
jcenter()
214-
}
215-
216-
dependencies {
217-
// Matches recent template from React Native (0.60)
218-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
219-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
220-
}
221211
}
222212
223213
apply plugin: 'com.android.library'

tests/with-injection/create/with-name-in-camel-case/__snapshots__/create-with-name-in-camel-case.test.js.snap

-10
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,6 @@ buildscript {
203203
ext.safeExtGet = {prop, fallback ->
204204
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
205205
}
206-
repositories {
207-
google()
208-
jcenter()
209-
}
210-
211-
dependencies {
212-
// Matches recent template from React Native (0.60)
213-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
214-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
215-
}
216206
}
217207
218208
apply plugin: 'com.android.library'

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

-10
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,6 @@ buildscript {
165165
ext.safeExtGet = {prop, fallback ->
166166
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
167167
}
168-
repositories {
169-
google()
170-
jcenter()
171-
}
172-
173-
dependencies {
174-
// Matches recent template from React Native (0.60)
175-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
176-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
177-
}
178168
}
179169
180170
apply plugin: 'com.android.library'

tests/with-injection/create/with-options/platforms-array/__snapshots__/platforms-array.test.js.snap

-10
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,6 @@ buildscript {
203203
ext.safeExtGet = {prop, fallback ->
204204
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
205205
}
206-
repositories {
207-
google()
208-
jcenter()
209-
}
210-
211-
dependencies {
212-
// Matches recent template from React Native (0.60)
213-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
214-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
215-
}
216206
}
217207
218208
apply plugin: 'com.android.library'

tests/with-injection/create/with-options/platforms-comma-separated/__snapshots__/platforms-comma-separated.test.js.snap

-10
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,6 @@ buildscript {
203203
ext.safeExtGet = {prop, fallback ->
204204
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
205205
}
206-
repositories {
207-
google()
208-
jcenter()
209-
}
210-
211-
dependencies {
212-
// Matches recent template from React Native (0.60)
213-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
214-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
215-
}
216206
}
217207
218208
apply plugin: 'com.android.library'

tests/with-injection/create/with-options/with-custom-module-prefix/__snapshots__/create-with-custom-module-prefix.test.js.snap

-10
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,6 @@ buildscript {
203203
ext.safeExtGet = {prop, fallback ->
204204
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
205205
}
206-
repositories {
207-
google()
208-
jcenter()
209-
}
210-
211-
dependencies {
212-
// Matches recent template from React Native (0.60)
213-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
214-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
215-
}
216206
}
217207
218208
apply plugin: 'com.android.library'

tests/with-injection/create/with-options/with-module-name/__snapshots__/create-with-module-name.test.js.snap

-10
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,6 @@ buildscript {
203203
ext.safeExtGet = {prop, fallback ->
204204
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
205205
}
206-
repositories {
207-
google()
208-
jcenter()
209-
}
210-
211-
dependencies {
212-
// Matches recent template from React Native (0.60)
213-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
214-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
215-
}
216206
}
217207
218208
apply plugin: 'com.android.library'

tests/with-mocks/cli/command/func/with-options/__snapshots__/cli-command-func-with-options.test.js.snap

-10
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,6 @@ buck-out/
207207
ext.safeExtGet = {prop, fallback ->
208208
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
209209
}
210-
repositories {
211-
google()
212-
jcenter()
213-
}
214-
215-
dependencies {
216-
// Matches recent template from React Native (0.60)
217-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
218-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
219-
}
220210
}
221211
222212
apply plugin: 'com.android.library'

tests/with-mocks/cli/program/with-defaults/for-android/__snapshots__/cli-program-with-defaults-for-android.test.js.snap

-10
Original file line numberDiff line numberDiff line change
@@ -330,16 +330,6 @@ buck-out/
330330
ext.safeExtGet = {prop, fallback ->
331331
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
332332
}
333-
repositories {
334-
google()
335-
jcenter()
336-
}
337-
338-
dependencies {
339-
// Matches recent template from React Native (0.60)
340-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
341-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
342-
}
343333
}
344334
345335
apply plugin: 'com.android.library'

tests/with-mocks/lib/create/with-example/with-logging/with-defaults/__snapshots__/create-with-example-with-defaults.test.js.snap

-10
Original file line numberDiff line numberDiff line change
@@ -272,16 +272,6 @@ buck-out/
272272
ext.safeExtGet = {prop, fallback ->
273273
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
274274
}
275-
repositories {
276-
google()
277-
jcenter()
278-
}
279-
280-
dependencies {
281-
// Matches recent template from React Native (0.60)
282-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
283-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
284-
}
285275
}
286276
287277
apply plugin: 'com.android.library'

tests/with-mocks/lib/create/with-example/with-logging/with-error/__snapshots__/with-yarn-error-logging.test.js.snap

-10
Original file line numberDiff line numberDiff line change
@@ -272,16 +272,6 @@ buck-out/
272272
ext.safeExtGet = {prop, fallback ->
273273
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
274274
}
275-
repositories {
276-
google()
277-
jcenter()
278-
}
279-
280-
dependencies {
281-
// Matches recent template from React Native (0.60)
282-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
283-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
284-
}
285275
}
286276
287277
apply plugin: 'com.android.library'

tests/with-mocks/lib/create/with-example/with-logging/with-null-options/with-null-prefix/__snapshots__/create-with-example-with-options.test.js.snap

-10
Original file line numberDiff line numberDiff line change
@@ -272,16 +272,6 @@ buck-out/
272272
ext.safeExtGet = {prop, fallback ->
273273
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
274274
}
275-
repositories {
276-
google()
277-
jcenter()
278-
}
279-
280-
dependencies {
281-
// Matches recent template from React Native (0.60)
282-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
283-
classpath(\\"com.android.tools.build:gradle:\${safeExtGet('gradlePluginVersion', '3.4.1')}\\")
284-
}
285275
}
286276
287277
apply plugin: 'com.android.library'

0 commit comments

Comments
 (0)