mercredi 22 février 2017

Android testing release build

I tried to test the release build of the app. So I have added the below config to build.gradle of my app. But that didn't make any effect. Test always runs on debug build

android {
 compileSdkVersion 24
 buildToolsVersion "24.0.0"

defaultConfig {
  applicationId "com.****.****"
  minSdkVersion 15
  targetSdkVersion 22
  versionCode 1
  versionName "1.0 Beta"
  testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

testBuildType "release"

signingConfigs {
  release {
    keyAlias '******'
    keyPassword '*****'
    storeFile file('path to keystore')
    storePassword '*****'
  }
}

buildTypes {
  release {
    minifyEnabled true
    debuggable true
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    signingConfig signingConfigs.release
   }
   debug {
     multiDexEnabled true
   }
  }
}

When searched for answers in other SO thread I found testBuildType "release" will run test on release build but it did not work

Aucun commentaire:

Enregistrer un commentaire