Changes between Version 4 and Version 5 of androidtest


Ignore:
Timestamp:
10/27/2014 12:25:53 PM (11 years ago)
Author:
liaojiaohe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • androidtest

    v4 v5  
    3434* 使用gradle新版测试的缺省目录是 androidTest 
    3535* 有些类比如ApplicationTestCase在API 17出现,所以编译的API要是用17以后的 
     36 
     37新版本的配置以volley项目为例子[[BR]] 
     38采用testApplicationId,路径 androidTest [[BR]] 
     39 
     40{{{ 
     41android { 
     42    compileSdkVersion 17 
     43    buildToolsVersion = 20 
     44    sourceSets { 
     45        defaultConfig { 
     46            testApplicationId 'com.android.volley.tests' 
     47        } 
     48 
     49        main { 
     50            assets.srcDirs = ['assets'] 
     51            res.srcDirs = ['res'] 
     52            aidl.srcDirs = ['src'] 
     53            resources.srcDirs = ['src'] 
     54            renderscript.srcDirs = ['src'] 
     55            java.srcDirs = ['src'] 
     56            manifest.srcFile 'AndroidManifest.xml' 
     57 
     58        } 
     59 
     60        androidTest.setRoot('tests') 
     61        androidTest.java.srcDirs = ['tests/src'] 
     62    } 
     63} 
     64}}}