<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## 1.設置ant屬性 build.xml: ~~~ <project> <target name="hello"> <echo>buildDir=${buildDir}</echo> </target> </project> ~~~ 我們要給buildDir屬性設值 ~~~ ant.importBuild ('build.xml'){ antTargetName ->'a-'+antTargetName } task intro << { println 'Hello,from gradle' } ant.buildDir = buildDir ant.properties.buildDir = buildDir ant.properties['buildDir'] = buildDir ant.property(name:'buildDir',location:buildDir) ~~~ ## 2.獲取ant屬性值 build.xml中定義屬性: ~~~ <project> <property name="antProp" value="a property defined in an Ant build"/> <target name="hello"> <echo>buildDir=${buildDir}</echo> </target> </project> ~~~ gradle.xml獲取屬性 ~~~ ant.importBuild ('build.xml'){ antTargetName ->'a-'+antTargetName } task intro << { println 'Hello,from gradle' } ant.buildDir = buildDir ant.properties.buildDir = buildDir ant.properties['buildDir'] = buildDir ant.property(name:'buildDir',location:buildDir) println ant.antProp ~~~ 執行gradle命令,輸出如下: ~~~ qianhuis-Mac-mini:0112 qianhui$ gradle intro a property defined in an Ant build :intro Hello,from gradle BUILD SUCCESSFUL Total time: 3.253 secs ~~~ ## 3.設置reference的值 build.xml ~~~ <project> <property name="antProp" value="a property defined in an Ant build"/> <path refid="classpath"/> <target name="hello"> <echo>buildDir=${buildDir}</echo> </target> </project> ~~~ 最后三行是設置代碼 ~~~ ant.importBuild ('build.xml'){ antTargetName ->'a-'+antTargetName } task intro << { println 'Hello,from gradle' } ant.buildDir = buildDir ant.properties.buildDir = buildDir ant.properties['buildDir'] = buildDir ant.property(name:'buildDir',location:buildDir) println ant.antProp ant.path(id:'classpath',location:'libs') ant.references.classpath = ant.path(location:'libs') ant.references['classpath'] = ant.path(location:'libs') ~~~ ## 4.獲取reference的值 build.xml ~~~ <project> <property name="antProp" value="a property defined in an Ant build"/> <path refid="classpath"/> <path id="antPath" location="libs"/> <target name="hello"> <echo>buildDir=${buildDir}</echo> </target> </project> ~~~ build.gradle ~~~ ant.importBuild ('build.xml'){ antTargetName ->'a-'+antTargetName } task intro << { println 'Hello,from gradle' } ant.buildDir = buildDir ant.properties.buildDir = buildDir ant.properties['buildDir'] = buildDir ant.property(name:'buildDir',location:buildDir) println ant.antProp ant.path(id:'classpath',location:'libs') ant.references.classpath = ant.path(location:'libs') ant.references['classpath'] = ant.path(location:'libs') println ant.references.antPath println ant.references['antPath'] ~~~ 輸出如下: ~~~ qianhuis-Mac-mini:0112 qianhui$ gradle intro a property defined in an Ant build /Users/qianhui/Documents/Developer/gradle_project/0112/libs /Users/qianhui/Documents/Developer/gradle_project/0112/libs :intro Hello,from gradle BUILD SUCCESSFUL Total time: 3.001 secs ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看