@@ -126,9 +126,11 @@ def _print_brewing(self, action, item):
126126 """print a brew-style action message"""
127127 print (f"{ Colors .CYAN } ==> { Colors .BOLD } { action } { Colors .END } { item } " )
128128
129- def _print_copying (self , source_name , target_name ):
130- """print a copying message with hourglass"""
131- print (f"{ Colors .YELLOW } ⏳ { Colors .BOLD } Copying{ Colors .END } { source_name } → { target_name } " )
129+ def _print_copying (self , source_path , target_path ):
130+ """print a copying message with hourglass showing full paths"""
131+ print (f"{ Colors .YELLOW } ⏳ { Colors .BOLD } Copying{ Colors .END } " )
132+ print (f" From: { Colors .BLUE } { source_path } { Colors .END } " )
133+ print (f" To: { Colors .BLUE } { target_path } { Colors .END } " )
132134
133135 def _print_success (self , message ):
134136 """print a success message with green formatting"""
@@ -258,16 +260,16 @@ def build_android_target(self, target):
258260 test_project_path = self .sdk_path / "tests" / target
259261
260262 if target == "test-library" :
261- # use the custom Gradle task for test-library
263+ # use assembleDebug and get JAR from AAR structure (like Cordova script)
262264 success = self .run_gradle_command (
263265 test_project_path ,
264- ["adjustTestLibraryJarDebug " ]
266+ ["clean" , "assembleDebug " ]
265267 )
266268 if not success :
267269 return False
268270
269- # check if the JAR was created
270- jar_path = test_project_path / "build" / "libs " / "test-library- debug.jar"
271+ # check if the JAR was created in AAR structure
272+ jar_path = test_project_path / "build" / "intermediates " / "aar_main_jar" / " debug" / "syncDebugLibJars" / "classes .jar"
271273 if not jar_path .exists ():
272274 self ._print_error (f"JAR not found at expected location: { jar_path } " )
273275 return False
@@ -279,7 +281,7 @@ def build_android_target(self, target):
279281 # build the test-options project
280282 success = self .run_gradle_command (
281283 test_project_path ,
282- ["assembleDebug" ]
284+ ["clean" , " assembleDebug" ]
283285 )
284286 if not success :
285287 return False
@@ -357,7 +359,7 @@ def copy_framework(self, source_framework_path, target_name):
357359 self ._print_progress (f"Removing existing framework: { target_name } " )
358360 shutil .rmtree (target_path )
359361
360- self ._print_copying (source_framework_path . name , target_name )
362+ self ._print_copying (source_framework_path , target_path )
361363 shutil .copytree (source_framework_path , target_path )
362364 self ._print_success (f"Copied { target_name } " )
363365 return True
@@ -370,7 +372,7 @@ def copy_jar(self, source_jar_path, target_name):
370372 target_path = self .test_libs_path / target_name
371373
372374 try :
373- self ._print_copying (source_jar_path . name , target_name )
375+ self ._print_copying (source_jar_path , target_path )
374376 shutil .copy2 (source_jar_path , target_path )
375377 self ._print_success (f"Copied { target_name } " )
376378 return True
0 commit comments