Skip to content

Commit

Permalink
ci: Adjust TS Interop tests, bump bootstrapper, local wasm build
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Oct 5, 2022
1 parent 9d462d3 commit 8cdd789
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<PackageReference Update="Uno.Core.Extensions.Disposables" Version="4.0.1" />
<PackageReference Update="Uno.Core.Extensions.Compatibility" Version="4.0.1" />
<PackageReference Update="Uno.Diagnostics.Eventing" Version="2.0.1" />
<PackageReference Update="Uno.Wasm.Bootstrap" Version="7.0.0-dev.159" />
<PackageReference Update="Uno.Wasm.Bootstrap.DevServer" Version="7.0.0-dev.159" />
<PackageReference Update="Uno.Wasm.Bootstrap" Version="7.0.0-dev.180" />
<PackageReference Update="Uno.Wasm.Bootstrap.DevServer" Version="7.0.0-dev.180" />
<PackageReference Update="xamarin.build.download" Version="0.11.3" PrivateAssets="all" />
<PackageReference Update="MSTest.TestAdapter" Version="2.2.10" />
<PackageReference Update="MSTest.TestFramework" Version="2.2.8" />
Expand Down
2 changes: 1 addition & 1 deletion src/SamplesApp/SamplesApp.Wasm/SamplesApp.Wasm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(MSBuildRuntimeType)'=='Core' or '$(IsRunningInsideVisualStudio)'=='true'">
<PropertyGroup Condition="'$(MSBuildRuntimeType)'=='Core' or '$(BuildingInsideVisualStudio)'=='true'">
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Uno.UI.Wasm.Tests/Tests/TSBindingsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public void When_ArrayOfNullStrings()
#if NET7_0_OR_GREATER
partial class TestImport
{
[JSImport("globalThis.TSBindingsTests.When_SingleStringNet7")]
[JSImport("globalThis.When_SingleStringNet7")]
internal static partial string When_SingleStringNet7(string value);
}
#endif
Expand Down
11 changes: 9 additions & 2 deletions src/Uno.UI.Wasm.Tests/Uno.UI.Wasm.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
</ItemGroup>

<PropertyGroup>
<UnoUIMSBuildTasksPath>$(MSBuildThisFileDirectory)..\SourceGenerators\Uno.UI.Tasks\bin\$(Configuration)_Shadow</UnoUIMSBuildTasksPath>
<CompileTypeScriptDependsOn>CoreCompile;_UnoSetupTSCompilation; $(CompileTypeScriptDependsOn)</CompileTypeScriptDependsOn>
</PropertyGroup>

Expand All @@ -72,13 +73,19 @@
<MakeDir Directories="$(IntermediateOutputPath)/javascript" />
</Target>

<Target Name="_UnoSetupTSCompilationUpdateEmbeddedResources" AfterTargets="CompileTypeScript">
<Target Name="_UnoSetupTSCompilationUpdateEmbeddedResources"
Condition="'$(BuildingProject)' != 'false' and '$(DesignTimeBuild)' != 'true'"
BeforeTargets="_UnoEmbeddedResourcesInjection">
<ItemGroup>
<_generatedTSFiles Include="$(IntermediateOutputPath)/javascript/*.js" />
<EmbeddedResource Include="@(_generatedTSFiles)" LogicalName="$(RootNamespace)WasmScripts.%(FileName)%(Extension)" />
<EmbeddedResource Include="@(_generatedTSFiles)" LogicalName="$(RootNamespace).WasmScripts.%(FileName)%(Extension)" />
</ItemGroup>
</Target>

<ItemGroup>
<_UnoEmbeddedResourcesInjectionAfterTargets Include="CompileTypeScriptWithTSConfig" />
</ItemGroup>

<Import Project="..\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" Condition="'$(SkipUnoResourceGeneration)' == '' " />
<Import Project="..\SourceGenerators\Uno.UI.SourceGenerators\Content\Uno.UI.SourceGenerators.props" />
</Project>
1 change: 1 addition & 0 deletions src/Uno.UI.Wasm.Tests/ts/TSBindingsTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

MonoSupport.jsCallDispatcher.registerScope("TSBindingsUnitTests", new TSBindingsTests());

(<any>globalThis).When_SingleStringNet7 = TSBindingsTests.When_SingleStringNet7
});

class TSBindingsTests {
Expand Down

0 comments on commit 8cdd789

Please sign in to comment.