Fix compilation warnings introduced by Gradle 8.4 (#39959)

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

We're still accessing project.buildDir which will be removed in Gradle 9.0
I'm cleaning it up here.

Changelog:
[Internal] [Changed] - Fix compilation warnings introduced by Gradle 8.4

Reviewed By: yungsters

Differential Revision: D50016573

fbshipit-source-id: de7a725f61b503f08991ebf85b9a002cefab221a
This commit is contained in:
Nicola Corti
2023-10-06 11:38:59 -07:00
committed by Facebook GitHub Bot
parent 81213f6524
commit e9ecd3511e
2 changed files with 2 additions and 0 deletions
@@ -66,6 +66,7 @@ tasks.withType<KotlinCompile>().configureEach {
apiVersion = "1.5"
// See comment above on JDK 11 support
jvmTarget = "11"
allWarningsAsErrors = true
}
}
@@ -23,6 +23,7 @@ internal fun Project.configureReactTasks(variant: Variant, config: ReactExtensio
val targetName = variant.name.capitalizeCompat()
val targetPath = variant.name
val buildDir = this.layout.buildDirectory.get().asFile
// Resources: generated/assets/react/<variant>/index.android.bundle
val resourcesDir = File(buildDir, "generated/res/react/$targetPath")
// Bundle: generated/assets/react/<variant>/index.android.bundle