Files
react-native/packages/react-native-codegen/android/build.gradle
T
Dulmandakh dfa9db49e3 bump Android Gradle Plugin to 4.1.0 (#30201)
Summary:
Android Studio 4.1 release with Android Gradle Plugin 4.1.0, thus I expect developers will update to newer version and expect React Native support. Thus release include many fixes and improvements, see[release notes](https://developer.android.com/studio/releases/gradle-plugin#4-1-0), but most importantly Google released it's API documentation at https://developer.android.com/reference/tools/gradle-api. We lacked the API documentation to develop proper React Gradle Plugin.

## Changelog

[Android] [Changed] - bump Android Gradle Plugin to 4.1.0

Pull Request resolved: https://github.com/facebook/react-native/pull/30201

Test Plan: RNTester builds and runs as expected, also my apps.

Reviewed By: cpojer

Differential Revision: D24560213

Pulled By: fkgozali

fbshipit-source-id: 9cf1e2373f278885b35b4f9176c7ad736ec50f6b
2020-10-27 23:35:51 -07:00

47 lines
1.1 KiB
Groovy

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
buildscript {
repositories {
mavenLocal()
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
}
}
allprojects {
repositories {
mavenLocal()
google()
jcenter()
}
}
// This task is required when using react-native-codegen from source, instead of npm.
task('buildCodegenCLI', type: Exec) {
def codegenRoot = "$projectDir/.."
inputs.files(
file("$codegenRoot/scripts"),
file("$codegenRoot/src"),
file("$codegenRoot/package.json"),
file("$codegenRoot/.babelrc"),
file("$codegenRoot/.prettierrc"),
)
def libDir = file("$codegenRoot/lib")
libDir.mkdirs()
def nodeModulesDir = file("$codegenRoot/node_modules")
nodeModulesDir.mkdirs();
outputs.dirs(libDir, nodeModulesDir)
commandLine("$codegenRoot/scripts/oss/build.sh")
}