Skip to content

Commit

Permalink
Fix broken Android CI due to broken BundleJsAndAssetsTask override (#…
Browse files Browse the repository at this point in the history
…32194)

Summary:
Pull Request resolved: #32194

This Diff fixes the `test_android` CircleCI that is currently broken due to a faulty `BundleJsAndAssetsTask`
(that's my fault sorry for this).

The CI is failing with a `execCommand == null!` error message. The message is happening as the aformentioned
task is not correctly overriding `exec()` but just declaring a `TaskAction`. I'm fixing it.

Changelog:
[Internal] [Changed] - Fix broken Android CI due to broken `BundleJsAndAssetsTask` override

Reviewed By: GijsWeterings

Differential Revision: D30899742

fbshipit-source-id: a39b01b7d429bd7e87411282e1c22a7606ea22e0
  • Loading branch information
cortinico authored and facebook-github-bot committed Sep 13, 2021
1 parent d246946 commit 24bf1c5
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ abstract class BundleJsAndAssetsTask : Exec() {
@get:OutputDirectory lateinit var jsSourceMapsDir: File
@get:OutputFile lateinit var jsSourceMapsFile: File

@TaskAction
fun run() {
override fun exec() {
cleanOutputDirectories()
executeBundleCommand()
configureBundleCommand()
super.exec()
}

private fun cleanOutputDirectories() {
Expand All @@ -47,7 +47,7 @@ abstract class BundleJsAndAssetsTask : Exec() {
jsSourceMapsDir.recreateDir()
}

private fun executeBundleCommand() {
private fun configureBundleCommand() {
workingDir(reactRoot)

@Suppress("SpreadOperator")
Expand All @@ -69,7 +69,5 @@ abstract class BundleJsAndAssetsTask : Exec() {
"--sourcemap-output",
jsSourceMapsFile,
*extraArgs.toTypedArray()))

super.exec()
}
}

0 comments on commit 24bf1c5

Please sign in to comment.