The error message is wrong; feel free to ignore it. I've filed https://code.google.com/p/android/issues/detail?id=73678 for this.
This lint message is trying to flag misplaced statements in build files, which happens quite often and tends to cause bizarre error messages when it does, but it just needs to be fine-tuned in this case. On Tue, Jul 15, 2014 at 2:55 PM, Nicolas Milliard <[email protected]> wrote: > I got the following lint issue: > > ``` > > *../../build.gradle > <http://mobiledev-mac-mini.local:8080/job/android-pull-request-2/13711/artifact/app/build.gradle>:278: > A `repositories` block doesn't belong here. * > *277 uploadArchives { * > *278 repositories { * > *279 mavenDeployer { * > *280 repository(url: '...') { * > > > > > *Priority: 2 / 10Category: CorrectnessSeverity: Error Explanation: Looks > for build file statements that belong elsewhere in the build file.Most > build file directives only make sense in certain contexts in the build > file. If you put a statement in the wrong place, you can get errors or > unexpected behavior.* > *```* > > The `repositories` block seams at the correct place though. > > Am I doing something wrong? > > Find below the full gradle task: > > *```* > *uploadArchives {* > * repositories {* > * mavenDeployer {* > * repository(url: 'https://.../nexus/content/repositories/releases') > {* > * authentication(userName: nexusUser, password: nexusPassword);* > * }* > * snapshotRepository(* > * url: 'https://.../nexus/content/repositories/snapshots') {* > * authentication(userName: nexusUser, password: nexusPassword);* > * }* > * pom.project {* > * artifactId 'android-app'* > * name 'Android app'* > * packaging 'apk'* > * }* > * }* > * }* > *}* > *```* > > -- > 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. > -- 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.
