Skip to content

Commit 99f145f

Browse files
committed
Configured dependencies for other versions of Metalama.
1 parent ab9f64f commit 99f145f

File tree

2 files changed

+140
-32
lines changed

2 files changed

+140
-32
lines changed

src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/MetalamaDependencies.V2025_2.cs

Lines changed: 70 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) SharpCrafters s.r.o. See the LICENSE.md file in the root directory of this repository root for details.
22

33
using JetBrains.Annotations;
4+
using PostSharp.Engineering.BuildTools.Build;
45
using PostSharp.Engineering.BuildTools.ContinuousIntegration.Model;
56
using PostSharp.Engineering.BuildTools.Dependencies.Model;
67
using PostSharp.Engineering.BuildTools.Tools.TeamCity;
@@ -57,14 +58,6 @@ public MetalamaDependencyDefinition(
5758
UpstreamProductFamily = V2025_1.Family, DownstreamProductFamily = V2026_0.Family
5859
};
5960

60-
public static DependencyDefinition Consolidated { get; } =
61-
new MetalamaDependencyDefinition(
62-
ProductFamily.ConsolidatedProjectName,
63-
VcsProvider.AzureDevOps,
64-
null,
65-
false,
66-
customRepositoryName: "Metalama.Consolidated" );
67-
6861
// The release build is intentionally used for the debug configuration because we want dependencies to consume the release
6962
// build, for performance reasons. The debug build will be used only locally, and for this we don't need a configuration here.
7063
public static DependencyDefinition MetalamaCompiler { get; } =
@@ -108,6 +101,12 @@ public MetalamaDependencyDefinition(
108101
"Metalama.Testing.*",
109102
"Metalama.Tool",
110103
"Flashtrace*"
104+
],
105+
Dependencies =
106+
[
107+
DevelopmentDependencies.PostSharpEngineering,
108+
MetalamaCompiler.ToDependency(
109+
new ConfigurationSpecific<BuildConfiguration>( BuildConfiguration.Release, BuildConfiguration.Release, BuildConfiguration.Public ) )
111110
]
112111
};
113112

@@ -127,20 +126,37 @@ public MetalamaDependencyDefinition(
127126
"Metalama.Patterns.Caching.Backends.Azure",
128127
"Metalama.Patterns.Caching.Backends.Redis",
129128
"Metalama.Licensing"
130-
]
129+
],
130+
Dependencies = [DevelopmentDependencies.PostSharpEngineering, Metalama]
131131
};
132132

133133
public static DependencyDefinition MetalamaVsx { get; } =
134134
new MetalamaDependencyDefinition(
135135
"Metalama.Vsx",
136136
VcsProvider.AzureDevOps,
137-
null ) { PackagePatterns = ["Metalama.Repacked"] };
137+
null )
138+
{
139+
PackagePatterns = ["Metalama.Repacked"],
140+
Dependencies =
141+
[
142+
DevelopmentDependencies.PostSharpEngineering, Metalama,
143+
PostSharpDependencies.V2025_1.PostSharp.ToDependency( new ConfigurationSpecific<BuildConfiguration>(
144+
BuildConfiguration.Release,
145+
BuildConfiguration.Release,
146+
BuildConfiguration.Release ) )
147+
]
148+
};
138149

139150
public static DependencyDefinition MetalamaSamples { get; } =
140151
new MetalamaDependencyDefinition(
141152
"Metalama.Samples",
142153
VcsProvider.GitHub,
143-
MetalamaGitHubOrganization.Metalama ) { CodeStyle = "Metalama.Samples", PackagePatterns = ["Metalama.Documentation.QuickStart"] };
154+
MetalamaGitHubOrganization.Metalama )
155+
{
156+
CodeStyle = "Metalama.Samples",
157+
PackagePatterns = ["Metalama.Documentation.QuickStart"],
158+
Dependencies = [DevelopmentDependencies.PostSharpEngineering, MetalamaPremium]
159+
};
144160

145161
public static DependencyDefinition TimelessDotNetEngineer { get; } =
146162
new MetalamaDependencyDefinition(
@@ -152,14 +168,17 @@ public MetalamaDependencyDefinition(
152168
new MetalamaDependencyDefinition(
153169
"Metalama.Community",
154170
VcsProvider.GitHub,
155-
MetalamaGitHubOrganization.PostSharp );
171+
MetalamaGitHubOrganization.PostSharp ) { Dependencies = [DevelopmentDependencies.PostSharpEngineering, Metalama] };
156172

157173
public static DependencyDefinition MetalamaDocumentation { get; } =
158174
new MetalamaDependencyDefinition(
159175
"Metalama.Documentation",
160176
VcsProvider.GitHub,
161177
MetalamaGitHubOrganization.Metalama,
162-
false );
178+
false )
179+
{
180+
Dependencies = [DevelopmentDependencies.PostSharpEngineering, MetalamaSamples], SourceDependencies = [MetalamaSamples, MetalamaCommunity]
181+
};
163182

