当前位置:网站首页>Ant Usage Summary (III): batch packaging apk

Ant Usage Summary (III): batch packaging apk

2022-06-23 06:00:00 linchaolong

Get ready


1. Get ready ant Environmental Science , and update engineering , Reference article >>ant Use summary ( One ): Use ant Automatic packaging apk

2.ant Implementing iterations in , Need to add ant-contrib-1.0b3.jar To classpath, Reference article >>ant Use summary ( Two ): Related command description


Project description


Demo Project address :https://coding.net/u/linchaolong/p/AntTest/git


Open the command line ,cd To the project root directory , perform ant run The command will start automatic batch packaging , All channel packages will be output to AntTestOut Next .AntTestTemp It is a cache project , The main purpose is not to affect the original project .


Source code



   

   
    
    
	
    
        
     
            
      
        
     
    
    
	
    
    
	
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    <script language="javascript">
            
    </script>
    
    
    
    
      
     
    
    
    
    
	
    
		
     
		
     
	
    
	
	
	
    
		
		
     
       Current channel id : ${channel}
     
		
		
     
       Copy Engineering ...
     
		
     
		
     
       Replace version number ...
     
		
     
		
     
       Replace package name ...
     
		
     
		
     
       Replace channel id ...
     
		
     
		
		
     
		
		
     
		
		
     
		
     
		
     
       Are packaged ...
     
        
     
        	
      
		    
      
        
     
        
     
       Output apk...
     
        
     
	
    
	
	
    
    
    
    
    	
     
    	
     
            
      
            	
       
            	
       
                
       
                
       
                
       
            
      
        
     
    
    
    
    
    
    
    
    	
     
      versionCode = ${versionCode}
                   
		
     
      versionName = ${versionName}
     
		
		
     
		
     
    
    
    
    
    
    
    
    	
     
    	
     
            
      
        
     
    
    
	
    
	
    
	
    
    
    
    
		
     
		
     
		
     
		
     
    
    
    
    
    
    
    
	    
     
    
    

    
    
    
    
	    
     
    
    

    
    
    
    
    	
     
    
    
    

   

It mainly provides replacement channel identification 、 Replace version number 、 Replace icon、 Replace package name function , And it's configurable .


How to use... In my project


1. Use android update project Command to update project configuration .

2. Copy custom_rules.xml Go to your own project , stay <property name="channelList" value="YIDONG,LIANTONG,DIANXIN,a360" /> Configure channel list , Use "," separate .

3. Open the command line ,cd Go to the project root , perform ant run command .




原网站

版权声明
本文为[linchaolong]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206230421395094.html