MapsterMapper / MapsterMapper/Mapster
Unification build Properties
A pull request for this has already been merged.
- #889 by @DocSvartz — merged
- Dominant language
- C#
- Stars
- 5.2k
- Forks
- 410
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
@DocSvartz @andrerav Seeing all the repeating of Properties here I would like to suggest to:
- use `Directory.Packages.props` -> introduce CPM
- only one place we need to update
- Configurable along with the Variables of `Directory.Build.props` if you want to ensure to use specific versions of packages for projects like Source Generators or Test Projects (which by the way are missing the common `IsTestProject` Tag, which I added as suggestion to this PR directly)
- use `Directory.Build.props`
- Define NuGet Package Information Centrally - e.g. I found this here and copied it to [my own Repo + adjusted the Properties (Name, License etc.)](https://github.com/DevTKSS/DevTKSS.MyManufacturerERP/blob/d7fbc0f5aef82f526dd7e1e17a5f73dd4ee33d42/Directory.Build.props) I dont use it by now, so adding some other references:
- [First Example](https://github.com/unoplatform/uno.extensions/blob/main/src/Directory.Build.props)
- [Second Example](https://github.com/unoplatform/uno/blob/master/Directory.Build.props)
- source regular Project Props we need repentantly using Variables for example:
- `Directory.Build.props`
```xml
enable
enable
true
net10.0;net9.0;net8.0
Some Name;Some OtherName
```
- Regular `*.csproj`
```xml
$(DefaultTargetFrameworks)
Mapster
Mapster
$(Authors)
Library
```
- Update the Authors Entries?
Never seen those Names recently and @andrerav mentioned in the discussion, he is the only Maintainer except from @DocSvartz and @stagep (potentially missed one 😄 but you get what I mean hopefully) which I did not see in one of those Lists.
_Originally posted by @DevTKSS in https://github.com/MapsterMapper/Mapster/issues/841#issuecomment-3694104162_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing project files together with Directory.Build.props and Directory.Packages.props to identify repeated package, property, and author declarations. Compare the regular *.csproj files and test or source-generator projects against the proposed centralization. Done would mean the agreed properties and package versions are centralized consistently, with project-specific settings preserved; the scope should be confirmed because a related pull request was already merged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100