From f800620dab41869fbe6a9a8365ef6c35175023dd Mon Sep 17 00:00:00 2001 From: Ryan Butler Date: Sun, 9 Feb 2025 00:05:35 -0500 Subject: [PATCH] build(Newtonsoft.Json): initial commit --- justfile | 5 ++- .../Newtonsoft.Json/Newtonsoft.Json.dll.meta | 2 ++ msbuild/Newtonsoft.Json/justfile | 32 +++++++++++++++++++ msbuild/Newtonsoft.Json/package.json | 9 ++++++ msbuild/Newtonsoft.Json/package.json.meta | 7 ++++ msbuild/SimpleBase/package.json | 4 ++- 6 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 msbuild/Newtonsoft.Json/Newtonsoft.Json.dll.meta create mode 100644 msbuild/Newtonsoft.Json/justfile create mode 100644 msbuild/Newtonsoft.Json/package.json create mode 100644 msbuild/Newtonsoft.Json/package.json.meta diff --git a/justfile b/justfile index b117bbb..83c5402 100644 --- a/justfile +++ b/justfile @@ -1,7 +1,7 @@ default: just --list -all: base128 simplebase bouncycastle +all: base128 bouncycastle newtonsoftjson simplebase base128: just msbuild/Base128/ @@ -9,5 +9,8 @@ base128: bouncycastle: just msbuild/BouncyCastle/ +newtonsoftjson: + just msbuild/Newtonsoft.Json/ + simplebase: just msbuild/SimpleBase/ diff --git a/msbuild/Newtonsoft.Json/Newtonsoft.Json.dll.meta b/msbuild/Newtonsoft.Json/Newtonsoft.Json.dll.meta new file mode 100644 index 0000000..aef2baf --- /dev/null +++ b/msbuild/Newtonsoft.Json/Newtonsoft.Json.dll.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: cafa44a2f38e84a2889ea4059a9ecbb6 \ No newline at end of file diff --git a/msbuild/Newtonsoft.Json/justfile b/msbuild/Newtonsoft.Json/justfile new file mode 100644 index 0000000..e4a78ef --- /dev/null +++ b/msbuild/Newtonsoft.Json/justfile @@ -0,0 +1,32 @@ +git_repo := "https://github.com/JamesNK/Newtonsoft.Json" +git_ref := "13.0.3" +dll_name := "Newtonsoft.Json.dll" +dotnet_framework := "netstandard2.0" +csproj_relative_path := "Src" / "Newtonsoft.Json" / "Newtonsoft.Json.csproj" +out_dir := invocation_directory() / "build" + +working_dir := `mktemp -d` +repo_dir := working_dir / "repo" +dotnet_artifact_dir := working_dir / "dotnet_artifacts" +upm_contents_dir := working_dir / "upm_contents" +csproj_path := repo_dir / csproj_relative_path + +default: assemble_upm + +# Clean build outputs +clean: + rm -rf {{working_dir}} + +clone: + git clone --single-branch --branch {{git_ref}} {{git_repo}} {{repo_dir}} + +build: clone + dotnet build {{csproj_path}} --configuration Release -o {{dotnet_artifact_dir}} --framework {{dotnet_framework}} + +assemble_upm: clone build && clean + mkdir -p {{upm_contents_dir}} + cp {{dotnet_artifact_dir / dll_name}} {{upm_contents_dir}} + cp package.json {{upm_contents_dir}} + cp *.meta {{upm_contents_dir}} + mkdir -p {{out_dir}} + npm pack --pack-destination {{out_dir}} {{upm_contents_dir}} diff --git a/msbuild/Newtonsoft.Json/package.json b/msbuild/Newtonsoft.Json/package.json new file mode 100644 index 0000000..894efa6 --- /dev/null +++ b/msbuild/Newtonsoft.Json/package.json @@ -0,0 +1,9 @@ +{ + "name": "org.basisvr.newtonsoft.json", + "version": "13.0.3", + "displayName": "Newtonsoft.Json", + "description": "High-performance JSON framework", + "documentationUrl": "https://github.com/JamesNK/Newtonsoft.Json", + "publishConfig": { "registry": "https://npm.pkg.github.com/@BasisVR" }, + "repository":"https://github.com/BasisVR/UpmBuilds" +} diff --git a/msbuild/Newtonsoft.Json/package.json.meta b/msbuild/Newtonsoft.Json/package.json.meta new file mode 100644 index 0000000..1ad55ba --- /dev/null +++ b/msbuild/Newtonsoft.Json/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bac349242521d4097adce8fb0ab726dc +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/msbuild/SimpleBase/package.json b/msbuild/SimpleBase/package.json index c4f4dad..84c189f 100644 --- a/msbuild/SimpleBase/package.json +++ b/msbuild/SimpleBase/package.json @@ -3,5 +3,7 @@ "version": "4.0.2", "displayName": "SimpleBase", "description": "Base16, Base32, Base58, Base85 encoding/decoding library", - "documentationUrl": "https://github.com/ssg/SimpleBase" + "documentationUrl": "https://github.com/ssg/SimpleBase", + "publishConfig": { "registry": "https://npm.pkg.github.com/@BasisVR" }, + "repository":"https://github.com/BasisVR/UpmBuilds" }