@@ -994,14 +994,14 @@ public void BuildMkBundleApplicationRelease ()
994994 "bundles" , "armeabi-v7a" , "libmonodroid_bundle_app.so" ) ;
995995 Assert . IsTrue ( File . Exists ( libapp ) , "libmonodroid_bundle_app.so does not exist" ) ;
996996 var apk = Path . Combine ( Root , b . ProjectDirectory ,
997- proj . IntermediateOutputPath , "android" , "bin" , "UnnamedProject.UnnamedProject .apk") ;
997+ proj . IntermediateOutputPath , "android" , "bin" , $ " { proj . PackageName } .apk") ;
998998 using ( var zipFile = ZipHelper . OpenZip ( apk ) ) {
999999 Assert . IsNotNull ( ZipHelper . ReadFileFromZip ( zipFile ,
10001000 "lib/armeabi-v7a/libmonodroid_bundle_app.so" ) ,
1001- "lib/armeabi-v7a/libmonodroid_bundle_app.so should be in the UnnamedProject.UnnamedProject .apk" ) ;
1001+ $ "lib/armeabi-v7a/libmonodroid_bundle_app.so should be in the { proj . PackageName } .apk") ;
10021002 Assert . IsNull ( ZipHelper . ReadFileFromZip ( zipFile ,
10031003 Path . Combine ( "assemblies" , "UnnamedProject.dll" ) ) ,
1004- "UnnamedProject.dll should not be in the UnnamedProject.UnnamedProject .apk" ) ;
1004+ $ "UnnamedProject.dll should not be in the { proj . PackageName } .apk") ;
10051005 }
10061006 }
10071007 }
@@ -1022,14 +1022,14 @@ public void BuildMkBundleApplicationReleaseAllAbi ()
10221022 "bundles" , abi , "libmonodroid_bundle_app.so" ) ;
10231023 Assert . IsTrue ( File . Exists ( libapp ) , abi + " libmonodroid_bundle_app.so does not exist" ) ;
10241024 var apk = Path . Combine ( Root , b . ProjectDirectory ,
1025- proj . IntermediateOutputPath , "android" , "bin" , "UnnamedProject.UnnamedProject .apk") ;
1025+ proj . IntermediateOutputPath , "android" , "bin" , $ " { proj . PackageName } .apk") ;
10261026 using ( var zipFile = ZipHelper . OpenZip ( apk ) ) {
10271027 Assert . IsNotNull ( ZipHelper . ReadFileFromZip ( zipFile ,
10281028 "lib/" + abi + "/libmonodroid_bundle_app.so" ) ,
1029- "lib/{0}/libmonodroid_bundle_app.so should be in the UnnamedProject.UnnamedProject .apk" , abi ) ;
1029+ $ "lib/{ 0 } /libmonodroid_bundle_app.so should be in the { proj . PackageName } .apk", abi ) ;
10301030 Assert . IsNull ( ZipHelper . ReadFileFromZip ( zipFile ,
10311031 Path . Combine ( "assemblies" , "UnnamedProject.dll" ) ) ,
1032- "UnnamedProject.dll should not be in the UnnamedProject.UnnamedProject .apk" ) ;
1032+ $ "UnnamedProject.dll should not be in the { proj . PackageName } .apk") ;
10331033 }
10341034 }
10351035 }
@@ -1170,7 +1170,7 @@ public void BuildAfterMultiDexIsNotRequired ([Values ("dx", "d8")] string dexToo
11701170 using ( var b = CreateApkBuilder ( ) ) {
11711171 string intermediateDir = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath ) ;
11721172 string androidBinDir = Path . Combine ( intermediateDir , "android" , "bin" ) ;
1173- string apkPath = Path . Combine ( androidBinDir , "UnnamedProject.UnnamedProject .apk") ;
1173+ string apkPath = Path . Combine ( androidBinDir , $ " { proj . PackageName } .apk") ;
11741174
11751175 Assert . IsTrue ( b . Build ( proj ) , "Build should have succeeded." ) ;
11761176 FileAssert . Exists ( Path . Combine ( androidBinDir , "classes.dex" ) ) ;
@@ -1902,7 +1902,7 @@ public void CheckWhichRuntimeIsIncluded (string supportedAbi, bool debugSymbols,
19021902 var runtimeInfo = b . GetSupportedRuntimes ( ) ;
19031903 Assert . IsTrue ( b . Build ( proj ) , "Build should have succeeded." ) ;
19041904 var apkPath = Path . Combine ( Root , b . ProjectDirectory ,
1905- proj . IntermediateOutputPath , "android" , "bin" , "UnnamedProject.UnnamedProject .apk") ;
1905+ proj . IntermediateOutputPath , "android" , "bin" , $ " { proj . PackageName } .apk") ;
19061906 using ( var apk = ZipHelper . OpenZip ( apkPath ) ) {
19071907 var runtime = runtimeInfo . FirstOrDefault ( x => x . Abi == supportedAbi && x . Runtime == expectedRuntime ) ;
19081908 Assert . IsNotNull ( runtime , "Could not find the expected runtime." ) ;
@@ -1946,13 +1946,13 @@ public void CheckSequencePointGeneration (bool isRelease, bool monoSymbolArchive
19461946 Assert . Ignore ( "Cross compiler was not available" ) ;
19471947 Assert . IsTrue ( b . Build ( proj ) , "Build should have succeeded." ) ;
19481948 var apk = Path . Combine ( Root , b . ProjectDirectory ,
1949- proj . IntermediateOutputPath , "android" , "bin" , "UnnamedProject.UnnamedProject .apk") ;
1949+ proj . IntermediateOutputPath , "android" , "bin" , $ " { proj . PackageName } .apk") ;
19501950 var msymarchive = Path . Combine ( Root , b . ProjectDirectory , proj . OutputPath , proj . PackageName + ".apk.mSYM" ) ;
19511951 using ( var zipFile = ZipHelper . OpenZip ( apk ) ) {
19521952 var mdbExits = ZipHelper . ReadFileFromZip ( zipFile , "assemblies/UnnamedProject.dll.mdb" ) != null ||
19531953 ZipHelper . ReadFileFromZip ( zipFile , "assemblies/UnnamedProject.pdb" ) != null ;
19541954 Assert . AreEqual ( embedMdb , mdbExits ,
1955- "assemblies/UnnamedProject.dll.mdb or assemblies/UnnamedProject.pdb should{0}be in the UnnamedProject.UnnamedProject .apk" , embedMdb ? " " : " not " ) ;
1955+ $ "assemblies/UnnamedProject.dll.mdb or assemblies/UnnamedProject.pdb should{ 0 } be in the { proj . PackageName } .apk", embedMdb ? " " : " not " ) ;
19561956 if ( aotAssemblies ) {
19571957 foreach ( var abi in abis ) {
19581958 var assemblies = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath ,
@@ -1971,10 +1971,10 @@ public void CheckSequencePointGeneration (bool isRelease, bool monoSymbolArchive
19711971 Assert . IsTrue ( File . Exists ( assemblies ) , "{0} libaot-UnnamedProject.dll.so does not exist" , abi ) ;
19721972 Assert . IsNotNull ( ZipHelper . ReadFileFromZip ( zipFile ,
19731973 string . Format ( "lib/{0}/libaot-UnnamedProject.dll.so" , abi ) ) ,
1974- "lib/{0}/libaot-UnnamedProject.dll.so should be in the UnnamedProject.UnnamedProject .apk" , abi ) ;
1974+ $ "lib/{ 0 } /libaot-UnnamedProject.dll.so should be in the { proj . PackageName } .apk", abi ) ;
19751975 Assert . IsNotNull ( ZipHelper . ReadFileFromZip ( zipFile ,
19761976 "assemblies/UnnamedProject.dll" ) ,
1977- "UnnamedProject.dll should be in the UnnamedProject.UnnamedProject .apk" ) ;
1977+ $ "UnnamedProject.dll should be in the { proj . PackageName } .apk") ;
19781978 }
19791979 }
19801980 var runtimeInfo = b . GetSupportedRuntimes ( ) ;
@@ -2062,7 +2062,7 @@ public void BuildWithNativeLibraries ([Values (true, false)] bool isRelease)
20622062 using ( var builder = CreateApkBuilder ( Path . Combine ( path , proj . ProjectName ) ) ) {
20632063 Assert . IsTrue ( builder . Build ( proj ) , "Build should have succeeded." ) ;
20642064 var apk = Path . Combine ( Root , builder . ProjectDirectory ,
2065- proj . IntermediateOutputPath , "android" , "bin" , "UnnamedProject.UnnamedProject .apk") ;
2065+ proj . IntermediateOutputPath , "android" , "bin" , $ " { proj . PackageName } .apk") ;
20662066 Assert . IsTrue ( StringAssertEx . ContainsText ( builder . LastBuildOutput , "warning XA4301: APK already contains the item lib/armeabi-v7a/libRSSupport.so; ignoring." ) ,
20672067 "warning about skipping libRSSupport.so should have been raised" ) ;
20682068 using ( var zipFile = ZipHelper . OpenZip ( apk ) ) {
@@ -2259,7 +2259,7 @@ public void ApplicationIdPlaceholder ()
22592259 var manifest = XDocument . Load ( Path . Combine ( Root , builder . ProjectDirectory , "obj" , "Debug" , "android" , "AndroidManifest.xml" ) ) ;
22602260 var namespaceResolver = new XmlNamespaceManager ( new NameTable ( ) ) ;
22612261 namespaceResolver . AddNamespace ( "android" , "http://schemas.android.com/apk/res/android" ) ;
2262- var element = manifest . XPathSelectElement ( "/manifest/application/provider[@android:name='UnnamedProject.UnnamedProject ']" , namespaceResolver ) ;
2262+ var element = manifest . XPathSelectElement ( $ "/manifest/application/provider[@android:name='{ proj . PackageName } ']", namespaceResolver ) ;
22632263 Assert . IsNotNull ( element , "placeholder not replaced" ) ;
22642264 }
22652265 }
@@ -2279,7 +2279,7 @@ public void ExtraAaptManifest ()
22792279 builder . Target = "Build" ;
22802280 Assert . IsTrue ( builder . Build ( proj ) , "Build should have succeeded." ) ;
22812281 var manifest = File . ReadAllText ( Path . Combine ( Root , builder . ProjectDirectory , "obj" , "Debug" , "android" , "AndroidManifest.xml" ) ) ;
2282- Assert . IsTrue ( manifest . Contains ( "android:authorities=\" UnnamedProject.UnnamedProject .crashlyticsinitprovider\" " ) , "placeholder not replaced" ) ;
2282+ Assert . IsTrue ( manifest . Contains ( $ "android:authorities=\" { proj . PackageName } .crashlyticsinitprovider\" ") , "placeholder not replaced" ) ;
22832283 Assert . IsFalse ( manifest . Contains ( "dollar_openBracket_applicationId_closeBracket" ) , "`aapt/AndroidManifest.xml` not ignored" ) ;
22842284 }
22852285 }
@@ -2577,7 +2577,7 @@ public void BuildReleaseApplicationWithNugetPackages ()
25772577 StringAssert . Contains ( "Xamarin.Android.Support.v4" , assets ,
25782578 "Nuget Package Xamarin.Android.Support.v4.21.0.3.0 should have been restored." ) ;
25792579 var src = Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "android" , "src" ) ;
2580- var main_r_java = Path . Combine ( src , "unnamedproject" , "unnamedproject" , "R.java" ) ;
2580+ var main_r_java = Path . Combine ( src , proj . PackageNameJavaIntermediatePath , "R.java" ) ;
25812581 FileAssert . Exists ( main_r_java ) ;
25822582 var lib_r_java = Path . Combine ( src , "android" , "support" , "compat" , "R.java" ) ;
25832583 FileAssert . Exists ( lib_r_java ) ;
@@ -2815,7 +2815,7 @@ public void BuildBasicApplicationCheckPdb ()
28152815 File . Exists ( Path . Combine ( Root , b . ProjectDirectory , proj . IntermediateOutputPath , "android" , "assets" , "NetStandard16.pdb" ) ) ,
28162816 "NetStandard16.pdb must be copied to Intermediate directory" ) ;
28172817 var apk = Path . Combine ( Root , b . ProjectDirectory ,
2818- proj . IntermediateOutputPath , "android" , "bin" , "UnnamedProject.UnnamedProject .apk") ;
2818+ proj . IntermediateOutputPath , "android" , "bin" , $ " { proj . PackageName } .apk") ;
28192819 using ( var zipFile = ZipHelper . OpenZip ( apk ) ) {
28202820 Assert . IsNotNull ( ZipHelper . ReadFileFromZip ( zipFile ,
28212821 "assemblies/NetStandard16.pdb" ) ,
@@ -3962,7 +3962,7 @@ public void KotlinServiceLoader ([Values ("apk", "aab")] string packageFormat)
39623962 using ( var b = CreateApkBuilder ( ) ) {
39633963 Assert . IsTrue ( b . Build ( proj ) , "build should have succeeded." ) ;
39643964 var archive = Path . Combine ( Root , b . ProjectDirectory ,
3965- proj . IntermediateOutputPath , "android" , "bin" , $ "UnnamedProject.UnnamedProject .{ packageFormat } ") ;
3965+ proj . IntermediateOutputPath , "android" , "bin" , $ "{ proj . PackageName } .{ packageFormat } ") ;
39663966 var prefix = packageFormat == "apk" ? "" : "base/root/" ;
39673967 var expectedFiles = new [ ] {
39683968 prefix + "META-INF/maven/com.google.code.gson/gson/pom.xml" ,
0 commit comments