mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Added two new configurations to the BCL project to enable copying of the generated files to the testing projects.
This commit is contained in:
37
BCL.csproj
37
BCL.csproj
@@ -32,6 +32,20 @@
|
||||
<PropertyGroup>
|
||||
<GenerateResourceNeverLockTypeAssemblies>true</GenerateResourceNeverLockTypeAssemblies>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'iOS_Deploy'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Android_Deploy'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<ProjectExtensions>
|
||||
@@ -134,6 +148,9 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Readme.md" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Deploy\xCode\" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'iOS'">
|
||||
<TypeScriptModuleKind>commonjs</TypeScriptModuleKind>
|
||||
<TypeScriptRemoveComments>True</TypeScriptRemoveComments>
|
||||
@@ -149,9 +166,27 @@
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||
<TypeScriptSourceMap>True</TypeScriptSourceMap>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'iOS_Deploy'">
|
||||
<TypeScriptModuleKind>commonjs</TypeScriptModuleKind>
|
||||
<TypeScriptRemoveComments>True</TypeScriptRemoveComments>
|
||||
<TypeScriptSourceMap>True</TypeScriptSourceMap>
|
||||
<TypeScriptTarget>ES5</TypeScriptTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Android_Deploy'">
|
||||
<TypeScriptModuleKind>commonjs</TypeScriptModuleKind>
|
||||
<TypeScriptRemoveComments>True</TypeScriptRemoveComments>
|
||||
<TypeScriptSourceMap>True</TypeScriptSourceMap>
|
||||
<TypeScriptTarget>ES5</TypeScriptTarget>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\TypeScript\Microsoft.TypeScript.targets" Condition="Exists('$(VSToolsPath)\TypeScript\Microsoft.TypeScript.targets')" />
|
||||
<!--
|
||||
Custom build tasks
|
||||
-->
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'iOS_Deploy'">
|
||||
<JSConfig>Deploy\xCode\Configuration.xml</JSConfig>
|
||||
</PropertyGroup>
|
||||
<UsingTask TaskName="BuildTasks.CopyForPlatformBuildTask" AssemblyFile="../../Build/lib/BuildTasks.dll" />
|
||||
<Target Name="AfterBuild">
|
||||
<CopyForPlatformBuildTask Condition=" '$(Configuration)' == 'Android' or '$(Configuration)' == 'iOS' " TargetPlatform="$(Configuration)" Platforms="iOS;Android" InputFiles="@(GeneratedJavascript)" DestinationFolder="$(OutputPath)\$(Configuration)\" />
|
||||
<CopyForPlatformBuildTask TargetPlatform="$(Configuration)" Platforms="iOS;Android" InputFiles="@(GeneratedJavascript)" DestinationFolder="$(OutputPath)\$(Configuration)\" JSConfigFile="$(JSConfig)" />
|
||||
</Target>
|
||||
</Project>
|
||||
6
BCL.sln
6
BCL.sln
@@ -7,12 +7,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BCL", "BCL.csproj", "{2313F
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Android_Deploy|Any CPU = Android_Deploy|Any CPU
|
||||
Android|Any CPU = Android|Any CPU
|
||||
iOS_Deploy|Any CPU = iOS_Deploy|Any CPU
|
||||
iOS|Any CPU = iOS|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2313F1BF-1F2D-4F11-806A-87927FA6A7C0}.Android_Deploy|Any CPU.ActiveCfg = Android_Deploy|Any CPU
|
||||
{2313F1BF-1F2D-4F11-806A-87927FA6A7C0}.Android_Deploy|Any CPU.Build.0 = Android_Deploy|Any CPU
|
||||
{2313F1BF-1F2D-4F11-806A-87927FA6A7C0}.Android|Any CPU.ActiveCfg = Android|Any CPU
|
||||
{2313F1BF-1F2D-4F11-806A-87927FA6A7C0}.Android|Any CPU.Build.0 = Android|Any CPU
|
||||
{2313F1BF-1F2D-4F11-806A-87927FA6A7C0}.iOS_Deploy|Any CPU.ActiveCfg = iOS_Deploy|Any CPU
|
||||
{2313F1BF-1F2D-4F11-806A-87927FA6A7C0}.iOS_Deploy|Any CPU.Build.0 = iOS_Deploy|Any CPU
|
||||
{2313F1BF-1F2D-4F11-806A-87927FA6A7C0}.iOS|Any CPU.ActiveCfg = iOS|Any CPU
|
||||
{2313F1BF-1F2D-4F11-806A-87927FA6A7C0}.iOS|Any CPU.Build.0 = iOS|Any CPU
|
||||
EndGlobalSection
|
||||
|
||||
27
Readme.md
27
Readme.md
@@ -1,9 +1,12 @@
|
||||
Steps to build the BCL solution:
|
||||
|
||||
The BCL solution relies on a custom build task used to filter and rename the compiled javascript files by platform.
|
||||
E.g. the file `application.android.js`, containing the actual platform-specific implementation will become `application.js`
|
||||
E.g. the file `application.android.js`, containing the actual platform-specific implementation will become `application.js`.
|
||||
The BCL itself uses a pre-built copy of the task, residing in the `Build/lib` folder.
|
||||
|
||||
### Build the BuildTasks solution
|
||||
### BuildTasks solution
|
||||
|
||||
In case you want to change the custom build task you will need to rebuild the solution and copy the newly generated assembly to the `Build/lib` folder.
|
||||
|
||||
[BuildTasks](https://github.com/telerik/xPlatCore/tree/master/Build/Tasks)
|
||||
|
||||
@@ -11,8 +14,24 @@ The output of this project is located at (../bin/)
|
||||
|
||||
### Build the BCL project
|
||||
|
||||
There are two build configurations - iOS and Android. Depending on the configuration, the custom build task will prepare the `bin/iOS` and `bin/Android` folders
|
||||
where the files only needed for the specified platform will be copied.
|
||||
There are four different configurations of the project:
|
||||
|
||||
1. Android <br/>
|
||||
This configuration will create a `bin/Android` folder and output all the Android-related files there.
|
||||
2. iOS <br/>
|
||||
This configuration will create a `bin/iOS` folder and output all the iOS-related files there.
|
||||
3. Android_Deploy <br/>
|
||||
[Still working on]
|
||||
4. iOS_Deploy <br/>
|
||||
Same as the iOS configuration plus the generated javascript is copied to the JS folder in the testing xCode project.
|
||||
The path to the project is taken from the `BCL/Deploy/xCode/Configuration.xml` file. The expected XML structure is:
|
||||
```
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<JSFolder>
|
||||
<Path>Z:\Kimera\JDBridgeApp\JDBridgeApp\js</Path>
|
||||
</JSFolder>
|
||||
```
|
||||
In order to use this path you will need to map a shared MAC's folder and access it from your PC.
|
||||
|
||||
### Useful links
|
||||
|
||||
|
||||
Reference in New Issue
Block a user