Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
4a1a897
Rename properties to avoid namespace collisions, add more toggles
drewcassidy Jul 13, 2025
5fa2acd
fix syntax error
drewcassidy Jul 13, 2025
08ad322
Fix logic error double-importing system assemblies
drewcassidy Jul 14, 2025
31852ae
move references back where they belong, fix whitespace
drewcassidy Jul 14, 2025
b7d6a48
Fix tests
drewcassidy Jul 14, 2025
e2b205e
fix project path/name variables
drewcassidy Jul 14, 2025
cdc5ef6
fix test mod roots
drewcassidy Jul 14, 2025
ce6db03
oops
drewcassidy Jul 14, 2025
1c41d5f
Rename properties to begin with KSPBT
drewcassidy Jul 14, 2025
769b65e
add ability to declare mod dependencies with ModReference items
drewcassidy Jul 15, 2025
0b68619
Update changelog to reflect recent changes
drewcassidy Jul 16, 2025
96c6a69
Move references back to the targets file
drewcassidy Jul 16, 2025
a2a8bd1
Fix some bugs with CKAN install and tests
drewcassidy Jul 16, 2025
bd0a6ec
try something
drewcassidy Jul 18, 2025
e5bceff
add an sln
drewcassidy Jul 19, 2025
c68f3f1
More property renames and additions
drewcassidy Jul 20, 2025
81a8f40
fix ckan run target
drewcassidy Jul 21, 2025
65e7e78
fix ckan compatibility list in command
drewcassidy Jul 21, 2025
0898ecf
oops
drewcassidy Jul 21, 2025
b29fd6c
oops 2
drewcassidy Jul 21, 2025
159ae13
try something
drewcassidy Jul 21, 2025
9935d48
Try another thing
drewcassidy Jul 21, 2025
899869e
WHY
drewcassidy Jul 21, 2025
13c6577
OH NO
drewcassidy Jul 21, 2025
d809f3d
starting to understand this...
drewcassidy Jul 21, 2025
ede1af6
?
drewcassidy Jul 21, 2025
3d9007e
can I do this now?
drewcassidy Jul 21, 2025
1a2a80b
this might be cleaner?
drewcassidy Jul 21, 2025
0b82269
Try it out on more dotnet versions
drewcassidy Jul 21, 2025
cf333d2
move the last of the GameRoot logic to targets
drewcassidy Jul 22, 2025
a58bf43
Fix target dependency chain
drewcassidy Jul 22, 2025
72e8819
Move tests to ModReferences
drewcassidy Jul 22, 2025
105cc15
Make the stdlib avoidance thing conditional
drewcassidy Jul 24, 2025
b08da4a
Add default settings for the `Unity` configuration
drewcassidy Jul 24, 2025
cc7b850
Write more docs
drewcassidy Jul 24, 2025
7ec5f4d
Allow per-dependency disabling of attribute generation
drewcassidy Aug 6, 2025
d7421b7
Release 0.1.0-alpha.1
drewcassidy Aug 6, 2025
4147bc3
try this, see if it breaks anything
drewcassidy Oct 28, 2025
25a61cb
Fix verbosity setting
drewcassidy Oct 28, 2025
60b8167
Fix assetbundle test
drewcassidy Oct 28, 2025
a81f670
use dotnet nuget add source
drewcassidy Oct 28, 2025
2778355
try dotnet nuget restore
drewcassidy Oct 28, 2025
5d58022
Remove support for legacy csproj files
drewcassidy Oct 28, 2025
ed156a3
fix CI job
drewcassidy Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/compile/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ runs:
- name: Restore Mod Solution
shell: bash
working-directory: ${{ inputs.working-directory }}
run: nuget restore ${{ inputs.solution-file-path }} -Verbosity detailed
run: dotnet restore ${{ inputs.solution-file-path }} ${{ runner.debug && '-v:diagnostic' }}

- name: Build Mod Solution
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
dotnet msbuild -p:Configuration=${{ inputs.build-configuration }} \
-p:ManagedRelativePath=KSP_x64_Data/Managed ${{ inputs.solution-file-path }} \
${{ runner.debug && '-v:detailed' }}
-p:KSPBT_ManagedRelativePath=KSP_x64_Data/Managed ${{ inputs.solution-file-path }} \
${{ runner.debug && '-v:diagnostic' }}
5 changes: 1 addition & 4 deletions .github/workflows/internal-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,14 @@ jobs:
with:
package-version: ${{ needs.build.outputs.package-version }}

test-plugin-legacy:
uses: './.github/workflows/internal-test-plugin-legacy.yml'

test-assetbundle:
uses: './.github/workflows/internal-test-assetbundle.yml'
if: github.event_name != 'pull_request'
secrets: inherit

deploy:
runs-on: ubuntu-22.04
needs: [ build, test-plugin, test-plugin-nuget, test-plugin-legacy, test-assetbundle ]
needs: [ build, test-plugin, test-plugin-nuget, test-assetbundle ]
environment:
name: "NuGet"
url: "https://www.nuget.org/packages/KSPBuildTools"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/internal-test-assetbundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ jobs:

- uses: actions/checkout@v4
with:
repository: 'drewcassidy/Resurfaced'
repository: 'Tantares/Resurfaced'
ref: "v.1.3.1"
path: 'Resurfaced'

- uses: ./.github/actions/build-assetbundles
with:
assetbundle-name: foo.shab
asset-files: 'Resurfaced/*.shader Resurfaced/*.cginc'
asset-files: 'Resurfaced/Source/Shaders/*.shader Resurfaced/Source/Shaders/*.cginc'
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/internal-test-plugin-legacy.yml

