buildscript.gradle 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (C) 2014 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. rootProject.buildscript {
  17. //apply from: "https://github.com/rosjava/rosjava_bootstrap/raw/indigo/buildscript.gradle"
  18. //start
  19. rootProject.buildscript {
  20. String rosMavenPath = System.getenv("ROS_MAVEN_PATH")
  21. String rosMavenRepository = System.getenv("ROS_MAVEN_REPOSITORY")
  22. repositories {
  23. if (rosMavenPath != null) {
  24. rosMavenPath.tokenize(":").each { path ->
  25. maven {
  26. // We can't use uri() here because we aren't running inside something
  27. // that implements the Script interface.
  28. url "file:${path}"
  29. }
  30. }
  31. }
  32. maven {
  33. url "http://repository.springsource.com/maven/bundles/release"
  34. }
  35. maven {
  36. url "http://repository.springsource.com/maven/bundles/external"
  37. }
  38. if (rosMavenRepository != null) {
  39. maven {
  40. url rosMavenRepository
  41. }
  42. }
  43. maven {
  44. url "https://github.com/rosjava/rosjava_mvn_repo/raw/master"
  45. }
  46. mavenCentral()
  47. }
  48. dependencies {
  49. classpath "org.ros.rosjava_bootstrap:gradle_plugins:[0.2,0.3)"
  50. }
  51. }
  52. //end
  53. dependencies {
  54. classpath "com.android.tools.build:gradle:1.0.+"
  55. }
  56. }