From 71676809d61f862325587f180e96a8467c3db2b3 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Wed, 19 Oct 2016 16:50:39 -0700 Subject: [PATCH] Fix indent of .gradle files Summary: In most .gradle files, lines are indented with 4 spaces, but in some places they are indented with 2 spaces. This PR fixes them and enforce it by adding .editorconfig settings. Closes https://github.com/facebook/react-native/pull/10267 Differential Revision: D4048335 Pulled By: lacker fbshipit-source-id: df2f2556380f56672cf85690eb1c80e640a6aedf --- .editorconfig | 3 +++ ReactAndroid/build.gradle | 10 +++++----- .../generator-android/templates/src/app/build.gradle | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.editorconfig b/.editorconfig index 3b281f2f7..4cde30709 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,3 +9,6 @@ end_of_line = lf insert_final_newline = true indent_style = space indent_size = 2 + +[*.gradle] +indent_size = 4 diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index bd9e1c23d..0a5659014 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -214,8 +214,8 @@ task packageReactNdkLibs(dependsOn: buildReactNdkLib, type: Copy) { } task packageReactNdkLibsForBuck(dependsOn: packageReactNdkLibs, type: Copy) { - from "$buildDir/react-ndk/exported" - into "src/main/jni/prebuilt/lib" + from "$buildDir/react-ndk/exported" + into "src/main/jni/prebuilt/lib" } android { @@ -243,9 +243,9 @@ android { jniLibs.srcDir "$buildDir/react-ndk/exported" res.srcDirs = ['src/main/res/devsupport', 'src/main/res/shell', 'src/main/res/views/modal'] java { - srcDirs = ['src/main/java', 'src/main/libraries/soloader/java', 'src/main/jni/first-party/fb/jni/java'] - exclude 'com/facebook/react/processing' - exclude 'com/facebook/react/module/processing' + srcDirs = ['src/main/java', 'src/main/libraries/soloader/java', 'src/main/jni/first-party/fb/jni/java'] + exclude 'com/facebook/react/processing' + exclude 'com/facebook/react/module/processing' } } diff --git a/local-cli/generator-android/templates/src/app/build.gradle b/local-cli/generator-android/templates/src/app/build.gradle index 63ab2dcbf..d15d6c6c8 100644 --- a/local-cli/generator-android/templates/src/app/build.gradle +++ b/local-cli/generator-android/templates/src/app/build.gradle @@ -134,6 +134,6 @@ dependencies { // Run this once to be able to run the application with BUCK // puts all compile dependencies into folder libs for BUCK to use task copyDownloadableDepsToLibs(type: Copy) { - from configurations.compile - into 'libs' + from configurations.compile + into 'libs' }