Skip to content

Commit 6a5ce4c

Browse files
committed
Merge branch 'main' into dev/grendel/use-libc++
* main: [native] More C++ tweaks and changes (#9478) Add android-platform-support to .gitignore (#9590) [ci] Skip JDK install if near match is found in $(JI_JAVA_HOME) (#9585) Localized file check-in by OneLocBuild Task: Build definition ID 17928: Build ID 10653360 (#9587) Revert "Try dependabot max_length param (#9529)" Try dependabot max_length param (#9529) LEGO: Pull request (#9575) Bump to DevDiv/android-platform-support@52dd010a (#9553) Localized file check-in by OneLocBuild Task (#9574)
2 parents 5a4d188 + 7b7cd13 commit 6a5ce4c

File tree

18 files changed

+68
-38
lines changed

18 files changed

+68
-38
lines changed

.external

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
DevDiv/android-platform-support:main@c22e86517918f75cdf147b12252361d90c6577bd
1+
DevDiv/android-platform-support:main@52dd010acff1fa00d172609c231b7ee7b56b94a3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ apk-sizes-*.txt
2323
*~
2424
external/android-platform-support/
2525
external/monodroid/
26+
external/android-platform-support/
2627
external/mono/
2728
tests/api-compatibility/reference/*/*.dll
2829
tests/api-compatibility/reference/*/*.cs

Localize/loc/zh-Hant/src/Xamarin.Android.Build.Tasks/Properties/Resources.resx.lcl

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@
5454
</Str>
5555
<Disp Icon="Str" />
5656
</Item>
57+
<Item ItemId=";APT0005" ItemType="0;.resx" PsrId="211" Leaf="true">
58+
<Str Cat="Text">
59+
<Val><![CDATA[Invalid file name: Filenames cannot use Java reserved words.]]></Val>
60+
<Tgt Cat="Text" Stat="Loc" Orig="New">
61+
<Val><![CDATA[檔案名稱無效: 檔案名稱不能使用 JAVA 保留字。]]></Val>
62+
</Tgt>
63+
</Str>
64+
<Disp Icon="Str" />
65+
</Item>
5766
<Item ItemId=";APT2264" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
5867
<Str Cat="Text">
5968
<Val><![CDATA[This could be caused by the project exceeding the Windows maximum path length limitation. See https://learn.microsoft.com/dotnet/android/messages/apt2264 for details.]]></Val>
@@ -1223,10 +1232,13 @@
12231232
</Item>
12241233
<Item ItemId=";XA4236" ItemType="0;.resx" PsrId="211" InstFlg="true" Leaf="true">
12251234
<Str Cat="Text">
1226-
<Val><![CDATA[Cannot download Maven artifact '{0}:{1}'.]D;]A;- {2}: {3}]D;]A;- {4}: {5}]]></Val>
1235+
<Val><![CDATA[Cannot download Maven artifact '{0}:{1}'.]D;]A;{2}]]></Val>
12271236
<Tgt Cat="Text" Stat="Loc" Orig="New">
1228-
<Val><![CDATA[無法下載 Maven 成品 '{0}:{1}'。]D;]A;- {2}: {3}]D;]A;- {4}: {5}]]></Val>
1237+
<Val><![CDATA[無法下載 Maven 成品 '{0}:{1}'。]D;]A;{2}]]></Val>
12291238
</Tgt>
1239+
<Prev Cat="Text">
1240+
<Val><![CDATA[Cannot download Maven artifact '{0}:{1}'.]D;]A;- {2}: {3}]D;]A;- {4}: {5}]]></Val>
1241+
</Prev>
12301242
</Str>
12311243
<Disp Icon="Str" />
12321244
</Item>

build-tools/xaprepare/xaprepare/Scenarios/Scenario_AndroidTestDependencies.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ protected Scenario_AndroidTestDependencies (string name, string description)
1818
protected override void AddSteps (Context context)
1919
{
2020
Steps.Add (new Step_InstallDotNetPreview ());
21-
Steps.Add (new Step_InstallMicrosoftOpenJDK ());
21+
Steps.Add (new Step_InstallMicrosoftOpenJDK (allowJIJavaHomeMatch: true));
2222
Steps.Add (new Step_Android_SDK_NDK (AndroidSdkNdkType));
2323

2424
// disable installation of missing programs...

build-tools/xaprepare/xaprepare/Steps/Step_InstallAdoptOpenJDK.cs

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ abstract partial class Step_InstallOpenJDK : StepWithDownloadProgress, IBuildInv
2424
Path.Combine ("include", "jni.h"),
2525
};
2626

27-
public Step_InstallOpenJDK (string description)
27+
bool AllowJIJavaHomeMatch = false;
28+
29+
public Step_InstallOpenJDK (string description, bool allowJIJavaHomeMatch = false)
2830
: base (description)
29-
{}
31+
{
32+
AllowJIJavaHomeMatch = allowJIJavaHomeMatch;
33+
}
3034

