I am not sure if I fully understand. It sounds, not installation
$this->version
you should call instead
$this->project->setProperty('version', $version);
This will add the "version" property to your project instance. You will not need to set an attribute for your task, if you do not say, you will want to change later what property name will be set in your project (from the "version" to some other property).
`
<adhoc-task name="appversion" ><![CDATA[ class AppversionTask extends Task { function main() { $manifest = file_get_contents("manifest.json"); $manifest_json = json_decode($manifest); $version = $manifest_json->version; $this->log("App version: " . $version); $this->project->setProperty('version', $version); } } ]]></adhoc-task> <appversion /> <echo message="${version}" />
`
source share