Skip to content

Commit b58416a

Browse files
atsushienojonpryor
authored andcommitted
[Java.Interop.NamingCustomAttributes] Reorganize attributes (#60)
Context: #58 Rename `Xamarin.Android.NamingCustomAttributes.shproj` to `Java.Interop.NamingCustomAttributes.shproj`, and "simplify" the custom attributes so that they don't contain any members that aren't needed within the Java.Interop repo. Through (gratuitous?) use of `partial` classes, the xamarin-android repo can add additional members to the custom attribute types, thus remove a "hard dependency" between the two git repos. For example, the `Android.App.ActivityAttribute.AllowEmbedded` property is only needed for `AndroidManifest.xml` generation within the xamarin-android repo, and is not needed in the Java.Interop repo, so remove it. The xamarin-android repo will gain a new `Xamarin.Android.NamingCustomAttributes.shproj` shared project which will contain all of the Android-specific members that were formerly in this repo.
1 parent cd7f7a8 commit b58416a

24 files changed

+60
-298
lines changed

Java.Interop.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build-Tools", "Build-Tools"
7979
EndProject
8080
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jnienv-gen", "build-tools\jnienv-gen\jnienv-gen.csproj", "{6410DA0F-5E14-4FC0-9AEE-F4C542C96C7A}"
8181
EndProject
82-
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Xamarin.Android.NamingCustomAttributes", "src\Xamarin.Android.NamingCustomAttributes\Xamarin.Android.NamingCustomAttributes.shproj", "{74598F5C-B8CC-4CE6-8EE2-AB9CA1400076}"
82+
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Java.Interop.NamingCustomAttributes", "src\Java.Interop.NamingCustomAttributes\Java.Interop.NamingCustomAttributes.shproj", "{FE789F04-5E95-42C5-AEF1-E33F8DF06B3F}"
8383
EndProject
8484
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Java.Interop.Tools.JavaCallableWrappers", "src\Java.Interop.Tools.JavaCallableWrappers\Java.Interop.Tools.JavaCallableWrappers.csproj", "{D18FCF91-8876-48A0-A693-2DC1E7D3D80A}"
8585
EndProject
@@ -348,7 +348,7 @@ Global
348348
{4EEAB1A7-99C1-4302-9C18-01A7B481409B} = {271C9F30-F679-4793-942B-0D9527CB3E2F}
349349
{F3ECB73D-9263-4E42-A5B4-3FC0D1D829F9} = {D5A93398-AEB1-49F3-89DC-3904A47DB0C7}
350350
{6410DA0F-5E14-4FC0-9AEE-F4C542C96C7A} = {172B608B-E6F3-41CC-9949-203A76BA247C}
351-
{74598F5C-B8CC-4CE6-8EE2-AB9CA1400076} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
351+
{FE789F04-5E95-42C5-AEF1-E33F8DF06B3F} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
352352
{D18FCF91-8876-48A0-A693-2DC1E7D3D80A} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
353353
{D48EE8D0-0A0A-4493-AEF5-DAF5F8CF86AD} = {0998E45F-8BCE-4791-A944-962CD54E2D80}
354354
{64CC4E44-CE3A-4319-BF3F-6CF8BD513870} = {0998E45F-8BCE-4791-A944-962CD54E2D80}

src/Android.Interop/Resources/Resource.designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using System;
2+
3+
namespace Android.App
4+
{
5+
sealed partial class ActivityAttribute : Attribute {
6+
public string Name {get; set;}
7+
}
8+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using System;
2+
3+
namespace Android.App {
4+
sealed partial class ApplicationAttribute : Attribute {
5+
public string Name {get; set;}
6+
}
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using System;
2+
3+
namespace Android.App {
4+
sealed partial class InstrumentationAttribute : Attribute {
5+
public string Name { get; set; }
6+
}
7+
}
8+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using System;
2+
3+
namespace Android.App {
4+
sealed partial class ServiceAttribute : Attribute {
5+
public string Name {get; set;}
6+
}
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using System;
2+
3+
namespace Android.Content {
4+
5+
partial class BroadcastReceiverAttribute : Attribute {
6+
public string Name { get; set; }
7+
}
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using System;
2+
3+
namespace Android.Content {
4+
5+
partial class ContentProviderAttribute : Attribute {
6+
public string Name { get; set; }
7+
}
8+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<PropertyGroup>
44
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
55
<HasSharedItems>true</HasSharedItems>
6-
<SharedGUID>{74598F5C-B8CC-4CE6-8EE2-AB9CA1400076}</SharedGUID>
6+
<SharedGUID>{FE789F04-5E95-42C5-AEF1-E33F8DF06B3F}</SharedGUID>
77
</PropertyGroup>
88
<PropertyGroup Label="Configuration">
9-
<Import_RootNamespace>Xamarin.Android.NamingCustomAttributes</Import_RootNamespace>
9+
<Import_RootNamespace>Java.Interop.NamingCustomAttributes</Import_RootNamespace>
1010
</PropertyGroup>
1111
<ItemGroup>
1212
<Compile Include="$(MSBuildThisFileDirectory)Android.Content\BroadcastReceiverAttribute.cs" />
@@ -21,4 +21,4 @@
2121
<Compile Include="$(MSBuildThisFileDirectory)Android.App\ServiceAttribute.cs" />
2222
<Compile Include="$(MSBuildThisFileDirectory)Android.App\InstrumentationAttribute.cs" />
2323
</ItemGroup>
24-
</Project>
24+
</Project>

0 commit comments

Comments
 (0)