3135
protected abstract string ProductName {get;}
3236
protected abstract string JdkInstallDir {get;}
@@ -55,7 +59,22 @@ protected override async Task<bool> Execute (Context context)
5559
return true;
5660
}
5761

58-
Log.StatusLine ($"{ProductName} {JdkVersion} r{JdkRelease} will be installed");
62+
// Check for a JDK installed on CI with a matching major version to use for test jobs
63+
var jiJavaHomeVarValue = Environment.GetEnvironmentVariable ("JI_JAVA_HOME");
64+
if (AllowJIJavaHomeMatch && Directory.Exists (jiJavaHomeVarValue)) {
65+
jdkInstallDir = jiJavaHomeVarValue;
66+
OpenJDKExistsAndIsValid (jdkInstallDir, out installedVersion);
67+
if (Version.TryParse (installedVersion, out Version? cversion) && cversion != null) {
68+
if (cversion.Major == JdkVersion.Major) {
69+
Log.Status ($"{ProductName} with version ");
70+
Log.Status (installedVersion ?? "Unknown", ConsoleColor.Yellow);
71+
Log.StatusLine (" already installed in: ", jdkInstallDir, tailColor: ConsoleColor.Cyan);
72+
return true;
73+
}
74+
}
75+
}
76+
77+
Log.StatusLine ($"{ProductName} {JdkVersion} r{JdkRelease} will be installed to {jdkInstallDir}");
5978
Uri jdkURL = JdkUrl;
6079
if (jdkURL == null)
6180
throw new InvalidOperationException ($"{ProductName} URL must not be null");
@@ -196,9 +215,9 @@ bool OpenJDKExistsAndIsValid (string installDir, out string? installedVersion)
196215
return false;
197216
}
198217

218+
installedVersion = cv;
199219
string xaVersionFile = Path.Combine (installDir, XAVersionInfoFile);
200220
if (!File.Exists (xaVersionFile)) {
201-
installedVersion = cv;
202221
Log.DebugLine ($"Unable to find .NET for Android version file {xaVersionFile}");
203222
return false;
204223
}
@@ -215,8 +234,6 @@ bool OpenJDKExistsAndIsValid (string installDir, out string? installedVersion)
215234
return false;
216235
}
217236

