mockCompile is created when android.buildTypes.mock is parsed, so you need to move your dependencies {...} block after your android {...} block.
On Mon, Dec 30, 2013 at 12:39 PM, Prateek Srivastava <f2prat...@gmail.com>wrote: > I'm trying to mark a dependency only for a specific build type. Call this > build type mock (initialized with the debug configuration), so I expected a > configuration 'mockCompile' to be created. > > However I get an error " Could not find method mockCompile for > arguments[{...}] on project '<myproject>' > > (Using debugCompile or releaseCompile configurations work fine however) > > Is there any additional configuration required to get this to work? > > >> dependencies { >> ... >> mockCompile group: 'org.mockito', name: 'mockito-all', version: '1.9.+' >> } >> android { >> ... >> buildTypes { >> mock.initWith(buildTypes.debug) >> mock { >> packageNameSuffix ".mock" >> versionNameSuffix "-mock" >> } >> } >> } > > -- > 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 adt-dev+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- Xavier Ducrohet Android SDK Tech Lead Google Inc. http://developer.android.com | http://tools.android.com Please do not send me questions directly. Thanks! -- 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 adt-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.