Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build nuget package, support netstandard2.0 build #4039

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Feb 18, 2024

Motivation

@cheese3660 and @jan-bures have expressed an interest in using some functionality from CKAN in a future update of the KSP2 mod SpaceWarp. Currently this would require them to compile it themselves, which is not very convenient or maintainable.

This dovetails with a longstanding aspiration to make CKAN's core DLL available on Nuget for mods.

Changes

  • Now the core DLL has a third target framework, netstandard2.0, because it is better for mods
  • Now the core DLL has properties to autogenerate a .nupkg file containing DLLs for net48, net7.0, and netstandard2.0
  • Now the Cake build script is updated to perform a separate all-platforms build for the core DLL on Linux, which is required for the .nupkg file to be created (Windows already handles it in the single build-everything pass that we're already doing)
  • Now once we define NUGET_API_KEY in this repo's secrets, it will be used to upload the generated .nupkg file to Nuget when we make a release

Fixes #1031.
Fixes #1037.
Fixes #1588.

Important note

We have no established commitment to follow SemVer with respect to the core DLL's public types. The only current versioning rule is that we increment the minor version when we change the metadata spec/schema in ways that older clients can't support, and the patch version otherwise (which is always even for stable releases and odd for dev builds).

We might choose to make such a commitment in the future, but be aware that for now, if you use this DLL, any public stuff might change from one version to the next, so you should only update its dependency version if you are prepared to fix an unknown number of compile errors.

@HebaruSan HebaruSan added Enhancement New features or functionality Core (ckan.dll) Issues affecting the core part of CKAN Build Issues affecting the build system Cake Issues affecting Cake labels Feb 18, 2024
@HebaruSan HebaruSan force-pushed the feature/netstandard2.0-nuget branch from 3d698b3 to c6d1fff Compare February 18, 2024 21:01
@HebaruSan HebaruSan merged commit d1387c3 into KSP-CKAN:master Feb 19, 2024
8 checks passed
@HebaruSan HebaruSan deleted the feature/netstandard2.0-nuget branch February 19, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Issues affecting the build system Cake Issues affecting Cake Core (ckan.dll) Issues affecting the core part of CKAN Enhancement New features or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CKAN on NuGet? Actually release ckan.dll Support ckan.dll use by KSP mods
1 participant