@@ -108,15 +108,20 @@ action("gen_android_build_config_java") {
108108 ]
109109}
110110
111- flutter_jar_path = " $root_out_dir /flutter_java.jar"
112- flutter_source_jar_path = " $root_out_dir /flutter_java.srcjar"
111+ embedding_artifact_id = " flutter_embedding_$flutter_runtime_mode "
112+ embedding_jar_filename = " $embedding_artifact_id -1.0.0-$engine_version .jar"
113+ embedding_jar_path = " $root_out_dir /$embedding_jar_filename "
114+
115+ embedding_sources_jar_filename =
116+ " $embedding_artifact_id -1.0.0-$engine_version -sources.jar"
117+ embedding_source_jar_path = " $root_out_dir /$embedding_sources_jar_filename "
113118
114119action (" flutter_shell_java" ) {
115120 script = " //build/android/gyp/javac.py"
116121 depfile = " $target_gen_dir /$target_name .d"
117122
118- jar_path = flutter_jar_path
119- source_jar_path = flutter_source_jar_path
123+ jar_path = embedding_jar_path
124+ source_jar_path = embedding_source_jar_path
120125
121126 sources = [
122127 " io/flutter/Log.java" ,
@@ -303,22 +308,28 @@ action("android") {
303308 script = " //build/android/gyp/create_flutter_jar.py"
304309
305310 inputs = [
306- " $root_build_dir /flutter_java.jar " ,
311+ " $root_build_dir /$embedding_jar_filename " ,
307312 " $root_build_dir /lib.stripped/libflutter.so" ,
308313 ]
309314
315+ engine_artifact_id =
316+ string_replace (android_app_abi , " -" , " _" ) + " _" + flutter_runtime_mode
317+
318+ engine_jar_filename =
319+ " $root_build_dir /$engine_artifact_id -1.0.0-$engine_version .jar"
320+
310321 outputs = [
311322 " $root_build_dir /flutter.jar" ,
312- " $root_build_dir /flutter_engine.jar " ,
323+ " $root_build_dir /$engine_jar_filename " ,
313324 ]
314325
315326 args = [
316327 " --output" ,
317328 rebase_path (" flutter.jar" , root_build_dir , root_build_dir ),
318329 " --output_native_jar" ,
319- rebase_path (" flutter_engine.jar " , root_build_dir , root_build_dir ),
330+ rebase_path (engine_jar_filename , root_build_dir , root_build_dir ),
320331 " --dist_jar" ,
321- rebase_path (" flutter_java.jar " , root_build_dir , root_build_dir ),
332+ rebase_path (embedding_jar_filename , root_build_dir , root_build_dir ),
322333 " --native_lib" ,
323334 rebase_path (" lib.stripped/libflutter.so" , root_build_dir , root_build_dir ),
324335 " --android_abi" ,
@@ -408,7 +419,7 @@ action("robolectric_tests") {
408419
409420 _jar_dependencies = [
410421 android_sdk_jar ,
411- flutter_jar_path ,
422+ embedding_jar_path ,
412423 " //third_party/robolectric/lib/junit-3.8.jar" ,
413424 " //third_party/robolectric/lib/junit-4.13-beta-3.jar" ,
414425 " //third_party/robolectric/lib/robolectric-3.8.jar" ,
0 commit comments