Skip to content
Merged
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ Overridable MSBuild properties include:
[`java-interop`](src/java-interop) against. By default this is
probed for from numerious locations within
[`build-tools/scripts/jdk.mk`](build-tools/scripts/jdk.mk).
* `$(JavaCPath)`: Path to the `javac` command-line tool, by default set to `javac`.
* `$(JarPath)`: Path to the `jar` command-line tool, by default set to `jar`.
* It may be desirable to override these on Windows, depending on your `PATH`.
* `$(UtilityOutputFullPath)`: Directory to place various utilities such as
[`class-parse`](tools/class-parse), [`generator`](tools/generator),
and [`logcat-parse`](tools/logcat-parse). This value should be a full path.
Expand Down
4 changes: 4 additions & 0 deletions build-tools/scripts/jdk.mk
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,8 @@ bin/Build$(CONFIGURATION)/JdkInfo.props: $(JI_JDK_INCLUDE_PATHS) $(JI_JVM_PATH)
echo ' </ItemGroup>' >> "$@"
echo ' </When>' >> "$@"
echo ' </Choose>' >> "$@"
echo ' <PropertyGroup>' >> "$@"
echo " <JavaCPath Condition=\" '\$$(JavaCPath)' == '' \">javac</JavaCPath>" >> "$@"
echo " <JarPath Condition=\" '\$$(JarPath)' == '' \">jar</JarPath>" >> "$@"
echo ' </PropertyGroup>' >> "$@"
echo '</Project>' >> "$@"
5 changes: 3 additions & 2 deletions src/Java.Interop.Export/Tests/Export-Tests.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<PropertyGroup Label="Configuration">
<Import_RootNamespace>Java.Interop.ExportTests</Import_RootNamespace>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)..\..\..\bin\Build$(Configuration)\JdkInfo.props" />
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Java.Interop\ExportTest.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Java.Interop\MarshalMemberBuilderTest.cs" />
Expand All @@ -17,7 +18,7 @@
</ItemGroup>
<Target Name="BuildExportTestJar" Inputs="@(JavaExportTestJar)" Outputs="$(OutputPath)export-test.jar">
<MakeDir Directories="$(IntermediateOutputPath)et-classes" />
<Exec Command="javac -classpath &quot;$(OutputPath)..\$(Configuration)\java-interop.jar&quot; -source 1.5 -target 1.6 -d &quot;$(IntermediateOutputPath)et-classes&quot; @(JavaExportTestJar -&gt; '%(Identity)', ' ')" />
<Exec Command="jar cf &quot;$(OutputPath)export-test.jar&quot; -C &quot;$(IntermediateOutputPath)et-classes&quot; ." />
<Exec Command="&quot;$(JavaCPath)&quot; -classpath &quot;$(OutputPath)..\$(Configuration)\java-interop.jar&quot; -source 1.5 -target 1.6 -d &quot;$(IntermediateOutputPath)et-classes&quot; @(JavaExportTestJar -&gt; '%(Identity)', ' ')" />
<Exec Command="&quot;$(JarPath)&quot; cf &quot;$(OutputPath)export-test.jar&quot; -C &quot;$(IntermediateOutputPath)et-classes&quot; ." />
</Target>
</Project>
4 changes: 3 additions & 1 deletion src/Java.Interop/Java.Interop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<ConsolePause>false</ConsolePause>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>..\..\bin\Debug\Java.Interop.xml</DocumentationFile>
<JNIEnvGenPath>..\..\bin\BuildDebug</JNIEnvGenPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
Expand All @@ -38,6 +39,7 @@
<DefineConstants>INTEROP;FEATURE_JNIENVIRONMENT_JI_PINVOKES;FEATURE_JNIOBJECTREFERENCE_INTPTRS</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>..\..\bin\Release\Java.Interop.xml</DocumentationFile>
<JNIEnvGenPath>..\..\bin\BuildRelease</JNIEnvGenPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'XAIntegrationDebug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -59,7 +61,7 @@
<WarningLevel>4</WarningLevel>
<ConsolePause>false</ConsolePause>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<JNIEnvGenPath>..\..\bin\BuildDebug</JNIEnvGenPath>
<JNIEnvGenPath>..\..\bin\BuildRelease</JNIEnvGenPath>
</PropertyGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
Expand Down
11 changes: 6 additions & 5 deletions src/Java.Interop/Java.Interop.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@
<PropertyGroup>
<Runtime Condition="'$(OS)' != 'Windows_NT'">mono</Runtime>
</PropertyGroup>
<Import Project="$(JNIEnvGenPath)\JdkInfo.props" />
<Target Name="BuildJnienvGen"
Inputs="..\..\build-tools\jnienv-gen\jnienv-gen.csproj"
Outputs="..\..\bin\BuildDebug\jnienv-gen.exe">
Outputs="$(JNIEnvGenPath)\jnienv-gen.exe">
<MSBuild
Projects="..\..\build-tools\jnienv-gen\jnienv-gen.csproj"
Properties="Configuration=Debug"
Properties="Configuration=$(Configuration.Replace('XAIntegration', ''))"
/>
</Target>
<Target Name="BuildJniEnvironment_g_cs"
Inputs="$(JNIEnvGenPath)\jnienv-gen.exe"
Outputs="Java.Interop\JniEnvironment.g.cs;$(IntermediateOutputPath)\jni.c">
<MakeDir Directories="$(IntermediateOutputPath)" />
<Exec
Command="$(Runtime) &quot;..\..\bin\BuildDebug\jnienv-gen.exe&quot; Java.Interop\JniEnvironment.g.cs $(IntermediateOutputPath)\jni.c"
Command="$(Runtime) &quot;$(JNIEnvGenPath)\jnienv-gen.exe&quot; Java.Interop\JniEnvironment.g.cs $(IntermediateOutputPath)\jni.c"
/>
</Target>
<Target Name="BuildInteropJar"
Inputs="@(CompileJavaInteropJar)"
Outputs="$(OutputPath)java-interop.jar">
<MakeDir Directories="$(OutputPath);$(IntermediateOutputPath)ji-classes" />
<Exec Command="javac -source 1.5 -target 1.6 -d &quot;$(IntermediateOutputPath)ji-classes&quot; @(CompileJavaInteropJar -&gt; '%(Identity)', ' ')" />
<Exec Command="jar cf &quot;$(OutputPath)java-interop.jar&quot; -C &quot;$(IntermediateOutputPath)ji-classes&quot; ." />
<Exec Command="&quot;$(JavaCPath)&quot; -source 1.5 -target 1.6 -d &quot;$(IntermediateOutputPath)ji-classes&quot; @(CompileJavaInteropJar -&gt; '%(Identity)', ' ')" />
<Exec Command="&quot;$(JarPath)&quot; cf &quot;$(OutputPath)java-interop.jar&quot; -C &quot;$(IntermediateOutputPath)ji-classes&quot; ." />
</Target>
</Project>
5 changes: 3 additions & 2 deletions src/Java.Interop/Tests/Interop-Tests.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<PropertyGroup Label="Configuration">
<Import_RootNamespace>Java.InteropTests</Import_RootNamespace>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)..\..\..\bin\Build$(Configuration)\JdkInfo.props" />
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Cadenza.Collections\CollectionContract.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Cadenza.Collections\EnumerableContract.cs" />
Expand Down Expand Up @@ -64,7 +65,7 @@
</ItemGroup>
<Target Name="BuildInteropTestJar" Inputs="@(JavaInteropTestJar)" Outputs="$(OutputPath)interop-test.jar">
<MakeDir Directories="$(IntermediateOutputPath)it-classes" />
<Exec Command="javac -source 1.5 -target 1.6 -d &quot;$(IntermediateOutputPath)it-classes&quot; -classpath &quot;$(OutputPath)..\$(Configuration)\java-interop.jar&quot; @(JavaInteropTestJar -&gt; '%(Identity)', ' ')" />
<Exec Command="jar cf &quot;$(OutputPath)interop-test.jar&quot; -C &quot;$(IntermediateOutputPath)it-classes&quot; ." />
<Exec Command="&quot;$(JavaCPath)&quot; -source 1.5 -target 1.6 -d &quot;$(IntermediateOutputPath)it-classes&quot; -classpath &quot;$(OutputPath)..\$(Configuration)\java-interop.jar&quot; @(JavaInteropTestJar -&gt; '%(Identity)', ' ')" />
<Exec Command="&quot;$(JarPath)&quot; cf &quot;$(OutputPath)interop-test.jar&quot; -C &quot;$(IntermediateOutputPath)it-classes&quot; ." />
</Target>
</Project>
2 changes: 1 addition & 1 deletion src/java-interop/java-interop.mdproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<DefineSymbols>JI_DLL_EXPORT MONODEVELOP MONO_DLL_EXPORT</DefineSymbols>
<SourceDirectory>.</SourceDirectory>
</PropertyGroup>
<Import Project="$(JNIEnvGenPath)\JdkInfo.props" Condition="Exists('$(JNIEnvGenPath)\JdkInfo.props')" />
<Import Project="$(JNIEnvGenPath)\JdkInfo.props" />
<Import Project="$(JNIEnvGenPath)\MonoInfo.props" Condition="Exists('$(JNIEnvGenPath)\MonoInfo.props')" />
<ItemGroup>
<None Include="java-interop.h" />
Expand Down
5 changes: 3 additions & 2 deletions tests/PerformanceTests/PerformanceTests.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<HasSharedItems>true</HasSharedItems>
<SharedGUID>{0FBECD2A-7C91-41AB-A4B4-B781E8EC8479}</SharedGUID>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\JdkInfo.props" />
<PropertyGroup Label="Configuration">
<Import_RootNamespace>Java.Interop.PerformanceTests</Import_RootNamespace>
</PropertyGroup>
Expand All @@ -17,7 +18,7 @@
</ItemGroup>
<Target Name="BuildPerformanceTestJar" Inputs="@(JavaPerformanceTestJar)" Outputs="$(OutputPath)performance-test.jar">
<MakeDir Directories="$(IntermediateOutputPath)pt-classes" />
<Exec Command="javac -source 1.5 -target 1.6 -d &quot;$(IntermediateOutputPath)pt-classes&quot; @(JavaPerformanceTestJar -&gt; '%(Identity)', ' ')" />
<Exec Command="jar cf &quot;$(OutputPath)performance-test.jar&quot; -C &quot;$(IntermediateOutputPath)pt-classes&quot; ." />
<Exec Command="&quot;$(JavaCPath)&quot; -source 1.5 -target 1.6 -d &quot;$(IntermediateOutputPath)pt-classes&quot; @(JavaPerformanceTestJar -&gt; '%(Identity)', ' ')" />
<Exec Command="&quot;$(JarPath)&quot; cf &quot;$(OutputPath)performance-test.jar&quot; -C &quot;$(IntermediateOutputPath)pt-classes&quot; ." />
</Target>
</Project>