Skip to content

Commit 38f31a7

Browse files
authored
Support for Rider 2024.3 (#57)
* Upgrade Rimworld Dev Plugin to run in 2024.3 * Upgrade the gradle build to version 2 and migrate from gradle.build to gradle.build.kts * Cleaned up some unused gradle, removed specific user folders from the run config and help the build gradle find the correct MSBuild * Remove rdgen since I don't think it didn't actually have any use * Add a recommended CI workflow * Add a recommended CI workflow * Update CI workflow for Java Version and Use VSWhere in gradle file for MSBuild * Update the output name to not break on merges * Add caching on the `configure_java` job * Add an automated deploy task
1 parent f913656 commit 38f31a7

File tree

29 files changed

+516
-399
lines changed

29 files changed

+516
-399
lines changed

.github/workflows/CI.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Build:
7+
runs-on: windows-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
with:
11+
submodules: recursive
12+
- name: configure_java
13+
uses: actions/setup-java@v4
14+
with:
15+
distribution: 'corretto'
16+
java-version: '17'
17+
cache: 'gradle'
18+
- uses: actions/cache@v4
19+
with:
20+
path: |
21+
build/gradle-jvm
22+
~/.nuget/packages
23+
~/.gradle/caches
24+
~/.gradle/wrapper
25+
key: ${{ runner.os }}-Build-${{ hashFiles('gradlew.bat', 'src/dotnet/*/*.csproj', 'src/dotnet/*.props', 'gradle-wrapper.properties') }}
26+
- run: ./gradlew :buildPlugin --no-daemon
27+
- uses: actions/upload-artifact@v4
28+
if: always()
29+
with:
30+
name: ${{ github.event.repository.name }}.CI.${{ github.head_ref || github.ref_name }}
31+
path: output
32+
Test:
33+
runs-on: windows-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
with:
37+
submodules: recursive
38+
- name: configure_java
39+
uses: actions/setup-java@v4
40+
with:
41+
distribution: 'corretto'
42+
java-version: '17'
43+
cache: 'gradle'
44+
- uses: actions/cache@v4
45+
with:
46+
path: |
47+
build/gradle-jvm
48+
packages
49+
~/.nuget/packages
50+
~/.gradle/caches
51+
~/.gradle/wrapper
52+
key: ${{ runner.os }}-Test-${{ hashFiles('gradlew.bat', 'src/dotnet/*/*.csproj', 'src/dotnet/*.props', 'gradle-wrapper.properties') }}
53+
- run: ./gradlew :testDotNet --no-daemon

.github/workflows/Deploy.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- '*.*.*'
7+
8+
jobs:
9+
Publish:
10+
runs-on: windows-latest
11+
environment: Deploy
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
submodules: recursive
16+
- name: configure_java
17+
uses: actions/setup-java@v4
18+
with:
19+
distribution: 'corretto'
20+
java-version: '17'
21+
cache: 'gradle'
22+
- run: ./gradlew :publishPlugin -PBuildConfiguration="Release" -PPluginVersion="${{ github.ref_name }}" -PPublishToken="${{ secrets.PUBLISH_TOKEN }}"
23+
env:
24+
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
25+
- uses: actions/upload-artifact@v4
26+
if: always()
27+
with:
28+
name: ${{ github.event.repository.name }}.${{ github.ref_name }}
29+
path: output

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ build
55
output
66
.gradle
77
.tmp
8+
.intellijPlatform
89

910
# User-specific files
1011
*.suo

.idea/.idea.ReSharperPlugin.RimworldDev/.idea/runConfigurations/Rider__Frontend__Windows_.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.ReSharperPlugin.RimworldDev/.idea/runConfigurations/Rider__Windows_.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.ReSharperPlugin.RimworldDev/.idea/runConfigurations/rdgen__Windows_.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.run/Build Plugin.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
66
<option name="PASS_PARENT_ENVS" value="1" />
77
<envs>
8-
<env name="JAVA_HOME" value="C:\Users\Gareth\.jdks\corretto-16.0.2" />
8+
<env name="JAVA_HOME" value="$USER_HOME$\.jdks\corretto-17.0.7" />
99
</envs>
1010
<option name="USE_EXTERNAL_CONSOLE" value="0" />
1111
<method v="2">

build.gradle

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

0 commit comments

Comments
 (0)