🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# B.2 AdhocTypedefTask The AdhocTypedefTask allows you to define a datatype within your build file. Note that you should use <!\[CDATA\[ ... \]\]> so that you don't have to quote entities within your` <adhoc-type></adhoc-type>` tags. Table B.2:聽Attributes NameTypeDescriptionDefaultRequired`name``String`Name of XML tag that will represent this datatype..n/aYes B.2.1 Example ``` <target name="main" description="==>test AdhocType"> <adhoc-type name="dsn"><![CDATA[ class CreoleDSN extends DataType { private $url; function setUrl($url) { $this->url = $url; } function getUrl() { return $this->url; } } ]]></adhoc-type> <!-- creole-sql task doesn't exist; just an example --> <creole-sql file="test.sql"> <dsn url="mysql://root@localhost/test"/> </creole-sql> </target> ```