ReactNativeのbuild.gradleって何?
build.gradle
Gradle
Groovy
bunild.gradleの中身
- 以下がReactNativeの初期状態のbuild.gradle
- buildscriptブロック内のclasspathに外部のプラグインのjarファイルを指定することでプロジェクト内に追加することができる
classpath 'com.google.gms:google-services:3.0.0'
はGoogleのサービス(Firebase等)をAndroidアプリ内で使うために必要なプラグイン
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.google.gms:google-services:3.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { mavenLocal() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } } }