Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure first Gradle Sync is downloading 3rd party deps #39426

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/react-native/ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ task downloadNdkBuildDependencies {
dependsOn(downloadGtest)
}

task prepareKotlinBuildScriptModel {
// This task is run when Gradle Sync is running.
// We create it here so we can let it depend on preBuild inside the android{}
}

// As ReactAndroid builds from source, the codegen needs to be built before it can be invoked.
// This is not the case for users of React Native, as we ship a compiled version of the codegen.
final def buildCodegenCLITask = tasks.register('buildCodegenCLI', BuildCodegenCLITask) {
Expand Down Expand Up @@ -609,6 +614,10 @@ android {
preparePrefab
)
generateCodegenSchemaFromJavaScript.dependsOn(buildCodegenCLITask)
prepareKotlinBuildScriptModel.dependsOn(
preBuild,
":packages:react-native:ReactAndroid:hermes-engine:preBuild",
)

sourceSets.main {
res.srcDirs = ["src/main/res/devsupport", "src/main/res/shell", "src/main/res/views/modal", "src/main/res/views/uimanager"]
Expand Down