164183
public static DependencyDefinition NopCommerce { get; } =
165184
new MetalamaDependencyDefinition(
@@ -169,7 +188,7 @@ public MetalamaDependencyDefinition(
169188
false,
170189
parentCiProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}_MetalamaTests",
171190
vcsRootProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}",
172-
customBranch: $"dev/{Family.Version}" );
191+
customBranch: $"dev/{Family.Version}" ) { Dependencies = [DevelopmentDependencies.PostSharpEngineering, Metalama] };
173192

174193
public static DependencyDefinition DotNetSdkTests { get; } =
175194
new MetalamaDependencyDefinition(
@@ -178,13 +197,48 @@ public MetalamaDependencyDefinition(
178197
MetalamaGitHubOrganization.PostSharp,
179198
false,
180199
parentCiProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}_MetalamaTests",
181-
vcsRootProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}" );
200+
vcsRootProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}" )
201+
{
202+
Dependencies = [DevelopmentDependencies.PostSharpEngineering, MetalamaPremium]
203+
};
182204

183205
public static DependencyDefinition MetalamaPerformance { get; } =
184206
new MetalamaDependencyDefinition(
185207
"Metalama.Performance",
186208
VcsProvider.GitHub,
187209
MetalamaGitHubOrganization.PostSharp,
188-
false );
210+
false ) { Dependencies = [DevelopmentDependencies.PostSharpEngineering, Metalama] };
211+
212+
public static DependencyDefinition Consolidated { get; } =
213+
new MetalamaDependencyDefinition(
214+
ProductFamily.ConsolidatedProjectName,
215+
VcsProvider.AzureDevOps,
216+
null,
217+
false,
218+
customRepositoryName: "Metalama.Consolidated" )
219+
{
220+
Dependencies =
221+
[
222+
DevelopmentDependencies.PostSharpEngineering,
223+
MetalamaCompiler,
224+
Metalama,
225+
MetalamaCommunity,
226+
MetalamaPremium,
227+
MetalamaSamples,
228+
MetalamaDocumentation,
229+
MetalamaVsx
230+
],
231+
SourceDependencies =
232+
[
233+
MetalamaCompiler,
234+
Metalama,
235+
MetalamaCommunity,
236+
MetalamaPremium,
237+
MetalamaSamples,
238+
MetalamaDocumentation,
239+
MetalamaVsx,
240+
NopCommerce
241+
]
242+
};
189243
}
190244
}

src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/MetalamaDependencies.V2026_0.cs

Lines changed: 70 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) SharpCrafters s.r.o. See the LICENSE.md file in the root directory of this repository root for details.
22

33
using JetBrains.Annotations;
4+
using PostSharp.Engineering.BuildTools.Build;
45
using PostSharp.Engineering.BuildTools.ContinuousIntegration.Model;
56
using PostSharp.Engineering.BuildTools.Dependencies.Model;
67
using PostSharp.Engineering.BuildTools.Tools.TeamCity;
@@ -59,14 +60,6 @@ public MetalamaDependencyDefinition(
5960
// DownstreamProductFamily = V2026_1.Family
6061
};
6162

62-
public static DependencyDefinition Consolidated { get; } =
63-
new MetalamaDependencyDefinition(
64-
ProductFamily.ConsolidatedProjectName,
65-
VcsProvider.AzureDevOps,
66-
null,
67-
false,
68-
customRepositoryName: "Metalama.Consolidated" );
69-
7063
// The release build is intentionally used for the debug configuration because we want dependencies to consume the release
7164
// build, for performance reasons. The debug build will be used only locally, and for this we don't need a configuration here.
7265
public static DependencyDefinition MetalamaCompiler { get; } =
@@ -110,6 +103,12 @@ public MetalamaDependencyDefinition(
110103
"Metalama.Testing.*",
111104
"Metalama.Tool",
112105
"Flashtrace*"
106+
],
107+
Dependencies =
108+
[
109+
DevelopmentDependencies.PostSharpEngineering,
110+
MetalamaCompiler.ToDependency(
111+
new ConfigurationSpecific<BuildConfiguration>( BuildConfiguration.Release, BuildConfiguration.Release, BuildConfiguration.Public ) )
113112
]
114113
};
115114

@@ -129,20 +128,37 @@ public MetalamaDependencyDefinition(
129128
"Metalama.Patterns.Caching.Backends.Azure",
130129
"Metalama.Patterns.Caching.Backends.Redis",
131130
"Metalama.Licensing"
132-
]
131+
],
132+
Dependencies = [DevelopmentDependencies.PostSharpEngineering, Metalama]
133133
};
134134

