File tree Expand file tree Collapse file tree
src/Xamarin.Android.Build.Tasks
Tests/Xamarin.Android.Build.Tests/Tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,16 +163,12 @@ protected virtual string CreateResponseFile ()
163163 }
164164
165165 /// <summary>
166- /// Writes a single argument to the response file, quoting if necessary for paths with spaces.
166+ /// Writes a single argument to the response file.
167+ /// R8/D8 response files treat each line as a complete argument, so no quoting is needed.
167168 /// </summary>
168169 protected void WriteArg ( StreamWriter writer , string arg )
169170 {
170- // Quote paths that contain spaces
171- if ( arg . Contains ( " " ) ) {
172- writer . WriteLine ( $ "\" { arg } \" ") ;
173- } else {
174- writer . WriteLine ( arg ) ;
175- }
171+ writer . WriteLine ( arg ) ;
176172 Log . LogDebugMessage ( $ " { arg } ") ;
177173 }
178174
Original file line number Diff line number Diff line change @@ -96,10 +96,11 @@ public void ResponseFileContainsLibAndInputJars ()
9696 }
9797
9898 /// <summary>
99- /// Tests that paths with spaces are quoted in the response file.
99+ /// Tests that paths with spaces are written correctly to the response file.
100+ /// R8/D8 response files treat each line as a complete argument, so no quoting is needed.
100101 /// </summary>
101102 [ Test ]
102- public void ResponseFileQuotesPathsWithSpaces ( )
103+ public void ResponseFileHandlesPathsWithSpaces ( )
103104 {
104105 var pathWithSpaces = Path . Combine ( tempDir , "path with spaces" ) ;
105106 Directory . CreateDirectory ( pathWithSpaces ) ;
@@ -127,8 +128,8 @@ public void ResponseFileQuotesPathsWithSpaces ()
127128 FileAssert . Exists ( responseFilePath , "Response file should exist" ) ;
128129 string responseFileContent = File . ReadAllText ( responseFilePath ) ;
129130
130- // Paths with spaces should be quoted
131- Assert . IsTrue ( responseFileContent . Contains ( "\" " ) , "Response file should contain quoted paths" ) ;
131+ // Paths with spaces should NOT be quoted (R8/D8 treats each line as a complete argument)
132+ Assert . IsFalse ( responseFileContent . Contains ( "\" " ) , "Response file should not contain quoted paths" ) ;
132133 Assert . IsTrue ( responseFileContent . Contains ( "path with spaces" ) , "Response file should contain the path with spaces" ) ;
133134
134135 } finally {
You can’t perform that action at this time.
0 commit comments