Skip to content

Commit d6ca318

Browse files
committed
build(Newtonsoft.Json): initial commit
1 parent 2e8fd17 commit d6ca318

6 files changed

Lines changed: 57 additions & 2 deletions

File tree

justfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
default:
22
just --list
33

4-
all: base128 simplebase bouncycastle
4+
all: base128 bouncycastle newtonsoftjson simplebase
55

66
base128:
77
just msbuild/Base128/
88

99
bouncycastle:
1010
just msbuild/BouncyCastle/
1111

12+
newtonsoftjson:
13+
just msbuild/Newtonsoft.Json/
14+
1215
simplebase:
1316
just msbuild/SimpleBase/

msbuild/Newtonsoft.Json/Newtonsoft.Json.dll.meta

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

msbuild/Newtonsoft.Json/justfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
git_repo := "https://github.com/JamesNK/Newtonsoft.Json"
2+
git_ref := "13.0.3"
3+
dll_name := "Newtonsoft.Json.dll"
4+
dotnet_framework := "netstandard2.0"
5+
csproj_relative_path := "Src" / "Newtonsoft.Json" / "Newtonsoft.Json.csproj"
6+
out_dir := invocation_directory() / "build"
7+
8+
working_dir := `mktemp -d`
9+
repo_dir := working_dir / "repo"
10+
dotnet_artifact_dir := working_dir / "dotnet_artifacts"
11+
upm_contents_dir := working_dir / "upm_contents"
12+
csproj_path := repo_dir / csproj_relative_path
13+
14+
default: assemble_upm
15+
16+
# Clean build outputs
17+
clean:
18+
rm -rf {{working_dir}}
19+
20+
clone:
21+
git clone --single-branch --branch {{git_ref}} {{git_repo}} {{repo_dir}}
22+
23+
build: clone
24+
dotnet build {{csproj_path}} --configuration Release -o {{dotnet_artifact_dir}} --framework {{dotnet_framework}}
25+
26+
assemble_upm: clone build && clean
27+
mkdir -p {{upm_contents_dir}}
28+
cp {{dotnet_artifact_dir / dll_name}} {{upm_contents_dir}}
29+
cp package.json {{upm_contents_dir}}
30+
# cp *.meta {{upm_contents_dir}}
31+
mkdir -p {{out_dir}}
32+
npm pack --pack-destination {{out_dir}} {{upm_contents_dir}}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "org.basisvr.newtonsoft.json",
3+
"version": "13.0.3",
4+
"displayName": "Newtonsoft.Json",
5+
"description": "High-performance JSON framework",
6+
"documentationUrl": "https://github.com/JamesNK/Newtonsoft.Json",
7+
"publishConfig": { "registry": "https://npm.pkg.github.com/@BasisVR" },
8+
"repository":"https://github.com/BasisVR/UpmBuilds"
9+
}

msbuild/Newtonsoft.Json/package.json.meta

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

msbuild/SimpleBase/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
"version": "4.0.2",
44
"displayName": "SimpleBase",
55
"description": "Base16, Base32, Base58, Base85 encoding/decoding library",
6-
"documentationUrl": "https://github.com/ssg/SimpleBase"
6+
"documentationUrl": "https://github.com/ssg/SimpleBase",
7+
"publishConfig": { "registry": "https://npm.pkg.github.com/@BasisVR" },
8+
"repository":"https://github.com/BasisVR/UpmBuilds"
79
}

0 commit comments

Comments
 (0)