218-
installedVersion = $"{cv} r{rv}";
219-
220237
if (!Version.TryParse (cv, out Version? cversion) || cversion == null) {
221238
Log.DebugLine ($"Unable to parse {ProductName} version from: {cv}");
222239
return false;
@@ -271,8 +288,8 @@ class Step_InstallMicrosoftOpenJDK : Step_InstallOpenJDK {
271288

272289
const string _ProductName = "Microsoft OpenJDK";
273290

274-
public Step_InstallMicrosoftOpenJDK ()
275-
: base ($"Installing {_ProductName}")
291+
public Step_InstallMicrosoftOpenJDK (bool allowJIJavaHomeMatch = false)
292+
: base ($"Installing {_ProductName}", allowJIJavaHomeMatch)
276293
{
277294
}
278295

src/Xamarin.Android.Build.Tasks/Properties/Resources.cs.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Tato chyba je pravděpodobně způsobená problémem se souborem AndroidManifest
140140
<value>Neplatný název souboru: Musí začínat A–z, a–z nebo podtržítkem.</value>
141141
</data>
142142
<data name="APT0005" xml:space="preserve">
143-
<value>Invalid file name: Filenames cannot use Java reserved words.</value>
143+
<value>Neplatný název souboru: Názvy souborů nemůžou používat vyhrazená slova Java.</value>
144144
</data>
145145
<data name="XA0000_API_for_TargetFrameworkVersion" xml:space="preserve">
146146
<value>Nepovedlo se určit úroveň rozhraní API pro $(TargetFrameworkVersion) {0}.</value>
@@ -979,7 +979,7 @@ Pokud chcete pro sestavení z příkazového řádku použít vlastní cestu JDK
979979
{0} - A Maven artifact specification</comment>
980980
</data>
981981
<data name="XA4236" xml:space="preserve">
982-
<value>Cannot download Maven artifact '{0}:{1}'.
982+
<value>Nelze stáhnout artefakt Maven {0}:{1}.
983983
{2}</value>
984984
<comment>The following are literal names and should not be translated: Maven
985985
{0} - Maven artifact group id

src/Xamarin.Android.Build.Tasks/Properties/Resources.de.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Dieser Fehler wird wahrscheinlich durch ein Problem mit der Datei "AndroidManife
140140
<value>Ungültiger Dateiname: Er muss mit A-z oder a-z oder einem Unterstrich beginnen.</value>
141141
</data>
142142
<data name="APT0005" xml:space="preserve">
143-
<value>Invalid file name: Filenames cannot use Java reserved words.</value>
143+
<value>Ungültiger Dateiname: Dateinamen können keine reservierten Java-Wörter verwenden.</value>
144144
</data>
145145
<data name="XA0000_API_for_TargetFrameworkVersion" xml:space="preserve">
146146
<value>Die API-Ebene für $(TargetFrameworkVersion) {0} konnte nicht bestimmt werden.</value>
@@ -979,7 +979,7 @@ Um einen benutzerdefinierten JDK-Pfad für einen Befehlszeilenbuild zu verwenden
979979
{0} - A Maven artifact specification</comment>
980980
</data>
981981
<data name="XA4236" xml:space="preserve">
982-
<value>Cannot download Maven artifact '{0}:{1}'.
982+
<value>Das Maven-Artefakt „{0}:{1}“ kann nicht heruntergeladen werden.
983983
{2}</value>
984984
<comment>The following are literal names and should not be translated: Maven
985985
{0} - Maven artifact group id

src/Xamarin.Android.Build.Tasks/Properties/Resources.es.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Este error se debe probablemente a un problema con el archivo AndroidManifest.xm
140140
<value>Nombre de archivo no válido: debe comenzar con A-z o a-z o un guion bajo.</value>
141141
</data>
142142
<data name="APT0005" xml:space="preserve">
143-
<value>Invalid file name: Filenames cannot use Java reserved words.</value>
143+
<value>Nombre de archivo no válido: los nombres de archivo no pueden usar palabras reservadas de Java.</value>
144144
</data>
145145
<data name="XA0000_API_for_TargetFrameworkVersion" xml:space="preserve">
146146
<value>No se pudo determinar el nivel de API para $(TargetFrameworkVersion) de "{0}".</value>
@@ -979,7 +979,7 @@ Para usar una ruta de acceso de JDK personalizada para una compilación de líne
979979
{0} - A Maven artifact specification</comment>
980980
</data>
981981
<data name="XA4236" xml:space="preserve">
982-
<value>Cannot download Maven artifact '{0}:{1}'.
982+
<value>No se puede descargar el artefacto de Maven "{0}:{1}".
983983
{2}</value>
984984
<comment>The following are literal names and should not be translated: Maven
985985
{0} - Maven artifact group id

src/Xamarin.Android.Build.Tasks/Properties/Resources.fr.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Cette erreur est probablement due à un problème avec le fichier AndroidManifes
140140
<value>Nom de fichier non valide : il doit commencer par A-z, a-z ou un trait de soulignement.</value>
141141
</data>
142142
<data name="APT0005" xml:space="preserve">
143-
<value>Invalid file name: Filenames cannot use Java reserved words.</value>
143+
<value>Nom de fichier non valide : les noms de fichiers ne peuvent pas utiliser de mots réservés Java.</value>
144144
</data>
145145
<data name="XA0000_API_for_TargetFrameworkVersion" xml:space="preserve">
146146
<value>Impossible de déterminer le niveau d'API pour $(TargetFrameworkVersion) '{0}'.</value>
@@ -979,7 +979,7 @@ Pour utiliser un chemin JDK personnalisé pour une build de ligne de commande, d
979979
{0} - A Maven artifact specification</comment>
980980
</data>
981981
<data name="XA4236" xml:space="preserve">
982-
<value>Cannot download Maven artifact '{0}:{1}'.
982+
<value>Impossible de télécharger l’artefact Maven '{0}:{1}'.
983983
{2}</value>
984984
<comment>The following are literal names and should not be translated: Maven
985985
{0} - Maven artifact group id

src/Xamarin.Android.Build.Tasks/Properties/Resources.it.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Questo errore è probabilmente causato da un problema con il file di AndroidMani
140140
<value>Nome file non valido: deve iniziare con A-z, a-z o un carattere di sottolineatura.</value>
141141
</data>
142142
<data name="APT0005" xml:space="preserve">
143-
<value>Invalid file name: Filenames cannot use Java reserved words.</value>
143+
<value>Nome file non valido: i nomi di file non possono usare parole riservate in Java.</value>
144144
</data>
145145
<data name="XA0000_API_for_TargetFrameworkVersion" xml:space="preserve">
146146
<value>Non è stato possibile determinare il livello API per $(TargetFrameworkVersion) di '{0}'.</value>
@@ -979,7 +979,7 @@ Per usare un percorso JDK personalizzato per una compilazione della riga di coma
979979
{0} - A Maven artifact specification</comment>
980980
</data>
981981
<data name="XA4236" xml:space="preserve">
982-
<value>Cannot download Maven artifact '{0}:{1}'.
982+
<value>Non è possibile scaricare l'artefatto Maven '{0}:{1}'.
983983
{2}</value>
984984
<comment>The following are literal names and should not be translated: Maven
985985
{0} - Maven artifact group id

0 commit comments

Comments
 (0)