Skip to content
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
Original file line numberDiff line numberDiff line change
Expand Up@@ -89,7 +89,7 @@ abstract class BundleHermesCTask : DefaultTask() {
runCommand(bundleCommand)

if (hermesEnabled.get()) {
val detectedHermesCommand = detectOSAwareHermesCommand(root.get().asFile, hermesCommand.get())
val detectedHermesCommand = File(detectOSAwareHermesCommand(root.get().asFile, hermesCommand.get())).relativeTo(root.get().asFile).path
val bytecodeFile = File("${bundleFile}.hbc")
val outputSourceMap = resolveOutputSourceMap(bundleAssetFilename)
val compilerSourceMap = resolveCompilerSourceMap(bundleAssetFilename)
Expand DownExpand Up@@ -136,24 +136,24 @@ abstract class BundleHermesCTask : DefaultTask() {
windowsAwareCommandLine(
buildList {
addAll(nodeExecutableAndArgs.get())
add(cliFile.get().asFile.absolutePath)
add(cliFile.get().asFile.relativeTo(root.get().asFile).path)
add(bundleCommand.get())
add("--platform")
add("android")
add("--dev")
add(devEnabled.get().toString())
add("--reset-cache")
add("--entry-file")
add(entryFile.get().asFile.toString())
add(entryFile.get().asFile.relativeTo(root.get().asFile).path)
add("--bundle-output")
add(bundleFile.toString())
add(bundleFile.relativeTo(root.get().asFile).path)
add("--assets-dest")
add(resourcesDir.get().asFile.toString())
add(resourcesDir.get().asFile.relativeTo(root.get().asFile).path)
add("--sourcemap-output")
add(sourceMapFile.toString())
add(sourceMapFile.relativeTo(root.get().asFile).path)
if (bundleConfig.isPresent) {
add("--config")
add(bundleConfig.get().asFile.absolutePath)
add(bundleConfig.get().asFile.relativeTo(root.get().asFile).path)
}
add("--minify")
add(minifyEnabled.get().toString())
Expand All@@ -170,8 +170,8 @@ abstract class BundleHermesCTask : DefaultTask() {
hermesCommand,
"-emit-binary",
"-out",
bytecodeFile.absolutePath,
bundleFile.absolutePath,
bytecodeFile.relativeTo(root.get().asFile).path,
bundleFile.relativeTo(root.get().asFile).path,
*hermesFlags.get().toTypedArray())

internal fun getComposeSourceMapsCommand(
Expand All@@ -182,9 +182,9 @@ abstract class BundleHermesCTask : DefaultTask() {
): List<Any> =
windowsAwareCommandLine(
*nodeExecutableAndArgs.get().toTypedArray(),
composeScript.absolutePath,
packagerSourceMap.toString(),
compilerSourceMap.toString(),
composeScript.relativeTo(root.get().asFile).path,
packagerSourceMap.relativeTo(root.get().asFile).path,
compilerSourceMap.relativeTo(root.get().asFile).path,
"-o",
outputSourceMap.toString())
outputSourceMap.relativeTo(root.get().asFile).path)
}