build.gradle 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright (C) 2011 Google Inc.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. task wrapper(type: Wrapper) {
  17. gradleVersion = '1.5'
  18. }
  19. allprojects {
  20. group 'ros.android_core'
  21. version = '0.0.0-SNAPSHOT'
  22. }
  23. subprojects {
  24. if (name != 'docs') {
  25. repositories {
  26. mavenLocal()
  27. maven {
  28. url 'http://robotbrains.hideho.org/nexus/content/groups/ros-public'
  29. }
  30. }
  31. configurations.add('compile') {
  32. exclude group: 'junit'
  33. exclude group: 'xml-apis'
  34. }
  35. task deployLibs(type: Copy) {
  36. from { configurations.compile }
  37. into "${projectDir}/libs"
  38. }
  39. task clean << {
  40. ant.delete file: "${projectDir}/local.properties"
  41. ant.delete file: "${projectDir}/proguard-project.txt"
  42. ant.delete file: "${projectDir}/build.xml"
  43. ant.delete dir: "${projectDir}/bin"
  44. ant.delete dir: "${projectDir}/gen"
  45. ant.delete dir: "${projectDir}/libs"
  46. }
  47. task updateProject(type: Exec) {
  48. commandLine 'android', 'update', 'project', '-p', projectDir
  49. }
  50. task debug(type: Exec) {
  51. dependsOn updateProject, deployLibs
  52. commandLine 'ant', 'debug'
  53. }
  54. }
  55. }
  56. defaultTasks 'debug'