Skip to content

Commit 6aa2522

Browse files
[build] remove remnants of OpenTK-1.0.dll (#9610)
Context: #5755 After #5755, `<Reference Include="OpenTK-1.0" />` should be replaced with a `Xamarin.Legacy.OpenTK` NuGet package. `external\opentk` is no longer a git submodule, etc. We can completely remove `src/OpenTK-1.0` and related code, which contains a Xamarin.Android class library project. This also led me to remove a list of assemblies in `FrameworkAssembliesToTreatAsUserAssemblies`.
1 parent 68da9e9 commit 6aa2522

File tree

9 files changed

+0
-604
lines changed

9 files changed

+0
-604
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
/eng @jonathanpeppers @pjcollins @jonpryor
2929

30-
/src/OpenTK-1.0 @radekdoulik @jonpryor
3130
/src/Mono.Android.Export @jonpryor
3231
/src/r8 @jonathanpeppers @jonpryor
3332
/src/Xamarin.Android.Build.Tasks @dellis1972 @jonathanpeppers

Configuration.props

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@
9898
<MonoRequiredMaximumVersion Condition=" '$(MonoRequiredMaximumVersion)' == '' ">$(MonoRequiredMinimumVersion)</MonoRequiredMaximumVersion>
9999
<IgnoreMaxMonoVersion Condition=" '$(IgnoreMaxMonoVersion)' == '' And '$(RunningOnCI)' == 'true' ">False</IgnoreMaxMonoVersion>
100100
<IgnoreMaxMonoVersion Condition=" '$(IgnoreMaxMonoVersion)' == '' ">True</IgnoreMaxMonoVersion>
101-
<OpenTKSourceDirectory>$(MSBuildThisFileDirectory)external\opentk</OpenTKSourceDirectory>
102101
<SqliteSourceDirectory Condition=" '$(SqliteSourceDirectory)' == '' ">$(MSBuildThisFileDirectory)external\sqlite</SqliteSourceDirectory>
103102
<LibUnwindSourceDirectory Condition=" '$(LibUnwindSourceDirectory)' == '' ">$(MSBuildThisFileDirectory)external\libunwind</LibUnwindSourceDirectory>
104103
<LibUnwindGeneratedHeadersDirectory Condition=" '$(LibUnwindGeneratedHeadersDirectory)' == '' ">$(BootstrapOutputDirectory)\libunwind</LibUnwindGeneratedHeadersDirectory>
@@ -143,7 +142,6 @@
143142
<LibUnwindSourceFullPath>$([System.IO.Path]::GetFullPath ('$(LibUnwindSourceDirectory)'))</LibUnwindSourceFullPath>
144143
<LibUnwindGeneratedHeadersFullPath>$([System.IO.Path]::GetFullPath ('$(LibUnwindGeneratedHeadersDirectory)'))</LibUnwindGeneratedHeadersFullPath>
145144
<LZ4SourceFullPath>$([System.IO.Path]::GetFullPath ('$(LZ4SourceDirectory)'))</LZ4SourceFullPath>
146-
<OpenTKSourceFullPath>$([System.IO.Path]::GetFullPath ('$(OpenTKSourceDirectory)'))</OpenTKSourceFullPath>
147145
<JavaInteropTargetFrameworkVersion>net8.0</JavaInteropTargetFrameworkVersion>
148146
</PropertyGroup>
149147
<PropertyGroup>

build-tools/installers/create-installers.targets

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@
8080
<ItemGroup>
8181
<_FrameworkFiles Include="$(FrameworkSrcDir)\$(FirstInstallerFrameworkVersion)\Mono.Android.Export.dll" />
8282
<_FrameworkFiles Include="$(FrameworkSrcDir)\$(FirstInstallerFrameworkVersion)\Mono.Android.Export.pdb" />
83-
<_FrameworkFiles Include="$(FrameworkSrcDir)\$(FirstInstallerFrameworkVersion)\OpenTK-1.0.dll" />
84-
<_FrameworkFiles Include="$(FrameworkSrcDir)\$(FirstInstallerFrameworkVersion)\OpenTK-1.0.pdb" />
8583
<_FrameworkFiles Include="@(MonoFacadeAssembly->'$(FrameworkSrcDir)\$(BclFrameworkVersion)\Facades\%(Identity)')" />
8684
<_FrameworkFiles Include="@(MonoFacadeAssemblySymbol->'$(FrameworkSrcDir)\$(BclFrameworkVersion)\Facades\%(Identity)')" />
8785
<_FrameworkFiles Include="@(MonoProfileAssembly->'$(FrameworkSrcDir)\$(BclFrameworkVersion)\%(Identity)')" />
@@ -96,7 +94,6 @@
9694
<_FrameworkFiles Include="$(FrameworkSrcDir)\$(BclFrameworkVersion)\System.EnterpriseServices.pdb" />
9795
<_FrameworkFiles Include="$(FrameworkSrcDir)\$(BclFrameworkVersion)\Xamarin.Android.NUnitLite.dll" />
9896
<_FrameworkFiles Include="$(FrameworkSrcDir)\$(BclFrameworkVersion)\Xamarin.Android.NUnitLite.pdb" />
99-
<_FrameworkFilesWin Include="$(FrameworkSrcDir)\$(FirstInstallerFrameworkVersion)\OpenTK-1.0.xml" />
10097
<_FrameworkFilesWin Include="$(FrameworkSrcDir)\$(BclFrameworkVersion)\Xamarin.Android.NUnitLite.xml" />
10198
</ItemGroup>
10299
<ItemGroup>

src/OpenTK-1.0/GlobalAssemblyInfo.cs

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/OpenTK-1.0/OpenTK.csproj

Lines changed: 0 additions & 544 deletions
This file was deleted.

src/Xamarin.Android.Build.Tasks/Resources/proguard_xamarin.cfg

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
-keep class mono.android.** { *; <init>(...); }
1111
-keep class mono.java.** { *; <init>(...); }
1212
-keep class mono.javax.** { *; <init>(...); }
13-
-keep class opentk.platform.android.AndroidGameView { *; <init>(...); }
14-
-keep class opentk.GameViewBase { *; <init>(...); }
15-
-keep class opentk_1_0.platform.android.AndroidGameView { *; <init>(...); }
16-
-keep class opentk_1_0.GameViewBase { *; <init>(...); }
1713
-keep class net.dot.jni.ManagedPeer { *; <init>(...); }
1814
-keep class xamarin.android.net.ServerCertificateCustomValidator_TrustManager { *; <init>(...); }
1915
-keep class xamarin.android.net.ServerCertificateCustomValidator_TrustManager_FakeSSLSession { *; <init>(...); }

src/Xamarin.Android.Build.Tasks/Tasks/GeneratePackageManagerJava.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ public override bool RunTask ()
104104
continue;
105105
pkgmgr.WriteLine ("\t\t\"" + Path.GetFileName (assembly.ItemSpec) + "\",");
106106
}
107-
foreach (var assembly in MonoAndroidHelper.GetFrameworkAssembliesToTreatAsUserAssemblies (ResolvedAssemblies)) {
108-
if (string.Compare (Path.GetFileName (assembly.ItemSpec), mainFileName, StringComparison.OrdinalIgnoreCase) == 0)
109-
continue;
110-
pkgmgr.WriteLine ("\t\t\"" + Path.GetFileName (assembly.ItemSpec) + "\",");
111-
}
112107

