Closed vanderheijden86 closed 3 years ago
From what I can see in the code it will actually always indeed create a new package.json file, instead of using the package.json file that lives in the directory (as one would expect from reading the docs):
private void configureSolidityResolve(Project target, DirectoryProperty nodeProjectDir) {
def resolveSolidity = target.tasks.create(
"resolveSolidity", SolidityResolve)
resolveSolidity.sources = resolvedSolidity.solidity
resolveSolidity.description = "Resolve external Solidity contract modules."
resolveSolidity.allowPaths = target.solidity.allowPaths
resolveSolidity.onlyIf {
target.solidity.resolvePackages
}
def packageJson = new File(nodeProjectDir.asFile.get(), "package.json")
resolveSolidity.packageJson = packageJson
}
Hi, thanks for reporting! It will be fixed in the next release 0.3.1.
Cheers
Hi there,
I have specified a custom nodeProjectDir like this:
I would expect the plugin to then to use the actual
package.json
file that lives inside that directory. Unfortunately, it simply overwrites the package.json with it's own generated package.json (with latest openzeppelin etc libraries). This prevents me from using a custom version of the openzeppelin contract. I believe I followed your README in this, but it works not as it is supposed to. But perhaps I am mistaken, would be grateful if you can help me out here.Thanks