Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ MSBUILD_FLAGS += /p:AndroidApiLevel=$(API_LEVEL) /p:AndroidFrameworkVersion=$(wo
endif

all-tests::
MSBUILD="$(MSBUILD)" $(call MSBUILD_BINLOG,all-tests,tools/scripts/xabuild) $(MSBUILD_FLAGS) Xamarin.Android-Tests.sln
MSBUILD="$(MSBUILD)" $(call MSBUILD_BINLOG,all-tests,tools/scripts/xabuild) $(MSBUILD_FLAGS) Xamarin.Android-Tests.sln /restore

install::
@if [ ! -d "bin/$(CONFIGURATION)" ]; then \
Expand Down
2 changes: 1 addition & 1 deletion build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ stages:
displayName: xabuild Xamarin.Android-Tests
inputs:
filename: bin\$(XA.Build.Configuration)\bin\xabuild.exe
arguments: Xamarin.Android-Tests.sln /p:Configuration=$(XA.Build.Configuration) /bl:$(System.DefaultWorkingDirectory)\bin\Test$(XA.Build.Configuration)\msbuild-build-tests.binlog
arguments: Xamarin.Android-Tests.sln /p:Configuration=$(XA.Build.Configuration) /bl:$(System.DefaultWorkingDirectory)\bin\Test$(XA.Build.Configuration)\msbuild-build-tests.binlog /restore

- task: MSBuild@1
displayName: nunit Java.Interop Tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@ steps:
version: $(DotNetCoreVersion)

# Restore solutions for Xamarin.Android.Tools.sln, Xamarin.Android.sln, and Xamarin.Android-Tests.sln
- task: MSBuild@1
displayName: msbuild restore Xamarin.Android-Tests.sln
inputs:
solution: Xamarin.Android-Tests.sln
configuration: ${{ parameters.configuration }}
msbuildArguments: /t:Restore /bl:$(System.DefaultWorkingDirectory)/bin/Test${{ parameters.configuration }}/Xamarin.Android-Tests.restore.binlog

- task: NuGetCommand@2
displayName: nuget restore Xamarin.Android solutions
inputs:
restoreSolution: '**/Xamarin.Android*.sln'
restoreSolution: 'Xamarin.Android*.sln'
feedsToUse: config
nugetConfigPath: NuGet.config

Expand Down
2 changes: 1 addition & 1 deletion build-tools/timing/timing.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<DirectoryFullPath>$([System.IO.Path]::GetFullPath('$(_TopDir)tests\Xamarin.Forms-Performance-Integration'))</DirectoryFullPath>
<CSharpFile>$(_TopDir)tests\Xamarin.Forms-Performance-Integration\Droid\MainActivity.cs</CSharpFile>
<AndroidResourceFile>$(_TopDir)tests\Xamarin.Forms-Performance-Integration\Droid\Resources\values\styles.xml</AndroidResourceFile>
<Restore>$(_TopDir)tests\Xamarin.Forms-Performance-Integration\Xamarin.Forms.Performance.Integration.csproj</Restore>
<Restore>$(_TopDir)Xamarin.Android-Tests.sln</Restore>
</XACaptureBuildTimingProject>
</ItemGroup>
</Project>
5 changes: 2 additions & 3 deletions build-tools/timing/timing.targets
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,9 @@
Condition=" '%(XACaptureBuildTimingProject.Restore)' != '' "
Command="$(_TopDir).nuget\NuGet.exe restore &quot;%(XACaptureBuildTimingProject.Restore)&quot;"
/>
<MSBuild
<Exec
Condition=" '%(XACaptureBuildTimingProject.Restore)' != '' "
Projects="%(XACaptureBuildTimingProject.Restore)"
Targets="Restore"
Command="$(_XABuild) /bl:$(_OutputFile).restore.binlog &quot;%(XACaptureBuildTimingProject.Restore)&quot; /t:Restore"
/>
<Exec Command="$(_XABuild) /fl /flp:LogFile=$(_OutputFile).log &quot;/logger:$(_TimingLogger);ID=$(_ID);Description=$(_Description);Commit=$(XAVersionHash);OutputPath=$(_OutputFile).xml&quot; /p:Configuration=$(Configuration) /p:AndroidSupportedAbis=x86 %(XACaptureBuildTimingProject.Identity) /t:$(_Target)" />
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,7 @@ public void BuildHasNoWarnings (bool isRelease, bool xamarinForms, string packag
proj.IsRelease = isRelease;
using (var b = CreateApkBuilder (Path.Combine ("temp", TestName))) {
Assert.IsTrue (b.Build (proj), "Build should have succeeded.");
if (xamarinForms) {
// With Android API Level 29, we will get a warning: "... is only compatible with TargetFrameworkVersion: MonoAndroid,v9.0 (Android API Level 28)"
// We should allow a maximum of 1 warning to cover this case until the packages get updated to be compatible with Api level 29
Assert.IsTrue (StringAssertEx.ContainsText (b.LastBuildOutput, " 1 Warning(s)"), "Should have no more than 1 MSBuild warnings.");
} else {
Assert.IsTrue (StringAssertEx.ContainsText (b.LastBuildOutput, " 0 Warning(s)"), "Should have no MSBuild warnings.");
}
Assert.IsTrue (StringAssertEx.ContainsText (b.LastBuildOutput, " 0 Warning(s)"), "Should have no MSBuild warnings.");
Assert.IsFalse (StringAssertEx.ContainsText (b.LastBuildOutput, "Warning: end of file not at end of a line"),
"Should not get a warning from the <CompileNativeAssembly/> task.");
var lockFile = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, ".__lock");
Expand Down Expand Up @@ -353,7 +347,6 @@ public void SkipConvertResourcesCases ([Values (false, true)] bool useAapt2)
"Xamarin.Android.Support.Transition.dll",
"Xamarin.Android.Support.v7.AppCompat.dll",
"Xamarin.Android.Support.v7.CardView.dll",
"Xamarin.Android.Support.v7.MediaRouter.dll",
"Xamarin.Android.Support.v7.RecyclerView.dll",
"material-menu-1.1.0.aar",
};
Expand Down Expand Up @@ -2804,7 +2797,7 @@ public void BuildAfterUpgradingNuget ()

proj.PackageReferences.Clear ();
//NOTE: we can get all the other dependencies transitively, yay!
proj.PackageReferences.Add (KnownPackages.XamarinForms_4_0_0_425677);
proj.PackageReferences.Add (KnownPackages.XamarinForms_LatestStable);
b.Save (proj, doNotCleanupOnUpdate: true);
Assert.IsTrue (b.Build (proj), "second build should have succeeded.");
Assert.IsFalse (b.Output.IsTargetSkipped ("_CleanIntermediateIfNuGetsChange"), "`_CleanIntermediateIfNuGetsChange` should have run!");
Expand Down Expand Up @@ -2847,7 +2840,7 @@ public void CompileBeforeUpgradingNuGet ()

proj.PackageReferences.Clear ();
//NOTE: we can get all the other dependencies transitively, yay!
proj.PackageReferences.Add (KnownPackages.XamarinForms_4_0_0_425677);
proj.PackageReferences.Add (KnownPackages.XamarinForms_LatestStable);
Assert.IsTrue (b.Build (proj, saveProject: true, doNotCleanupOnUpdate: true), "second build should have succeeded.");
Assert.IsTrue (StringAssertEx.ContainsText (b.LastBuildOutput, "Refreshing Xamarin.Android.Support.v7.AppCompat.dll"), "`ResolveLibraryProjectImports` should not skip `Xamarin.Android.Support.v7.AppCompat.dll`!");
Assert.IsTrue (StringAssertEx.ContainsText (b.LastBuildOutput, "Deleting unknown jar: support-annotations.jar"), "`support-annotations.jar` should be deleted!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void IncrementalDesignTimeBuild ()
var resourcepathscache = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, "designtime", "libraryprojectimports.cache");
FileAssert.Exists (resourcepathscache);
var doc = XDocument.Load (resourcepathscache);
Assert.AreEqual (40, doc.Root.Element ("Jars").Elements ("Jar").Count (), "libraryprojectimports.cache did not contain expected jar files");
Assert.AreEqual (38, doc.Root.Element ("Jars").Elements ("Jar").Count (), "libraryprojectimports.cache did not contain expected jar files");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,6 @@ public static class KnownPackages
}
}
};
public static Package XamarinFormsPCL_2_3_4_231 = new Package {
Id = "Xamarin.Forms",
Version = "2.3.4.231",
TargetFramework = "portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10",
References = {
new BuildItem.Reference ("Xamarin.Forms.Core") {
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.2.3.4.231\\lib\\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\\Xamarin.Forms.Core.dll"
},
new BuildItem.Reference ("Xamarin.Forms.Xaml") {
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.2.3.4.231\\lib\\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\\Xamarin.Forms.Xaml.dll"
},
}
};
public static Package XamarinForms_2_3_4_231 = new Package {
Id = "Xamarin.Forms",
Version = "2.3.4.231",
Expand All @@ -186,38 +173,40 @@ public static class KnownPackages
},
}
};
public static Package XamarinForms_4_0_0_425677 = new Package {
public static Package XamarinForms_LatestStable => XamarinForms_4_3_0_991221;
public static Package XamarinForms_4_3_0_991221 = new Package {
Id = "Xamarin.Forms",
Version = "4.0.0.425677",
Version = "4.3.0.991221",
TargetFramework = "MonoAndroid90",
References = {
new BuildItem.Reference ("Xamarin.Forms.Platform.Android") {
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.4.0.0.425677\\lib\\MonoAndroid90\\Xamarin.Forms.Platform.Android.dll"
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.4.3.0.991221\\lib\\MonoAndroid90\\Xamarin.Forms.Platform.Android.dll"
},
new BuildItem.Reference ("FormsViewGroup") {
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.4.0.0.425677\\lib\\MonoAndroid90\\FormsViewGroup.dll"
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.4.3.0.991221\\lib\\MonoAndroid90\\FormsViewGroup.dll"
},
new BuildItem.Reference ("Xamarin.Forms.Core") {
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.4.0.0.425677\\lib\\MonoAndroid90\\Xamarin.Forms.Core.dll"
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.4.3.0.991221\\lib\\MonoAndroid90\\Xamarin.Forms.Core.dll"
},
new BuildItem.Reference ("Xamarin.Forms.Xaml") {
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.4.0.0.425677\\lib\\MonoAndroid90\\Xamarin.Forms.Xaml.dll"
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.4.3.0.991221\\lib\\MonoAndroid90\\Xamarin.Forms.Xaml.dll"
},
new BuildItem.Reference ("Xamarin.Forms.Platform") {
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.4.0.0.425677\\lib\\MonoAndroid90\\Xamarin.Forms.Platform.dll"
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.4.3.0.991221\\lib\\MonoAndroid90\\Xamarin.Forms.Platform.dll"
},
}
};
public static Package XamarinFormsMaps_4_0_0_425677 = new Package {
public static Package XamarinFormsMaps_LatestStable => XamarinFormsMaps_4_3_0_991221;
public static Package XamarinFormsMaps_4_3_0_991221 = new Package {
Id = "Xamarin.Forms.Maps",
Version = "4.0.0.425677",
Version = "4.3.0.991221",
TargetFramework = "MonoAndroid90",
References = {
new BuildItem.Reference ("Xamarin.Forms.Maps.Android") {
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.Maps.4.0.0.425677\\lib\\MonoAndroid90\\Xamarin.Forms.Maps.Android.dll"
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.Maps.4.3.0.991221\\lib\\MonoAndroid90\\Xamarin.Forms.Maps.Android.dll"
},
new BuildItem.Reference ("Xamarin.Forms.Maps") {
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.Maps.4.0.0.425677\\lib\\MonoAndroid90\\Xamarin.Forms.Maps.dll"
MetadataValues = "HintPath=..\\packages\\Xamarin.Forms.Maps.4.3.0.991221\\lib\\MonoAndroid90\\Xamarin.Forms.Maps.dll"
},
}
};
Expand Down Expand Up @@ -390,11 +379,11 @@ public static class KnownPackages
};
public static Package Android_Arch_Work_Runtime = new Package {
Id = "Xamarin.Android.Arch.Work.Runtime",
Version = "1.0.0",
Version = "1.0.0.3",
TargetFramework = "MonoAndroid90",
References = {
new BuildItem.Reference("Xamarin.Android.Arch.Work.Runtime") {
MetadataValues = "HintPath=..\\packages\\Xamarin.Android.Arch.Work.Runtime.1.0.0\\lib\\MonoAndroid90\\Xamarin.Android.Arch.Work.Runtime.dll"
MetadataValues = "HintPath=..\\packages\\Xamarin.Android.Arch.Work.Runtime.1.0.0.3\\lib\\MonoAndroid90\\Xamarin.Android.Arch.Work.Runtime.dll"
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public XamarinFormsAndroidApplicationProject (string debugConfigurationName = "D
: base (debugConfigurationName, releaseConfigurationName)
{
//NOTE: we can get all the other dependencies transitively, yay!
PackageReferences.Add (KnownPackages.XamarinForms_4_0_0_425677);
PackageReferences.Add (KnownPackages.XamarinForms_LatestStable);

AndroidResources.Add (new AndroidItem.AndroidResource ("Resources\\values\\colors.xml") {
TextContent = () => colors_xml,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static XamarinFormsMapsApplicationProject ()

public XamarinFormsMapsApplicationProject ()
{
PackageReferences.Add (KnownPackages.XamarinFormsMaps_4_0_0_425677);
PackageReferences.Add (KnownPackages.XamarinFormsMaps_LatestStable);
MainActivity = MainActivity.Replace ("//${AFTER_FORMS_INIT}", "Xamarin.FormsMaps.Init (this, savedInstanceState);");
//NOTE: API_KEY metadata just has to *exist*
AndroidManifest = AndroidManifest.Replace ("</application>", "<meta-data android:name=\"com.google.android.maps.v2.API_KEY\" android:value=\"\" /></application>");
Expand Down
2 changes: 1 addition & 1 deletion tests/MSBuildDeviceIntegration/Tests/PerformanceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void Build_XAML_Change (bool produceReferenceAssembly, bool install)
}
},
PackageReferences = {
KnownPackages.XamarinForms_4_0_0_425677
KnownPackages.XamarinForms_LatestStable
}
};
lib.SetProperty ("ProduceReferenceAssembly", produceReferenceAssembly.ToString ());
Expand Down
Loading