Thanks to fast response on the dotnet/cli gitter channel, you can. The following variables are available:
%publish:ProjectPath%
%publish:Configuration%
%publish:OutputPath%
%publish:TargetFramework%
%publish:FullTargetFramework%
%publish:Runtime%
Source
And here are the ones for pre/postcompile:
%compile:TargetFramework%
%compile:FullTargetFramework%
%compile:Configuration%
%compile:OutputFile%
%compile:OutputDir%
%compile:ResponseFile%
%compile:RuntimeOutputDir%
%compile:RuntimeIdentifier%
%compile:CompilerExitCode% // postcompile only
Source
project.json
is a black box unless one can find the source code and analyse it. – Mammal