i want rename package name using gradle on cmd.because have multiple project customization , change package name using ide difficult change each package name separately.please give me solution.thanks in advance
apply plugin: 'com.android.application' apply plugin: 'maven' android { compilesdkversion 21 buildtoolsversion "23.0.0 rc2" sourcesets { defaultconfig { applicationid "com.appbell.restaurant.genericresto" minsdkversion 14 targetsdkversion 19 compileoptions { sourcecompatibility javaversion.version_1_7 targetcompatibility javaversion.version_1_7 } } main { manifest.srcfile 'src\\main\\androidmanifest.xml' println('android'+manifest.srcfile) } } buildtypes { release { minifyenabled true proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.txt' } } } task changepackage{ replaceinmanifest("com.appbell.restaurant.example","com.appbell.imenu4u") } buildscript { repositories { mavencentral() } dependencies { // make sure @ least 0.10.+ classpath 'com.android.tools.build:gradle:1.0.+' } } task appstart(type: exec, dependson: 'installdebug') { // linux //commandline 'adb', 'shell', 'am', 'start', '-n', 'com.example/.myactivity' // windows commandline 'cmd', '/c', 'adb', 'shell', 'am', 'start', '-n', 'com.appbell.restaurant.genericresto/com.appbell.and.resto.and.ui.splashactivity' } dependencies { compile project(':facebook') compile project(':stripe') compile 'com.google.android.gms:play-services:+' compile 'com.android.support:appcompat-v7:21.0.3' compile files('libs/mobileappclasses.jar') compile files('libs/pgsdk.jar') } def replaceinmanifest(fromstring, tostring) { def manifestfile = "c:\\users\\ntin gorle\\androidstudioprojects\\myapplication\\restoappnew\\src\\main\\androidmanifest.xml" def updatedcontent = new file(manifestfile).gettext('utf-8').replaceall(fromstring, tostring) new file(manifestfile).write(updatedcontent, 'utf-8') } i code package name change not reflect in .java file.please tell me how change in .java classes.
Comments
Post a Comment