In the build.xml of ant, you want to get all the code files to generate a hash value, which is used to do guid.

currently guid generation is a string generated by time or randomly.
now wants to generate a hash value based on the code content as the guid
code content remains the same, the guid does not change. Otherwise, each build will generate a new guid

. < hr >
    <scriptdef name="generateguid" language="javascript">
        <attribute name="property" />
        <![CDATA[
        if(typeof importClass !== "undefined") {
            importClass( java.util.UUID );
            project.setProperty( attributes.get( "property" ), String( UUID.randomUUID() ).substring(0, 8) );
        } else {
            project.setProperty( attributes.get( "property" ), String( +new Date() ));
        }
        ]]>
    </scriptdef>

    <generateguid property="api_internal_reference" />
Feb.27,2021
Menu