Skip to content

Commit 327be3c

Browse files
authored
Move processing of flutter jars to gn. (flutter#33124)
1 parent 912da8d commit 327be3c

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

shell/platform/android/BUILD.gn

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,3 +652,35 @@ action("embedding_jars") {
652652
}
653653
}
654654
}
655+
656+
# Renames android artifacts and places them in the final
657+
# expected folder structure.
658+
action("abi_jars") {
659+
script = "//flutter/build/android_artifacts.py"
660+
deps = [
661+
":android_jar",
662+
":pom_libflutter",
663+
]
664+
665+
artifact_id =
666+
string_replace(android_app_abi, "-", "_") + "_" + flutter_runtime_mode
667+
sources = [
668+
"$root_out_dir/${artifact_id}.jar",
669+
"$root_out_dir/${artifact_id}.pom",
670+
]
671+
outputs = []
672+
args = []
673+
base_name = "$root_out_dir/zip_archives/flutter_download_io/" +
674+
"${artifact_id}/1.0.0-$engine_version/" +
675+
"${artifact_id}-1.0.0-${engine_version}"
676+
foreach(source, sources) {
677+
extension = get_path_info(source, "extension")
678+
name = get_path_info(source, "name")
679+
outputs += [ "${base_name}.${extension}" ]
680+
args += [
681+
"-i",
682+
rebase_path(source),
683+
rebase_path("${base_name}.${extension}"),
684+
]
685+
}
686+
}

0 commit comments

Comments
 (0)