зеркало из https://github.com/xamarin/AndroidX.git
Merge pull request #316 from xamarin/improvements-javadocjar-javasourcejar
Improvements javadocjar javasourcejar
This commit is contained in:
Коммит
ada0ced14b
|
@ -50,8 +50,8 @@ jobs:
|
|||
|
||||
Checklist
|
||||
- [ ] Add any metadata needed to get PR to compile
|
||||
- [ ] Verify any new namespaces are properly renamed
|
||||
- [ ] Verify nuget/namespace spelling (spell-check.cake)
|
||||
- [ ] Verify any new namespaces are properly renamed (utilities.cake)
|
||||
- [ ] Verify nuget/namespace spelling (utilities.cake)
|
||||
- [ ] Locally generate diffs
|
||||
- [ ] Review any breaking changes
|
||||
- [ ] Attach diffs to PR
|
||||
|
|
32
build.cake
32
build.cake
|
@ -3,8 +3,8 @@
|
|||
#tool nuget:?package=vswhere&version=2.8.4
|
||||
|
||||
// Cake Addins
|
||||
#addin nuget:?package=Cake.FileHelpers&version=4.0.1
|
||||
#addin nuget:?package=Newtonsoft.Json&version=12.0.3
|
||||
#addin nuget:?package=Cake.FileHelpers&version=3.2.1
|
||||
#addin nuget:?package=Cake.MonoApiTools&version=3.0.5
|
||||
#addin nuget:?package=CsvHelper&version=12.2.1
|
||||
#addin nuget:?package=SharpZipLib&version=1.2.0
|
||||
|
@ -320,10 +320,13 @@ Task("binderate-config-verify")
|
|||
(
|
||||
() =>
|
||||
{
|
||||
using (StreamReader reader = System.IO.File.OpenText(@"./config.json"))
|
||||
if (!(binderator_json_array?.Count > 0))
|
||||
{
|
||||
JsonTextReader jtr = new JsonTextReader(reader);
|
||||
binderator_json_array = (JArray)JToken.ReadFrom(jtr);
|
||||
using (StreamReader reader = System.IO.File.OpenText(@"./config.json"))
|
||||
{
|
||||
JsonTextReader jtr = new JsonTextReader(reader);
|
||||
binderator_json_array = (JArray)JToken.ReadFrom(jtr);
|
||||
}
|
||||
}
|
||||
|
||||
Information("config.json verification...");
|
||||
|
@ -443,10 +446,13 @@ Task("binderate-fix")
|
|||
(
|
||||
() =>
|
||||
{
|
||||
using (StreamReader reader = System.IO.File.OpenText(@"./config.json"))
|
||||
if (!(binderator_json_array?.Count > 0))
|
||||
{
|
||||
JsonTextReader jtr = new JsonTextReader(reader);
|
||||
binderator_json_array = (JArray)JToken.ReadFrom(jtr);
|
||||
using (StreamReader reader = System.IO.File.OpenText(@"./config.json"))
|
||||
{
|
||||
JsonTextReader jtr = new JsonTextReader(reader);
|
||||
binderator_json_array = (JArray)JToken.ReadFrom(jtr);
|
||||
}
|
||||
}
|
||||
|
||||
Warning("config.json fixing missing folder strucutre ...");
|
||||
|
@ -485,6 +491,7 @@ Task("binderate-fix")
|
|||
}
|
||||
);
|
||||
|
||||
|
||||
// using System.Threading;
|
||||
// using Microsoft.Extensions.Logging;
|
||||
// using Microsoft.Extensions.Logging.Abstractions;
|
||||
|
@ -498,13 +505,16 @@ Task("binderate-nuget-check")
|
|||
(
|
||||
() =>
|
||||
{
|
||||
using (StreamReader reader = System.IO.File.OpenText(@"./config.json"))
|
||||
if (!(binderator_json_array?.Count > 0))
|
||||
{
|
||||
JsonTextReader jtr = new JsonTextReader(reader);
|
||||
binderator_json_array = (JArray)JToken.ReadFrom(jtr);
|
||||
using (StreamReader reader = System.IO.File.OpenText(@"./config.json"))
|
||||
{
|
||||
JsonTextReader jtr = new JsonTextReader(reader);
|
||||
binderator_json_array = (JArray)JToken.ReadFrom(jtr);
|
||||
}
|
||||
}
|
||||
|
||||
Warning("config.json fixing missing folder strucutre ...");
|
||||
Warning("config.json fixing missing folder structure ...");
|
||||
foreach(JObject jo in binderator_json_array[0]["artifacts"])
|
||||
{
|
||||
string groupId = (string) jo["groupId"];
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"msbuild-sdks":
|
||||
{
|
||||
"Microsoft.Build.Traversal": "2.1.1"
|
||||
"MSBuild.Sdk.Extras": "3.0.23",
|
||||
"Microsoft.Build.Traversal": "2.1.1",
|
||||
"Microsoft.Build.NoTargets": "2.0.1"
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
@using System.Linq
|
||||
<Project Sdk="MSBuild.Sdk.Extras/2.0.54">
|
||||
<Project Sdk="MSBuild.Sdk.Extras">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>MonoAndroid9.0</TargetFramework>
|
||||
<IsBindingProject>true</IsBindingProject>
|
||||
|
@ -31,12 +31,16 @@
|
|||
<NoWarn>0618;0109;0114;0628;0108;0809</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
@{
|
||||
int index = Model.NuGetVersion.LastIndexOf(".");
|
||||
string artifact_version = Model.NuGetVersion.Substring(0, index);
|
||||
}
|
||||
<PropertyGroup>
|
||||
<PackageId>@(Model.NuGetPackageId)</PackageId>
|
||||
<Title>Xamarin AndroidX - @(Model.Name)</Title>
|
||||
<Summary>Xamarin.Android bindings for AndroidX - @(Model.Name)</Summary>
|
||||
<Description>Xamarin.Android bindings for AndroidX - @(Model.Name)</Description>
|
||||
<PackageTags>Xamarin AndroidX Xamarin.AndroidX Support Google @(Model.Name)</PackageTags>
|
||||
<Description>Xamarin.Android bindings for AndroidX - @(Model.Name) artifact=@(Model.MavenGroupId):@(Model.Name) artifact_versioned=@(Model.MavenGroupId):@(Model.Name):@(artifact_version)</Description>
|
||||
<PackageTags>Xamarin AndroidX Xamarin.AndroidX Support Google @(Model.Name) artifact=@(Model.MavenGroupId):@(Model.Name) artifact_versioned=@(Model.MavenGroupId):@(Model.Name):@(artifact_version)</PackageTags>
|
||||
<Authors>Microsoft</Authors>
|
||||
<Owners>Microsoft</Owners>
|
||||
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
|
||||
|
@ -61,11 +65,19 @@
|
|||
}
|
||||
</ItemGroup>
|
||||
|
||||
@*<ItemGroup>
|
||||
@foreach (var art in @Model.MavenArtifacts) {
|
||||
<JavaSourceJar Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-sources.jar" Condition="Exists('..\..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-sources.jar')" />
|
||||
<ItemGroup>
|
||||
@foreach (var art in @Model.MavenArtifacts)
|
||||
{
|
||||
<JavaSourceJar
|
||||
Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-sources.jar"
|
||||
Condition="Exists('..\..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-sources.jar')"
|
||||
/>
|
||||
<JavaDocJar
|
||||
Include="..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-javadoc.jar"
|
||||
Condition="Exists('..\..\..\externals\@(art.MavenGroupId)\@(art.MavenArtifactId)-javadoc.jar')"
|
||||
/>
|
||||
}
|
||||
</ItemGroup>*@
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -401,6 +401,33 @@ Task ("read-analysis-files")
|
|||
}
|
||||
);
|
||||
|
||||
Task("dependencies")
|
||||
.Does
|
||||
(
|
||||
() =>
|
||||
{
|
||||
if (!(binderator_json_array?.Count > 0))
|
||||
{
|
||||
using (StreamReader reader = System.IO.File.OpenText(@"./config.json"))
|
||||
{
|
||||
JsonTextReader jtr = new JsonTextReader(reader);
|
||||
binderator_json_array = (JArray)JToken.ReadFrom(jtr);
|
||||
}
|
||||
}
|
||||
|
||||
Warning("config.json dependencies ...");
|
||||
foreach(JObject jo in binderator_json_array[0]["artifacts"])
|
||||
{
|
||||
string groupId = (string) jo["groupId"];
|
||||
string artifactId = (string) jo["artifactId"];
|
||||
string nugetId = (string) jo["nugetId"];
|
||||
string nugetVersion = (string) jo["nugetVersion"];
|
||||
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
Task ("Default")
|
||||
.IsDependentOn ("read-analysis-files")
|
||||
|
|
Загрузка…
Ссылка в новой задаче