From 0cad6086544a5ae42809e6e01b2c8c617da19431 Mon Sep 17 00:00:00 2001 From: Marcelo Fornet Date: Tue, 11 Oct 2022 20:37:14 +0200 Subject: [PATCH 1/2] Use stable near-sdk version. Closes #4 --- near-plugins/Cargo.toml | 2 +- near-plugins/tests/contracts/access_controllable/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/near-plugins/Cargo.toml b/near-plugins/Cargo.toml index 55e3054..e99513b 100644 --- a/near-plugins/Cargo.toml +++ b/near-plugins/Cargo.toml @@ -17,7 +17,7 @@ crate-type = ["cdylib", "rlib"] # proc-macro = true [dependencies] -near-sdk = "4.0.0-pre.5" +near-sdk = "4.0.0" near-plugins-derive = { path = "../near-plugins-derive" } serde = "1" diff --git a/near-plugins/tests/contracts/access_controllable/Cargo.toml b/near-plugins/tests/contracts/access_controllable/Cargo.toml index 00f4856..af234fb 100644 --- a/near-plugins/tests/contracts/access_controllable/Cargo.toml +++ b/near-plugins/tests/contracts/access_controllable/Cargo.toml @@ -9,7 +9,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] bitflags = "1.3" near-plugins = { path = "../../../../near-plugins" } -near-sdk = "4.0.0-pre.5" +near-sdk = "4.0.0" [profile.release] codegen-units = 1 From 1489edd7402ca9c196c36e891cf523815c2b0908 Mon Sep 17 00:00:00 2001 From: Marcelo Fornet Date: Tue, 11 Oct 2022 20:53:06 +0200 Subject: [PATCH 2/2] Use cargo workspace for package management Close #11 --- Cargo.toml | 32 ++++++++++++++++++++++++++++++++ near-plugins-derive/Cargo.toml | 17 +++++++++-------- near-plugins/Cargo.toml | 33 ++++++++++++--------------------- 3 files changed, 53 insertions(+), 29 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 58628dd..acb3996 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,3 +3,35 @@ members = [ "near-plugins", "near-plugins-derive" ] +exclude = ["target"] + +[workspace.metadata.workspaces] +version = "0.15.0" + +[workspace.package] +version = "0.1.0" +edition = "2021" +authors = ["Aurora Labs "] +rust-version = "1.64.0" +description = "Ergonomic plugin system to extend NEAR contracts." +license = "CC0-1.0" +readme = "README.md" +repository = "https://github.com/aurora-is-near/near-plugins" +homepage = "https://github.com/aurora-is-near/near-plugins" +keywords = ["near", "smart contract", "plugin"] + +[workspace.dependencies] +near-sdk = "4.0.0" +near-plugins-derive = { path = "near-plugins-derive" } +serde = "1" +anyhow = "1.0" +borsh = "0.9" +tokio = { version = "1", features = ["full"] } +# Feature `unstable` is required for compiling contracts during tests. +workspaces = { version = "0.6", features = ["unstable"] } +toml = "0.5" +darling = "0.13.1" +proc-macro2 = "1.0" +quote = "1.0.9" +syn = { version = "1.0.69", features = ["full"] } +proc-macro-crate = "0.1.5" diff --git a/near-plugins-derive/Cargo.toml b/near-plugins-derive/Cargo.toml index 9355de9..aeee324 100644 --- a/near-plugins-derive/Cargo.toml +++ b/near-plugins-derive/Cargo.toml @@ -1,15 +1,16 @@ [package] name = "near-plugins-derive" -version = "0.1.0" -authors = ["Marcelo Fornet "] -edition = "2021" +authors.workspace = true +edition.workspace = true +rust-version.workspace = true +version.workspace = true [lib] proc-macro = true [dependencies] -darling = "0.13.1" -proc-macro2 = "1.0" -quote = "1.0.9" -syn = { version = "1.0.69", features = ["full"] } -proc-macro-crate = "0.1.5" +darling.workspace = true +proc-macro2.workspace = true +quote.workspace = true +syn.workspace = true +proc-macro-crate.workspace = true diff --git a/near-plugins/Cargo.toml b/near-plugins/Cargo.toml index e99513b..16a0126 100644 --- a/near-plugins/Cargo.toml +++ b/near-plugins/Cargo.toml @@ -1,30 +1,21 @@ [package] name = "near-plugins" -version = "0.1.0" -authors = ["Marcelo Fornet "] -edition = "2021" -license = "CC0-1.0" -readme = "README.md" -repository = "https://github.com/aurora-is-near/near-plugins" -homepage = "https://github.com/aurora-is-near/near-plugins" -description = """ -Plugin system to extend NEAR contracts easily. -""" -keywords = ["near", "smart contract", "plugin"] +authors.workspace = true +edition.workspace = true +rust-version.workspace = true +version.workspace = true [lib] crate-type = ["cdylib", "rlib"] -# proc-macro = true [dependencies] -near-sdk = "4.0.0" -near-plugins-derive = { path = "../near-plugins-derive" } -serde = "1" +near-sdk.workspace = true +near-plugins-derive.workspace = true +serde.workspace = true [dev-dependencies] -anyhow = "1.0" -borsh = "0.9" -tokio = { version = "1", features = ["full"] } -# Feature `unstable` is required for compiling contracts during tests. -workspaces = { version = "0.6", features = ["unstable"] } -toml = "0.5" +anyhow.workspace = true +borsh.workspace = true +tokio.workspace = true +workspaces.workspace = true +toml.workspace = true