Content-Length: 336830 | pFad | http://github.com/facebook/react-native/pull/49439/commits/d41f5df826ad8baa7f69c9637e996d0712a63096

B9 Gradle Configuration Cache - Round 3 by cortinico · Pull Request #49439 · facebook/react-native · GitHub
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

Gradle Configuration Cache - Round 3 #49439

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Gradle Configuration Cache - Round 3
Summary:
This is the next part of a series of diff needed to enable G. Configuration Cache:
https://docs.gradle.org/current/userguide/configuration_cache.html
as it will make our CI faster (and will be the default in the future Gradle version).

Here I'm removing the `onlyIf` lambdas to make some tasks CC friendly.

The problem is that some `onlyIf` lambdas can't easily be serialized. Here I'm cleaning up
the problematic one to move the condition checks at execution time

Changelog:
[Internal] [Changed] -

Differential Revision: D69664732
  • Loading branch information
cortinico authored and facebook-github-bot committed Feb 14, 2025
commit d41f5df826ad8baa7f69c9637e996d0712a63096
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,19 @@ abstract class BuildCodegenCLITask : Exec() {

@get:Internal abstract val bashWindowsHome: Property<String>

@get:Internal abstract val rootProjectName: Property<String>

@get:InputFiles abstract val inputFiles: Property<FileTree>

@get:OutputFiles abstract val outputFiles: Property<FileTree>

@get:OutputFile abstract val logFile: RegularFileProperty

override fun exec() {
// For build from source scenario, we don't need to build the codegen at all.
if (rootProjectName.get() == "react-native-build-from-source") {
return
}
val logFileConcrete =
logFile.get().asFile.apply {
parentFile.mkdirs()
Expand Down
5 changes: 1 addition & 4 deletions packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,7 @@ val buildCodegenCLI by
include("lib/**/*.js")
include("lib/**/*.js.flow")
})
onlyIf {
// For build from source scenario, we don't need to build the codegen at all.
rootProject.name != "react-native-build-from-source"
}
rootProjectName.set(rootProject.name)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ val unzipHermes by
// the two tasks mentioned before, so we install CMake manually to break the circular dependency.

val installCMake by
tasks.registering(Exec::class) {
onlyIf { !File(cmakePath).exists() }
tasks.registering(CustomExecTask::class) {
onlyIfProvidedPathDoesNotExists.set(cmakePath)
commandLine(
windowsAwareCommandLine(getSDKManagerPath(), "--install", "cmake;${cmakeVersion}"))
}
Expand Down
Loading








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/facebook/react-native/pull/49439/commits/d41f5df826ad8baa7f69c9637e996d0712a63096

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy