[Xamarin.Android.Build.Tasks] Fix @(JavaDocJar) (#5479) #5511
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.
Fixes: #2745
Issue #2745 noted that
@(JavaDocJar)didn't work; attempting to useit would result in an MSB3375 error:
This issue was subsequently hidden by 380e95e, which disabled the
_ExtractJavaDocJarstarget unless JDK 1.8 was being used.There were two problems with 380e95e:
The
_ExtractJavaDocJarstarget didn't need to be disabled!It just unzips the
.jar; it does not require JDK 1.8.The check for JDK 1.8 was bad, and was never True.
The only documentation-related functionality that needed to be
disabled because of JDK 11 was
@(JavaSourceJar), which got a betterfix in commits a7413a2 and 0e95ec7 [not relevant for d16-9].
Fix the
_ExtractJavaDocJarstarget so that it properly runs whenthere are any
@(JavaDocJar)items, then fix the_ExtractJavaDocJarstarget so that it doesn't emit an MSB3375 error.
Note:
@(JavaDocJar)is still problematic: it involves parsingJavadoc HTML, which contains numerous "dialects" (it's why the JDK 11
commit skipped
@(JavaSourceJar)support: trying to update our HTMLscrapers was "too fiddly").
Deprecate
@(JavaDocJar).Fix the
$(_JavadocSupported)test so that it is no longer alwaysfalse, by moving it's definition into a
_GetJavadocSupportedtarget. This allows
$(_JdkVersion)to be interpreted afterit is set.
Update the
BindingBuildTest.csinfrastructure so that instead ofhaving
.jarfiles encoded in Base64, we instead use@(EmbeddedResource)s for the.jarfiles. A newUpdateResourcestarget will update the appropriate
.jarfiles.