build.gradle 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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.11"
  18. }
  19. buildscript {
  20. apply from: project.file("buildscript.gradle")
  21. }
  22. apply plugin: "catkin"
  23. allprojects {
  24. group "org.ros.android_core"
  25. version = project.catkin.pkg.version
  26. }
  27. configure(subprojects.findAll{ it.name.startsWith("android_") }) {
  28. apply plugin: "ros-android"
  29. afterEvaluate { project ->
  30. // Change the layout of Android projects to be compatible with Eclipse.
  31. android {
  32. sourceSets {
  33. main {
  34. manifest.srcFile "AndroidManifest.xml"
  35. res.srcDirs "res"
  36. assets.srcDirs "assets"
  37. java.srcDirs "src"
  38. }
  39. }
  40. // Copy JAR dependencies into the libs directory for Eclipse.
  41. task deployLibs(type: Copy) {
  42. from { configurations.compile }
  43. into { "${project.projectDir}/libs" }
  44. }
  45. // Exclude a few files that are duplicated across our dependencies and
  46. // prevent packaging Android applications.
  47. packagingOptions {
  48. exclude "META-INF/LICENSE.txt"
  49. exclude "META-INF/NOTICE.txt"
  50. }
  51. }
  52. }
  53. }