This file was deleted.

11 changes: 8 additions & 3 deletions .github/workflows/internal-test-plugin-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ env:
NuGetDirectory: ${{ github.workspace}}/nuget

jobs:

build:
strategy:
matrix:
dotnet-version: [ 5.x, 7.x, 9.x ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand All @@ -26,7 +30,7 @@ jobs:
- name: Setup Nuget Package Sources
run: |
mkdir -p ${{ env.NuGetDirectory }}/local
nuget sources add -Name local -Source ${{ env.NuGetDirectory }}/local
dotnet nuget add source ${{ env.NuGetDirectory }}/local -n local

- uses: actions/download-artifact@v4
with:
Expand All @@ -39,11 +43,12 @@ jobs:
with:
ksp-zip-url: https://github.com/KSPModdingLibs/KSPLibs/raw/main/KSP-1.12.5.zip
working-directory: ${{ env.TESTDIR }}
solution-file-path: plugin-mod.csproj
solution-file-path: plugin-mod-nuget.csproj
dotnet-version: ${{ matrix.dotnet-version }}
env:
KSPBuildToolsVersion: ${{ inputs.package-version }}

- uses: ./.github/actions/assemble-release
with:
artifacts: ${{ env.TESTDIR }}/GameData
output-file-name: plugin-mod-nuget
output-file-name: plugin-mod-nuget-${{ matrix.dotnet-version }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
bin
obj
*.nupkg
packages

# docs
docs/_build

# misc
.DS_Store
.idea
*.user
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

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

## 0.1.0-alpha.1 - 2025-08-06

### Msbuild

- Renamed global msbuild properties to have the `KSPBT_` prefix to avoid namespace collisions with other frameworks
- `KSPRoot` is now `KSPBT_GameRoot`. It should no longer be referenced within a .csproj file
- `RepoRootPath` is now `KSPBT_ModRoot`, and should now point to the mod folder within GameData rather than the
root of a git repo
- `BinariesOutputRelativePath` is now `KSPBT_ModPluginFolder`
- `GenerateKSPAssemblyAttribute` is now `KSPBT_GenerateAssemblyAttribute` and defaults to true
- `GenerateKSPAssemblyDependencyAttributes` is now `KSPBT_GenerateDependencyAttributes` and defaults to true
- `ReferenceUnityAssemblies` is now `KSPBT_ReferenceUnityAssemblies`
- `ReferenceKSPAssemblies` is now `KSPBT_ReferenceGameAssemblies`
- Added the `KSPBT_ReferenceSystemAssemblies` property to control referencing the mono system DLLs within the KSP
managed folder. Setting this property to false will load the implicit framework DLLs instead.
- Mod dependencies should now be declared with
`ModReference` items. This avoids the need for the KSP install path to be known at evaluation time.


## 0.0.4 - 2025-06-15

### Library
Expand Down
2 changes: 1 addition & 1 deletion KSPBuildTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<NoWarn>1701;1702;CS0649;CS1591;NU5128</NoWarn>
<AssemblyCopyright>2024 KSPModdingLibs Contributors</AssemblyCopyright>
<AssemblyName>KSPBuildTools</AssemblyName>
<RepoRootPath>$(ProjectDir)</RepoRootPath>
<KSPBT_ModRoot>$(ProjectDir)</KSPBT_ModRoot>
<PackageId>KSPBuildTools</PackageId>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Title>KSP Build Tools</Title>
Expand Down
34 changes: 34 additions & 0 deletions KSPBuildTools.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KSPBuildTools", "KSPBuildTools.csproj", "{F5D90A2D-BF85-4849-9A1B-AD53EE814149}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "plugin-mod-legacy", "tests\plugin-mod-legacy\PluginModLegacy\plugin-mod-legacy.csproj", "{F19C7AB4-50C2-4378-9673-CC039CA12E10}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "plugin-mod-nuget", "tests\plugin-mod-nuget\plugin-mod-nuget.csproj", "{4F531716-DB82-4AD4-8270-DFB32EE18A41}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "plugin-mod", "tests\plugin-mod\plugin-mod.csproj", "{F0E30935-74A7-446F-A30C-5D1D0E525EC5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F5D90A2D-BF85-4849-9A1B-AD53EE814149}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5D90A2D-BF85-4849-9A1B-AD53EE814149}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5D90A2D-BF85-4849-9A1B-AD53EE814149}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F5D90A2D-BF85-4849-9A1B-AD53EE814149}.Release|Any CPU.Build.0 = Release|Any CPU
{F19C7AB4-50C2-4378-9673-CC039CA12E10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F19C7AB4-50C2-4378-9673-CC039CA12E10}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F19C7AB4-50C2-4378-9673-CC039CA12E10}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F19C7AB4-50C2-4378-9673-CC039CA12E10}.Release|Any CPU.Build.0 = Release|Any CPU
{4F531716-DB82-4AD4-8270-DFB32EE18A41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F531716-DB82-4AD4-8270-DFB32EE18A41}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F531716-DB82-4AD4-8270-DFB32EE18A41}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F531716-DB82-4AD4-8270-DFB32EE18A41}.Release|Any CPU.Build.0 = Release|Any CPU
{F0E30935-74A7-446F-A30C-5D1D0E525EC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0E30935-74A7-446F-A30C-5D1D0E525EC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0E30935-74A7-446F-A30C-5D1D0E525EC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0E30935-74A7-446F-A30C-5D1D0E525EC5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Loading