Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 558a3aa

Browse files
committed
Cherry pick tokenization of nuget dep versions
from master 6f2dad5
1 parent c1cc08e commit 558a3aa

File tree

6 files changed

+22
-13
lines changed

6 files changed

+22
-13
lines changed

arch-core/common/nuget/template.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<iconUrl>https://raw.githubusercontent.com/xamarin/AndroidSupportComponents/master/icons/arch-core-common_128x128.png</iconUrl>
1515
<dependencies>
1616
<group targetFramework="MonoAndroid80">
17-
<dependency id="Xamarin.Android.Support.Annotations" version="26.1.0" />
17+
<dependency id="Xamarin.Android.Support.Annotations" version="$com.android.support.support-annotations$" />
1818
</group>
1919
</dependencies>
2020
</metadata>

arch-core/runtime/nuget/template.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
<iconUrl>https://raw.githubusercontent.com/xamarin/AndroidSupportComponents/master/icons/arch-core-runtime_128x128.png</iconUrl>
1515
<dependencies>
1616
<group targetFramework="MonoAndroid80">
17-
<dependency id="Xamarin.Android.Support.Annotations" version="26.1.0" />
18-
<dependency id="Xamarin.Android.Arch.Core.Common" version="1.0.0" />
17+
<dependency id="Xamarin.Android.Support.Annotations" version="$com.android.support.support-annotations$" />
18+
<dependency id="Xamarin.Android.Arch.Core.Common" version="$android.arch.core.common$" />
1919
</group>
2020
</dependencies>
2121
</metadata>

arch-lifecycle/common/nuget/template.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<iconUrl>https://raw.githubusercontent.com/xamarin/AndroidSupportComponents/master/icons/arch-lifecycle-common_128x128.png</iconUrl>
1515
<dependencies>
1616
<group targetFramework="MonoAndroid80">
17-
<dependency id="Xamarin.Android.Support.Annotations" version="26.1.0" />
17+
<dependency id="Xamarin.Android.Support.Annotations" version="$com.android.support.support-annotations$" />
1818
</group>
1919
</dependencies>
2020
</metadata>

arch-lifecycle/extensions/nuget/template.nuspec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
<iconUrl>https://raw.githubusercontent.com/xamarin/AndroidSupportComponents/master/icons/arch-lifecycle-extensions_128x128.png</iconUrl>
1515
<dependencies>
1616
<group targetFramework="MonoAndroid80">
17-
<dependency id="Xamarin.Android.Support.Annotations" version="26.1.0" />
18-
<dependency id="Xamarin.Android.Support.Fragment" version="26.1.0" />
19-
<dependency id="Xamarin.Android.Arch.Lifecycle.Runtime" version="1.0.3" />
20-
<dependency id="Xamarin.Android.Arch.Lifecycle.Common" version="1.0.3" />
21-
<dependency id="Xamarin.Android.Arch.Core.Common" version="1.0.0" />
22-
<dependency id="Xamarin.Android.Arch.Core.Runtime" version="1.0.0" />
17+
<dependency id="Xamarin.Android.Support.Annotations" version="$com.android.support.support-annotations$" />
18+
<dependency id="Xamarin.Android.Support.Fragment" version="$com.android.support.support-fragment$" />
19+
<dependency id="Xamarin.Android.Arch.Lifecycle.Runtime" version="$android.arch.lifecycle.runtime$" />
20+
<dependency id="Xamarin.Android.Arch.Lifecycle.Common" version="$android.arch.lifecycle.common$" />
21+
<dependency id="Xamarin.Android.Arch.Core.Common" version="$android.arch.core.common$" />
22+
<dependency id="Xamarin.Android.Arch.Core.Runtime" version="$android.arch.core.runtime$" />
2323
</group>
2424
</dependencies>
2525
</metadata>

arch-lifecycle/runtime/nuget/template.nuspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
<iconUrl>https://raw.githubusercontent.com/xamarin/AndroidSupportComponents/master/icons/arch-lifecycle-runtime_128x128.png</iconUrl>
1515
<dependencies>
1616
<group targetFramework="MonoAndroid80">
17-
<dependency id="Xamarin.Android.Support.Annotations" version="26.1.0" />
18-
<dependency id="Xamarin.Android.Arch.Lifecycle.Common" version="1.0.1" />
19-
<dependency id="Xamarin.Android.Arch.Core.Common" version="1.0.0" />
17+
<dependency id="Xamarin.Android.Support.Annotations" version="$com.android.support.support-annotations$" />
18+
<dependency id="Xamarin.Android.Arch.Lifecycle.Common" version="$android.arch.lifecycle.common$" />
19+
<dependency id="Xamarin.Android.Arch.Core.Common" version="$android.arch.core.common$" />
2020
</group>
2121
</dependencies>
2222
</metadata>

build.cake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,15 @@ Task ("nuget-setup")
414414

415415
// Transform all template.nuspec files
416416
var nuspecText = FileReadText(art.PathPrefix + art.ArtifactId + "/nuget/template.nuspec");
417+
418+
// We use a pattern of $package.id.artifact.id$ as a placeholder in nuspec templates
419+
// which we want to substitute the actual nuget version into
420+
// So for example $com.android.support.support-compat$ would get replaced with the nuget version for Xamarin.Android.Support.Compat
421+
foreach (var artifactInfo in ARTIFACTS) {
422+
var placeholder = "$" + artifactInfo.Package + "." + artifactInfo.ArtifactId + "$";
423+
nuspecText = nuspecText.Replace(placeholder, artifactInfo.NuGetVersion);
424+
}
425+
417426
//nuspecText = nuspecText.Replace ("$xbdversion$", XBD_VERSION);
418427
var nuspecFile = new FilePath(art.PathPrefix + art.ArtifactId + "/nuget/" + art.NugetId + ".nuspec");
419428
FileWriteText(nuspecFile, nuspecText);

0 commit comments

Comments
 (0)