113108
// Write the assembly dependencies
114109
pkgmgr.WriteLine ("\t};");

src/Xamarin.Android.Build.Tasks/Utilities/MonoAndroidHelper.Linker.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ public partial class MonoAndroidHelper
1818
"Mono.Data.Sqlite.dll",
1919
"Mono.Posix.dll",
2020
};
21-
internal static readonly HashSet<string> FrameworkAssembliesToTreatAsUserAssemblies = new HashSet<string> (StringComparer.OrdinalIgnoreCase) {
22-
"OpenTK-1.0.dll",
23-
"Mono.Android.Support.v13.dll",
24-
"Mono.Android.Support.v4.dll",
25-
"Xamarin.Android.NUnitLite.dll",
26-
};
2721

2822
public static bool IsFrameworkAssembly (string assembly)
2923
{
@@ -33,14 +27,6 @@ public static bool IsFrameworkAssembly (string assembly)
3327
public static bool IsFrameworkAssembly (string assembly, bool checkSdkPath)
3428
{
3529
if (IsSharedRuntimeAssembly (assembly)) {
36-
#if MSBUILD
37-
bool treatAsUser = FrameworkAssembliesToTreatAsUserAssemblies.Contains (Path.GetFileName (assembly));
38-
// Framework assemblies don't come from outside the SDK Path;
39-
// user assemblies do
40-
if (checkSdkPath && treatAsUser && TargetFrameworkDirectories != null) {
41-
return ExistsInFrameworkPath (assembly);
42-
}
43-
#endif
4430
return true;
4531
}
4632
return TargetFrameworkDirectories == null || !checkSdkPath ? false : ExistsInFrameworkPath (assembly);

src/Xamarin.Android.Build.Tasks/Utilities/MonoAndroidHelper.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -415,17 +415,6 @@ public static ZipArchive ReadZipFile (string filename)
415415
}
416416

417417
#if MSBUILD
418-
internal static IEnumerable<ITaskItem> GetFrameworkAssembliesToTreatAsUserAssemblies (ITaskItem[] resolvedAssemblies)
419-
{
420-
var ret = new List<ITaskItem> ();
421-
foreach (ITaskItem item in resolvedAssemblies) {
422-
if (FrameworkAssembliesToTreatAsUserAssemblies.Contains (Path.GetFileName (item.ItemSpec)))
423-
ret.Add (item);
424-
}
425-
426-
return ret;
427-
}
428-
429418
public static bool SaveMapFile (IBuildEngine4 engine, string mapFile, Dictionary<string, string> map)
430419
{
431420
engine?.RegisterTaskObjectAssemblyLocal (mapFile, map, RegisteredTaskObjectLifetime.Build);

0 commit comments

Comments
 (0)