Skip to content

Commit 774d077

Browse files
committed
Merge branch 'msbuild-refactor' into next
# Conflicts: # .github/actions/compile/action.yml # docs/msbuild/dependencies.md
2 parents d2a81b4 + 69d9e3b commit 774d077

27 files changed

Lines changed: 535 additions & 453 deletions

.github/actions/compile/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ runs:
6969
- name: Restore Mod Solution
7070
shell: bash
7171
working-directory: ${{ inputs.working-directory }}
72-
run: nuget restore ${{ inputs.solution-file-path }} -Verbosity detailed
72+
run: dotnet restore ${{ inputs.solution-file-path }} ${{ runner.debug && '-v:diagnostic' }}
7373

7474
- name: Build Mod Solution
7575
shell: bash
7676
working-directory: ${{ inputs.working-directory }}
77-
run: |
78-
dotnet msbuild -m:1 -p:Configuration=${{ inputs.build-configuration }} \
79-
-p:ManagedRelativePath=KSP_x64_Data/Managed ${{ inputs.solution-file-path }} \
80-
${{ runner.debug && '-v:detailed' }}
77+
run: >
78+
dotnet msbuild -m:1 -p:Configuration=${{ inputs.build-configuration }}
79+
-p:ManagedRelativePath=KSP_x64_Data/Managed ${{ inputs.solution-file-path }}
80+
${{ runner.debug && '-v:diagnostic' }}

.github/workflows/internal-ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
env:
2020
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
2121
DOTNET_NOLOGO: true
22-
runs-on: ubuntu-22.04
22+
runs-on: ubuntu-24.04
2323
outputs:
2424
package-version: ${{ steps.get-version.outputs.version }}
2525
steps:
@@ -60,17 +60,14 @@ jobs:
6060
with:
6161
package-version: ${{ needs.build.outputs.package-version }}
6262

63-
test-plugin-legacy:
64-
uses: './.github/workflows/internal-test-plugin-legacy.yml'
65-
6663
test-assetbundle:
6764
uses: './.github/workflows/internal-test-assetbundle.yml'
6865
if: github.event_name != 'pull_request'
6966
secrets: inherit
7067

7168
deploy:
7269
runs-on: ubuntu-22.04
73-
needs: [ build, test-plugin, test-plugin-nuget, test-plugin-legacy, test-assetbundle ]
70+
needs: [ build, test-plugin, test-plugin-nuget, test-assetbundle ]
7471
environment:
7572
name: "NuGet"
7673
url: "https://www.nuget.org/packages/KSPBuildTools"

.github/workflows/internal-test-assetbundle.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@ env:
1212

1313
jobs:
1414
build:
15-
runs-on: ubuntu-22.04
15+
runs-on: ubuntu-24.04
1616
steps:
1717
- uses: actions/checkout@v4
1818

1919
- uses: actions/checkout@v4
2020
with:
21-
repository: 'drewcassidy/Resurfaced'
21+
repository: 'Tantares/Resurfaced'
22+
ref: "v.1.3.1"
2223
path: 'Resurfaced'
2324

2425
- uses: ./.github/actions/build-assetbundles
2526
with:
2627
assetbundle-name: foo.shab
27-
asset-files: 'Resurfaced/*.shader Resurfaced/*.cginc'
28+
asset-files: 'Resurfaced/Source/Shaders/*.shader Resurfaced/Source/Shaders/*.cginc'
2829
env:
2930
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
3031
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}

.github/workflows/internal-test-plugin-legacy.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/internal-test-plugin-nuget.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ env:
1313
NuGetDirectory: ${{ github.workspace}}/nuget
1414

1515
jobs:
16+
1617
build:
17-
runs-on: ubuntu-22.04
18+
strategy:
19+
matrix:
20+
dotnet-version: [ 5.x, 7.x, 9.x ]
21+
runs-on: ubuntu-24.04
1822
steps:
1923
- uses: actions/checkout@v4
2024

@@ -26,7 +30,7 @@ jobs:
2630
- name: Setup Nuget Package Sources
2731
run: |
2832
mkdir -p ${{ env.NuGetDirectory }}/local
29-
nuget sources add -Name local -Source ${{ env.NuGetDirectory }}/local
33+
dotnet nuget add source ${{ env.NuGetDirectory }}/local -n local
3034
3135
- uses: actions/download-artifact@v4
3236
with:
@@ -39,11 +43,12 @@ jobs:
3943
with:
4044
ksp-zip-url: https://github.com/KSPModdingLibs/KSPLibs/raw/main/KSP-1.12.5.zip
4145
working-directory: ${{ env.TESTDIR }}
42-
solution-file-path: plugin-mod.csproj
46+
solution-file-path: plugin-mod-nuget.csproj
47+
dotnet-version: ${{ matrix.dotnet-version }}
4348
env:
4449
KSPBuildToolsVersion: ${{ inputs.package-version }}
4550

4651
- uses: ./.github/actions/assemble-release
4752
with:
4853
artifacts: ${{ env.TESTDIR }}/GameData
49-
output-file-name: plugin-mod-nuget
54+
output-file-name: plugin-mod-nuget-${{ matrix.dotnet-version }}

.github/workflows/internal-test-plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99

1010
jobs:
1111
build:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
steps:
1414
- uses: actions/checkout@v4
1515

.github/workflows/publish-to-spacedock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727

2828
jobs:
2929
publish-to-spacedock:
30-
runs-on: ubuntu-22.04
30+
runs-on: ubuntu-24.04
3131
steps:
3232
- name: get-release-info
3333
id: get-release-info

.github/workflows/validate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
validate:
9-
runs-on: ubuntu-22.04
9+
runs-on: ubuntu-24.04
1010
steps:
1111
- name: Checkout repo
1212
uses: actions/checkout@v4

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
bin
33
obj
44
*.nupkg
5+
packages
56

67
# docs
78
docs/_build
9+
10+
# misc
11+
.DS_Store
12+
.idea
13+
*.user

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
All notable changes to this project will be documented in this file
44

5+
## 0.1.0-alpha.1 - 2025-08-06
6+
7+
### Msbuild
8+
9+
- Renamed global msbuild properties to have the `KSPBT_` prefix to avoid namespace collisions with other frameworks
10+
- `KSPRoot` is now `KSPBT_GameRoot`. It should no longer be referenced within a .csproj file
11+
- `RepoRootPath` is now `KSPBT_ModRoot`, and should now point to the mod folder within GameData rather than the
12+
root of a git repo
13+
- `BinariesOutputRelativePath` is now `KSPBT_ModPluginFolder`
14+
- `GenerateKSPAssemblyAttribute` is now `KSPBT_GenerateAssemblyAttribute` and defaults to true
15+
- `GenerateKSPAssemblyDependencyAttributes` is now `KSPBT_GenerateDependencyAttributes` and defaults to true
16+
- `ReferenceUnityAssemblies` is now `KSPBT_ReferenceUnityAssemblies`
17+
- `ReferenceKSPAssemblies` is now `KSPBT_ReferenceGameAssemblies`
18+
- Added the `KSPBT_ReferenceSystemAssemblies` property to control referencing the mono system DLLs within the KSP
19+
managed folder. Setting this property to false will load the implicit framework DLLs instead.
20+
- Mod dependencies should now be declared with
21+
`ModReference` items. This avoids the need for the KSP install path to be known at evaluation time.
22+
23+
524
## 0.0.4 - 2025-06-15
625

726
### Library

0 commit comments

Comments
 (0)