From 245c8ddcdcd9b00f8f7c716a9335d5e9b70c3227 Mon Sep 17 00:00:00 2001 From: Simon Rozsival Date: Wed, 4 Nov 2026 14:18:14 +0100 Subject: [PATCH] [build] Remove the remaining external/Java.Interop layout Context: https://github.com/dotnet/android/pull/13378 #13378 moved the Java.Interop projects into the standard source and test directories, but left 23 documentation, legal, localization, and configuration files under external/Java.Interop. The old directory therefore remained in main after the project migration. Move the documentation and legal files to Documentation/Java.Interop and the generated localization files to the root Localize/loc tree. Update the localization mapping and documentation references, and remove the obsolete nested Git configuration so the old directory can disappear entirely. Preserve all translation and legal-file contents unchanged. Validate all 13 localization moves byte-for-byte, parse their XML, resolve the updated localization mapping and all 15 relative documentation links, and confirm the old directory and references are absent. Whitespace checks pass with the existing JSON CRLF line endings accounted for. No SDK compilation or runtime tests are needed for this documentation and localization-path cleanup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../instructions/java-interop.instructions.md | 8 ++-- .github/skills/update-tpn/SKILL.md | 7 +-- .../Java.Interop}/Architecture.md | 4 +- .../Java.Interop}/BuildConfiguration.md | 14 +++--- .../Java.Interop}/EnumMappingFile.md | 0 .../JNI-Invocation-Overhead-Musings.md | 2 +- .../Java.Interop/LICENSE | 0 .../Java.Interop}/Motivation.md | 0 .../Java.Interop/README.md | 8 ++-- .../Java.Interop/ThirdPartyNotices.txt | 0 Documentation/README.md | 1 + Localize/LocProject.json | 2 +- .../Resources.resx.lcl | 0 .../Resources.resx.lcl | 0 .../Resources.resx.lcl | 0 .../Resources.resx.lcl | 0 .../Resources.resx.lcl | 0 .../Resources.resx.lcl | 0 .../Resources.resx.lcl | 0 .../Resources.resx.lcl | 0 .../Resources.resx.lcl | 0 .../Resources.resx.lcl | 0 .../Resources.resx.lcl | 0 .../Resources.resx.lcl | 0 .../Resources.resx.lcl | 0 external/Java.Interop/.gitattributes | 45 ------------------- external/Java.Interop/.gitignore | 20 --------- 27 files changed, 24 insertions(+), 87 deletions(-) rename {external/Java.Interop/Documentation => Documentation/Java.Interop}/Architecture.md (98%) rename {external/Java.Interop/Documentation => Documentation/Java.Interop}/BuildConfiguration.md (82%) rename {external/Java.Interop/Documentation => Documentation/Java.Interop}/EnumMappingFile.md (100%) rename {external/Java.Interop/Documentation => Documentation/Java.Interop}/JNI-Invocation-Overhead-Musings.md (98%) rename {external => Documentation}/Java.Interop/LICENSE (100%) rename {external/Java.Interop/Documentation => Documentation/Java.Interop}/Motivation.md (100%) rename {external => Documentation}/Java.Interop/README.md (91%) rename {external => Documentation}/Java.Interop/ThirdPartyNotices.txt (100%) rename {external/Java.Interop/Localize => Localize}/loc/cs/src/Java.Interop.Localization/Resources.resx.lcl (100%) rename {external/Java.Interop/Localize => Localize}/loc/de/src/Java.Interop.Localization/Resources.resx.lcl (100%) rename {external/Java.Interop/Localize => Localize}/loc/es/src/Java.Interop.Localization/Resources.resx.lcl (100%) rename {external/Java.Interop/Localize => Localize}/loc/fr/src/Java.Interop.Localization/Resources.resx.lcl (100%) rename {external/Java.Interop/Localize => Localize}/loc/it/src/Java.Interop.Localization/Resources.resx.lcl (100%) rename {external/Java.Interop/Localize => Localize}/loc/ja/src/Java.Interop.Localization/Resources.resx.lcl (100%) rename {external/Java.Interop/Localize => Localize}/loc/ko/src/Java.Interop.Localization/Resources.resx.lcl (100%) rename {external/Java.Interop/Localize => Localize}/loc/pl/src/Java.Interop.Localization/Resources.resx.lcl (100%) rename {external/Java.Interop/Localize => Localize}/loc/pt-BR/src/Java.Interop.Localization/Resources.resx.lcl (100%) rename {external/Java.Interop/Localize => Localize}/loc/ru/src/Java.Interop.Localization/Resources.resx.lcl (100%) rename {external/Java.Interop/Localize => Localize}/loc/tr/src/Java.Interop.Localization/Resources.resx.lcl (100%) rename {external/Java.Interop/Localize => Localize}/loc/zh-Hans/src/Java.Interop.Localization/Resources.resx.lcl (100%) rename {external/Java.Interop/Localize => Localize}/loc/zh-Hant/src/Java.Interop.Localization/Resources.resx.lcl (100%) delete mode 100644 external/Java.Interop/.gitattributes delete mode 100644 external/Java.Interop/.gitignore diff --git a/.github/instructions/java-interop.instructions.md b/.github/instructions/java-interop.instructions.md index d77ab9c09d9..271c69adaf5 100644 --- a/.github/instructions/java-interop.instructions.md +++ b/.github/instructions/java-interop.instructions.md @@ -112,8 +112,8 @@ Standalone host tooling builds and tooling tests do not require a locally built Android SDK. The standalone tooling and test target framework is .NET 10 via `DotNetStableTargetFramework` in the root `Directory.Build.props`, independently of the Android product's target framework. Follow the Java.Interop -[README](../../external/Java.Interop/README.md#building) and -[build configuration](../../external/Java.Interop/Documentation/BuildConfiguration.md) +[README](../../Documentation/Java.Interop/README.md#building) and +[build configuration](../../Documentation/Java.Interop/BuildConfiguration.md) for shared build configuration and JDK tool-path settings (`JavaSdkDirectory`, `JavaCPath`, and `JarPath`). @@ -126,5 +126,5 @@ Core JNI tests and Java fixtures live in - [JNI Specification](https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/jniTOC.html) - [Android JNI Performance Guide](https://developer.android.com/training/articles/perf-jni) -- `external/Java.Interop/Documentation/Architecture.md` -- `external/Java.Interop/Documentation/BuildConfiguration.md` +- `Documentation/Java.Interop/Architecture.md` +- `Documentation/Java.Interop/BuildConfiguration.md` diff --git a/.github/skills/update-tpn/SKILL.md b/.github/skills/update-tpn/SKILL.md index 83874ac2216..a26af4c3444 100644 --- a/.github/skills/update-tpn/SKILL.md +++ b/.github/skills/update-tpn/SKILL.md @@ -57,9 +57,10 @@ Read `.gitmodules` for all submodules. Current submodules and their license file |-----------|-----|-------------| | android-api-docs | https://github.com/dotnet/android-api-docs | (not a third-party dep) | -#### Vendored Java.Interop (`external/Java.Interop/`) -Java.Interop is vendored source, not a submodule. Keep its `dotnet/java-interop` -notice; its license is in `external/Java.Interop/LICENSE`. +#### Integrated Java.Interop (`src/Java.Interop*/`) +Java.Interop is integrated source, not a submodule. Keep its `dotnet/java-interop` +notice; its license is in `Documentation/Java.Interop/LICENSE` and its additional +third-party notices are in `Documentation/Java.Interop/ThirdPartyNotices.txt`. #### Vendored Source (`src-ThirdParty/`) List contents of `src-ThirdParty/` directory. Current vendored code and license sources: diff --git a/external/Java.Interop/Documentation/Architecture.md b/Documentation/Java.Interop/Architecture.md similarity index 98% rename from external/Java.Interop/Documentation/Architecture.md rename to Documentation/Java.Interop/Architecture.md index f0f7979d76c..e091f29d417 100644 --- a/external/Java.Interop/Documentation/Architecture.md +++ b/Documentation/Java.Interop/Architecture.md @@ -8,7 +8,7 @@ Java-to-managed calls use generated Java callable wrappers and registered JNI callbacks. CoreCLR and NativeAOT applications use generated trimmable typemaps for peer lookup, constructor activation, and callback registration. -See [Java and managed interoperability with the trimmable TypeMap](../../../Documentation/guides/internals/JavaJNI_Interop.md) +See [Java and managed interoperability with the trimmable TypeMap](../guides/internals/JavaJNI_Interop.md) for the build pipeline, generated callbacks, runtime startup, and activation flow. ## Values and reference ownership @@ -200,5 +200,5 @@ lower-level JNI references and argument values used by those wrappers. .NET 12 removes the obsolete runtime expression-marshaling builder, context, hooks, and the unused `JniValueManager.ActivatePeer` contract. These are not part of generated callbacks or trimmable typemap activation. See the -[breaking-change and migration notes](../../../Documentation/release-notes/expression-marshalling-retirement.md) +[breaking-change and migration notes](../release-notes/expression-marshalling-retirement.md) for the removed APIs and migration guidance. diff --git a/external/Java.Interop/Documentation/BuildConfiguration.md b/Documentation/Java.Interop/BuildConfiguration.md similarity index 82% rename from external/Java.Interop/Documentation/BuildConfiguration.md rename to Documentation/Java.Interop/BuildConfiguration.md index 0c370b1947a..9b252aaa022 100644 --- a/external/Java.Interop/Documentation/BuildConfiguration.md +++ b/Documentation/Java.Interop/BuildConfiguration.md @@ -1,15 +1,15 @@ # Build Configuration The standalone Java.Interop tooling build uses `dotnet` and MSBuild properties. -See the [README](../README.md#building) for preparation and build commands. +See the [README](README.md#building) for preparation and build commands. Android runtime integration is built as part of the enclosing dotnet/android -[SDK build](../../../Documentation/README.md#building-from-source). +[SDK build](../README.md#building-from-source). ## MSBuild Properties Projects use the repository's shared -[`Directory.Build.props`](../../../Directory.Build.props) and -[`Configuration.props`](../../../Configuration.props). +[`Directory.Build.props`](../../Directory.Build.props) and +[`Configuration.props`](../../Configuration.props). MSBuild properties may be placed in the repository-root `Configuration.Override.props` or passed with `-p:Name=Value`. @@ -22,7 +22,7 @@ Overridable MSBuild properties include: tooling builds, pass `-p:JavaSdkDirectory=/path/to/jdk` to use an installed JDK. These are used for Java tooling and test fixtures, not a desktop JNI test host. * `$(MicrosoftAndroidSdkOutDir)`: Output directory for tools such as - [`class-parse`](../../../src/class-parse) and [`generator`](../../../src/generator), + [`class-parse`](../../src/class-parse) and [`generator`](../../src/generator), within the Android SDK pack's `tools/` directory. * `$(BuildOutputDirectory)` and `$(TestOutputDirectory)`: Libraries and tooling tests use `bin/$(Configuration)/net10.0/` and @@ -57,8 +57,8 @@ Tooling tests remain under `tests/` and run with locally built Android SDK; Java/Gradle fixtures still require the configured JDK. Core JNI interop sources and Java fixtures live in -[`tests/Mono.Android-Tests/Java.Interop-Tests/`](../../../tests/Mono.Android-Tests/Java.Interop-Tests/) +[`tests/Mono.Android-Tests/Java.Interop-Tests/`](../../tests/Mono.Android-Tests/Java.Interop-Tests/) and run on Android through -[`Mono.Android.NET-Tests.csproj`](../../../tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj). +[`Mono.Android.NET-Tests.csproj`](../../tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj). These tests require a locally built Android SDK and a device or emulator. There is no standalone core host-JVM harness or `make run-tests` workflow. diff --git a/external/Java.Interop/Documentation/EnumMappingFile.md b/Documentation/Java.Interop/EnumMappingFile.md similarity index 100% rename from external/Java.Interop/Documentation/EnumMappingFile.md rename to Documentation/Java.Interop/EnumMappingFile.md diff --git a/external/Java.Interop/Documentation/JNI-Invocation-Overhead-Musings.md b/Documentation/Java.Interop/JNI-Invocation-Overhead-Musings.md similarity index 98% rename from external/Java.Interop/Documentation/JNI-Invocation-Overhead-Musings.md rename to Documentation/Java.Interop/JNI-Invocation-Overhead-Musings.md index 4ac6d62dc35..89823fc054e 100644 --- a/external/Java.Interop/Documentation/JNI-Invocation-Overhead-Musings.md +++ b/Documentation/Java.Interop/JNI-Invocation-Overhead-Musings.md @@ -1,6 +1,6 @@ # JNI Invocation Overhead Musings -[tests/PerformanceTests/TimingTests.cs](tests/PerformanceTests/TimingTests.cs) +[tests/PerformanceTests/TimingTests.cs](https://github.com/dotnet/java-interop/blob/c9db386c5457ff6243b3e36d919ca8669f502192/tests/PerformanceTests/TimingTests.cs) contains various tests to investigate the overheads involved in using JNI to invoke Java methods. In particular, see the `Java.Interop.PerformanceTests.JniMethodInvocationOverheadTiming.MethodInvocationTiming()` diff --git a/external/Java.Interop/LICENSE b/Documentation/Java.Interop/LICENSE similarity index 100% rename from external/Java.Interop/LICENSE rename to Documentation/Java.Interop/LICENSE diff --git a/external/Java.Interop/Documentation/Motivation.md b/Documentation/Java.Interop/Motivation.md similarity index 100% rename from external/Java.Interop/Documentation/Motivation.md rename to Documentation/Java.Interop/Motivation.md diff --git a/external/Java.Interop/README.md b/Documentation/Java.Interop/README.md similarity index 91% rename from external/Java.Interop/README.md rename to Documentation/Java.Interop/README.md index da7cf0428e9..0fe4695498f 100644 --- a/external/Java.Interop/README.md +++ b/Documentation/Java.Interop/README.md @@ -17,8 +17,8 @@ Some additional context for this project is documented in the [Motivation][motiv and [Architecture][architecture] pages. [jni]: http://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/jniTOC.html -[motivation]: Documentation/Motivation.md -[architecture]: Documentation/Architecture.md +[motivation]: Motivation.md +[architecture]: Architecture.md [android]: https://github.com/dotnet/android ## Building @@ -28,7 +28,7 @@ and [Architecture][architecture] pages. The standalone tooling build does not require a locally built Android SDK. For the Android product build, follow the enclosing repository's -[build instructions](../../Documentation/README.md#building-from-source). +[build instructions](../README.md#building-from-source). Libraries and command-line tools live in the repository's top-level `src/`, tooling tests in `tests/`, and the JNI source generator in `build-tools/java-interop-jnienv-gen/`. There is no separate bootstrap project @@ -43,7 +43,7 @@ dotnet build Java.Interop.slnx Additional build options are documented [here][build-configuration]. -[build-configuration]: Documentation/BuildConfiguration.md +[build-configuration]: BuildConfiguration.md ## Feedback and Contributing diff --git a/external/Java.Interop/ThirdPartyNotices.txt b/Documentation/Java.Interop/ThirdPartyNotices.txt similarity index 100% rename from external/Java.Interop/ThirdPartyNotices.txt rename to Documentation/Java.Interop/ThirdPartyNotices.txt diff --git a/Documentation/README.md b/Documentation/README.md index 14e2a93b9fa..d1aabb82d4a 100644 --- a/Documentation/README.md +++ b/Documentation/README.md @@ -12,6 +12,7 @@ * [Submitting Bugs, Feature Requests, and Pull Requests][bugs] * [Directory Structure](project-docs/ExploringSources.md) * [Assembly store format](project-docs/AssemblyStores.md) + * [Java.Interop](Java.Interop/README.md) [bugs]: https://github.com/dotnet/android/wiki/Submitting-Bugs,-Feature-Requests,-and-Pull-Requests diff --git a/Localize/LocProject.json b/Localize/LocProject.json index 80934ab20f4..33925463357 100644 --- a/Localize/LocProject.json +++ b/Localize/LocProject.json @@ -7,7 +7,7 @@ "CopyOption": "LangIDOnName", "SourceFile": ".\\src\\Java.Interop.Localization\\Resources.resx", "OutputPath": ".\\src\\Java.Interop.Localization", - "LclFile": "external\\Java.Interop\\Localize\\loc\\{Lang}\\src\\Java.Interop.Localization\\Resources.resx.lcl" + "LclFile": "Localize\\loc\\{Lang}\\src\\Java.Interop.Localization\\Resources.resx.lcl" }, { "CopyOption": "LangIDOnName", diff --git a/external/Java.Interop/Localize/loc/cs/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/cs/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/cs/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/cs/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/Localize/loc/de/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/de/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/de/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/de/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/Localize/loc/es/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/es/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/es/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/es/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/Localize/loc/fr/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/fr/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/fr/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/fr/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/Localize/loc/it/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/it/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/it/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/it/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/Localize/loc/ja/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/ja/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/ja/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/ja/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/Localize/loc/ko/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/ko/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/ko/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/ko/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/Localize/loc/pl/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/pl/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/pl/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/pl/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/Localize/loc/pt-BR/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/pt-BR/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/pt-BR/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/pt-BR/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/Localize/loc/ru/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/ru/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/ru/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/ru/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/Localize/loc/tr/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/tr/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/tr/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/tr/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/Localize/loc/zh-Hans/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/zh-Hans/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/zh-Hans/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/zh-Hans/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/Localize/loc/zh-Hant/src/Java.Interop.Localization/Resources.resx.lcl b/Localize/loc/zh-Hant/src/Java.Interop.Localization/Resources.resx.lcl similarity index 100% rename from external/Java.Interop/Localize/loc/zh-Hant/src/Java.Interop.Localization/Resources.resx.lcl rename to Localize/loc/zh-Hant/src/Java.Interop.Localization/Resources.resx.lcl diff --git a/external/Java.Interop/.gitattributes b/external/Java.Interop/.gitattributes deleted file mode 100644 index abf257aea46..00000000000 --- a/external/Java.Interop/.gitattributes +++ /dev/null @@ -1,45 +0,0 @@ -# NOTE: this file is for git 1.6.6 (and possibly older) -# Post-1.7.2 there is eol and text, and crlf is deprecated -# but we can't depend on an unreleased version... - -# This file mainly controls line ending conversion behaviour, if -# the user has the setting core.autocrlf true. - -# The meaning of the attributes is a little odd -# -crlf means DO NOT convert line endings -# crlf means CONVERT to lf in the repo & Linux/Mac, crlf on Windows - -# slnx is XML, so use LF on all platforms -*.slnx text eol=lf -*.bat eol=crlf -*.cmd eol=crlf -*.rtf eol=crlf - -# Mostly generated by VS, so avoid extra noise -*.Designer.cs eol=crlf - -*.cs text -*.resx text -*.xlf text -*.xml text -*.md text -Makefile eol=lf -*.targets eol=crlf -*.proj eol=crlf -*.vcproj eol=crlf -*.vcxproj eol=crlf -*.csproj eol=crlf -*.shproj eol=crlf -*.projitems eol=crlf -*.tpnitems eol=crlf -*.wixproj eol=crlf -*.wxs eol=crlf -*.rtf eol=crlf - -# Gradle wrapper must stay LF on all platforms (executed under Bash on Unix) -gradlew eol=lf -*.properties eol=lf -*.kt eol=lf -*.kts eol=lf - -.github/workflows/*.lock.yml linguist-generated=true merge=ours \ No newline at end of file diff --git a/external/Java.Interop/.gitignore b/external/Java.Interop/.gitignore deleted file mode 100644 index f3996b884b5..00000000000 --- a/external/Java.Interop/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -bin -Configuration.Override.props -obj -JavaDeveloper-2013005_dp__11m4609.pkg -LocalJDK -TestResult.xml -TestResult-*.xml -lib/gendarme-* -gendarme.html -gendarme.xml -packages -.vs/ -.nuget/ -*.userprefs -*.user -Resource.designer.cs -*.binlog -*.rej -*.orig -*~