android {
compileSdkVersion 17
buildToolsVersion "19.0.3"
buildTypes{
debug{
packageNameSuffix ".debug"
}
internal.initWith(buildTypes.debug)
internal{
packageNameSuffix ".internal"
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
debug {
manifest.srcFile 'debug/AndroidManifest.xml'
res.srcDirs = ['debug/res']
}
internal{
manifest.srcFile 'internal/AndroidManifest.xml'
res.srcDirs = ['internal/res']
}
}
defaultConfig {
minSdkVersion 15
targetSdkVersion 19
versionName "dev"
versionCode 1
}
* android.applicationVariants.all { variant ->*
* def oldFile = variant.packageApplication.outputFile;*
* def newFile = appName + "-" + variant.name
<http://variant.name/> + "-v" + variant.config.versionName + "(" +
variant.config.versionCode + ")"+ ".apk"*
* variant.packageApplication.outputFile = new File(oldFile.parent,
newFile)*
* }*
}
Note : i changed the it to ,
android.variantFilter { variant ->
flavor = variant.getDefaultConfig().versionName
code = variant.getDefaultConfig().versionCode
type = variant.getBuildType().name
def oldFile = variant.packageApplication.outputFile;
def newFile = appName + "-" + flavor + "-v" + type+ "(" +
code +")"+ ".apk"
variant.outputFile = new File(oldFile.parent, newFile)
}
But error on oldFile = variant.packageApplication.outputFile;
i tried with variant.outPath etc.. no such property.
Thanks in Advance!
On Thursday, 20 March 2014 21:26:05 UTC+5:30, Xavier Ducrohet wrote:
>
> The variant filter only indicates whether the variant will be created. It
> should not impact modifying the variant itself.
>
> You can provide you build.gradle so that we can look at it? We only need
> the variantFilter closure and the applicationVariants.all closure.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.