135135
public static DependencyDefinition MetalamaVsx { get; } =
136136
new MetalamaDependencyDefinition(
137137
"Metalama.Vsx",
138138
VcsProvider.AzureDevOps,
139-
null ) { PackagePatterns = ["Metalama.Repacked"] };
139+
null )
140+
{
141+
PackagePatterns = ["Metalama.Repacked"],
142+
Dependencies =
143+
[
144+
DevelopmentDependencies.PostSharpEngineering, Metalama,
145+
PostSharpDependencies.V2025_1.PostSharp.ToDependency( new ConfigurationSpecific<BuildConfiguration>(
146+
BuildConfiguration.Release,
147+
BuildConfiguration.Release,
148+
BuildConfiguration.Release ) )
149+
]
150+
};
140151

141152
public static DependencyDefinition MetalamaSamples { get; } =
142153
new MetalamaDependencyDefinition(
143154
"Metalama.Samples",
144155
VcsProvider.GitHub,
145-
MetalamaGitHubOrganization.Metalama ) { CodeStyle = "Metalama.Samples", PackagePatterns = ["Metalama.Documentation.QuickStart"] };
156+
MetalamaGitHubOrganization.Metalama )
157+
{
158+
CodeStyle = "Metalama.Samples",
159+
PackagePatterns = ["Metalama.Documentation.QuickStart"],
160+
Dependencies = [DevelopmentDependencies.PostSharpEngineering, MetalamaPremium]
161+
};
146162

147163
public static DependencyDefinition TimelessDotNetEngineer { get; } =
148164
new MetalamaDependencyDefinition(
@@ -154,14 +170,17 @@ public MetalamaDependencyDefinition(
154170
new MetalamaDependencyDefinition(
155171
"Metalama.Community",
156172
VcsProvider.GitHub,
157-
MetalamaGitHubOrganization.PostSharp );
173+
MetalamaGitHubOrganization.PostSharp ) { Dependencies = [DevelopmentDependencies.PostSharpEngineering, Metalama] };
158174

159175
public static DependencyDefinition MetalamaDocumentation { get; } =
160176
new MetalamaDependencyDefinition(
161177
"Metalama.Documentation",
162178
VcsProvider.GitHub,
163179
MetalamaGitHubOrganization.Metalama,
164-
false );
180+
false )
181+
{
182+
Dependencies = [DevelopmentDependencies.PostSharpEngineering, MetalamaSamples], SourceDependencies = [MetalamaSamples, MetalamaCommunity]
183+
};
165184

166185
public static DependencyDefinition NopCommerce { get; } =
167186
new MetalamaDependencyDefinition(
@@ -171,7 +190,7 @@ public MetalamaDependencyDefinition(
171190
false,
172191
parentCiProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}_MetalamaTests",
173192
vcsRootProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}",
174-
customBranch: $"dev/{Family.Version}" );
193+
customBranch: $"dev/{Family.Version}" ) { Dependencies = [DevelopmentDependencies.PostSharpEngineering, Metalama] };
175194

176195
public static DependencyDefinition DotNetSdkTests { get; } =
177196
new MetalamaDependencyDefinition(
@@ -180,13 +199,48 @@ public MetalamaDependencyDefinition(
180199
MetalamaGitHubOrganization.PostSharp,
181200
false,
182201
parentCiProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}_MetalamaTests",
183-
vcsRootProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}" );
202+
vcsRootProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}" )
203+
{
204+
Dependencies = [DevelopmentDependencies.PostSharpEngineering, MetalamaPremium]
205+
};
184206

185207
public static DependencyDefinition MetalamaPerformance { get; } =
186208
new MetalamaDependencyDefinition(
187209
"Metalama.Performance",
188210
VcsProvider.GitHub,
189211
MetalamaGitHubOrganization.PostSharp,
190-
false );
212+
false ) { Dependencies = [DevelopmentDependencies.PostSharpEngineering, Metalama] };
213+
214+
public static DependencyDefinition Consolidated { get; } =
215+
new MetalamaDependencyDefinition(
216+
ProductFamily.ConsolidatedProjectName,
217+
VcsProvider.AzureDevOps,
218+
null,
219+
false,
220+
customRepositoryName: "Metalama.Consolidated" )
221+
{
222+
Dependencies =
223+
[
224+
DevelopmentDependencies.PostSharpEngineering,
225+
MetalamaCompiler,
226+
Metalama,
227+
MetalamaCommunity,
228+
MetalamaPremium,
229+
MetalamaSamples,
230+
MetalamaDocumentation,
231+
MetalamaVsx
232+
],
233+
SourceDependencies =
234+
[
235+
MetalamaCompiler,
236+
Metalama,
237+
MetalamaCommunity,
238+
MetalamaPremium,
239+
MetalamaSamples,
240+
MetalamaDocumentation,
241+
MetalamaVsx,
242+
NopCommerce
243+
]
244+
};
191245
}
192246
}

0 commit comments

Comments
 (0)