This repository was archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 682
[Guava] Multi-target for .NET 6 and MonoAndroid90 #1111
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
798777e
[Guava] Multi-target for .NET 6 and MonoAndroid90
jonathanpeppers d136378
.nupkg should include a single copy of the .jar file
jonathanpeppers 9ac7291
Added a Guava sample project
jonathanpeppers 01f819a
Explicitly list TargetPlatformVersion=30
jonathanpeppers dab2dad
Merge branch 'main' into net6
moljac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,3 +13,4 @@ tmpnupkg/ | |
| *.user | ||
| artifacts/ | ||
| .idea/ | ||
| *.binlog | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <!-- Uncomment if a $(PackageVersionSuffix) is ever needed --> | ||
| <!-- <PackageVersionSuffix>-net6preview04</PackageVersionSuffix> --> | ||
| <!-- <PackageVersionSuffix Condition=" '$(BUILD_BUILDID)' != '' ">$(PackageVersionSuffix).$(BUILD_BUILDID)</PackageVersionSuffix> --> | ||
| <GuavaNuGetVersion>28.2.0.1$(PackageVersionSuffix)</GuavaNuGetVersion> | ||
| <GuavaFailureAccessNuGetVersion>1.0.1.3$(PackageVersionSuffix)</GuavaFailureAccessNuGetVersion> | ||
| <GuavaListenableFutureNuGetVersion>1.0.0.3$(PackageVersionSuffix)</GuavaListenableFutureNuGetVersion> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <_NuGetBuildFolders Include="build\;buildTransitive\" /> | ||
| <_TfmNuGetBuildFolders Include="@(_NuGetBuildFolders->'%(Identity)monoandroid90\');@(_NuGetBuildFolders->'%(Identity)net6.0-android30.0\')" /> | ||
| </ItemGroup> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| using Google.Common.Util.Concurrent; | ||
| using Java.Lang; | ||
| using Java.Util.Concurrent; | ||
|
|
||
| namespace GuavaSample | ||
| { | ||
| // Just ensure this compiles | ||
| public class Future : Java.Lang.Object, IListenableFuture | ||
| { | ||
| public bool IsCancelled { get; set; } | ||
|
|
||
| public bool IsDone { get; set; } | ||
|
|
||
| public void AddListener(IRunnable p0, IExecutor p1) | ||
| { | ||
|
|
||
| } | ||
|
|
||
| public bool Cancel(bool mayInterruptIfRunning) => true; | ||
|
|
||
| public Object Get() => null; | ||
|
|
||
| public Object Get(long timeout, TimeUnit unit) => null; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <PropertyGroup> | ||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
| <ProductVersion>8.0.30703</ProductVersion> | ||
| <SchemaVersion>2.0</SchemaVersion> | ||
| <ProjectGuid>{FF3EDEBE-27B3-42E5-A713-9EA81CB5397A}</ProjectGuid> | ||
| <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
| <TemplateGuid>{122416d6-6b49-4ee2-a1e8-b825f31c79fe}</TemplateGuid> | ||
| <OutputType>Library</OutputType> | ||
| <AppDesignerFolder>Properties</AppDesignerFolder> | ||
| <RootNamespace>GuavaSample</RootNamespace> | ||
| <AssemblyName>GuavaSample</AssemblyName> | ||
| <FileAlignment>512</FileAlignment> | ||
| <Deterministic>True</Deterministic> | ||
| <TargetFrameworkVersion>v11.0</TargetFrameworkVersion> | ||
| <AndroidClassParser>class-parse</AndroidClassParser> | ||
| <IsPackable>false</IsPackable> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
| <DebugSymbols>True</DebugSymbols> | ||
| <DebugType>portable</DebugType> | ||
| <Optimize>False</Optimize> | ||
| <OutputPath>bin\Debug\</OutputPath> | ||
| <DefineConstants>DEBUG;TRACE</DefineConstants> | ||
| <ErrorReport>prompt</ErrorReport> | ||
| <WarningLevel>4</WarningLevel> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
| <DebugSymbols>True</DebugSymbols> | ||
| <DebugType>portable</DebugType> | ||
| <Optimize>True</Optimize> | ||
| <OutputPath>bin\Release\</OutputPath> | ||
| <DefineConstants>TRACE</DefineConstants> | ||
| <ErrorReport>prompt</ErrorReport> | ||
| <WarningLevel>4</WarningLevel> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Reference Include="System" /> | ||
| <Reference Include="System.Xml" /> | ||
| <Reference Include="System.Core" /> | ||
| <Reference Include="Mono.Android" /> | ||
| <Reference Include="System.Numerics" /> | ||
| <Reference Include="System.Numerics.Vectors" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Compile Include="Future.cs" /> | ||
| <Compile Include="Properties\AssemblyInfo.cs" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="Xamarin.Google.Guava" Version="$(GuavaNuGetVersion)" /> | ||
| <PackageReference Include="Xamarin.Google.Guava.ListenableFuture" Version="$(GuavaListenableFutureNuGetVersion)" /> | ||
| <PackageReference Include="Xamarin.Google.Guava.FailureAccess" Version="$(GuavaFailureAccessNuGetVersion)" /> | ||
| </ItemGroup> | ||
| <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" /> | ||
| </Project> |
26 changes: 26 additions & 0 deletions
26
Android/Guava/samples/GuavaSample/Properties/AssemblyInfo.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| using System.Reflection; | ||
| using System.Runtime.CompilerServices; | ||
| using System.Runtime.InteropServices; | ||
| using Android.App; | ||
|
|
||
| // General Information about an assembly is controlled through the following | ||
| // set of attributes. Change these attribute values to modify the information | ||
| // associated with an assembly. | ||
| [assembly: AssemblyTitle("GuavaSample")] | ||
| [assembly: AssemblyDescription("")] | ||
| [assembly: AssemblyConfiguration("")] | ||
| [assembly: AssemblyCompany("")] | ||
| [assembly: AssemblyProduct("GuavaSample")] | ||
| [assembly: AssemblyCopyright("Copyright © 2018")] | ||
| [assembly: AssemblyTrademark("")] | ||
| [assembly: AssemblyCulture("")] | ||
| [assembly: ComVisible(false)] | ||
|
|
||
| // Version information for an assembly consists of the following four values: | ||
| // | ||
| // Major Version | ||
| // Minor Version | ||
| // Build Number | ||
| // Revision | ||
| [assembly: AssemblyVersion("1.0.0.0")] | ||
| [assembly: AssemblyFileVersion("1.0.0.0")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <configuration> | ||
| <packageSources> | ||
| <add key="local-output" value="../output" /> | ||
| </packageSources> | ||
| </configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Android/Guava/source/Guava.FailureAccess/Guava.FailureAccess.targets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup> | ||
| <AndroidJavaLibrary Include="$(MSBuildThisFileDirectory)*.jar" /> | ||
| <AndroidJavaLibrary Include="$(MSBuildThisFileDirectory)..\..\jar\*.jar" /> | ||
| </ItemGroup> | ||
| </Project> |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Android/Guava/source/Guava.ListenableFuture/Guava.ListenableFuture.targets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup> | ||
| <AndroidJavaLibrary Include="$(MSBuildThisFileDirectory)*.jar" /> | ||
| <AndroidJavaLibrary Include="$(MSBuildThisFileDirectory)..\..\jar\*.jar" /> | ||
| </ItemGroup> | ||
| </Project> |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup> | ||
| <EmbeddedReferenceJar Include="$(MSBuildThisFileDirectory)*.jar" /> | ||
| <EmbeddedReferenceJar Include="$(MSBuildThisFileDirectory)..\..\jar\*.jar" /> | ||
| </ItemGroup> | ||
| </Project> |
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sample isn't really that helpful, basically just an "integration test" checking a type exists.
When I look at
GuavaSample.dllit has the same.jarfiles embedded as before: