buildscript.gradle 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. String rosMavenPath = System.getenv("ROS_MAVEN_PATH")
  18. String rosMavenRepository = System.getenv("ROS_MAVEN_REPOSITORY")
  19. repositories {
  20. // TODO(damonkohler): Specify a single local ROS repo only. We shouldn't
  21. // need multiple repos.
  22. if (rosMavenPath != null) {
  23. rosMavenPath.tokenize(":").each { path ->
  24. maven {
  25. // We can't use uri() here because we aren't running inside something
  26. // that implements the Script interface.
  27. url "file:${path}"
  28. }
  29. }
  30. }
  31. maven {
  32. url "http://repository.springsource.com/maven/bundles/release"
  33. }
  34. maven {
  35. url "http://repository.springsource.com/maven/bundles/external"
  36. }
  37. if (rosMavenRepository != null) {
  38. maven {
  39. url rosMavenRepository
  40. }
  41. } else {
  42. maven {
  43. url "https://github.com/rosjava/rosjava_mvn_repo/raw/master"
  44. }
  45. }
  46. mavenCentral()
  47. }
  48. dependencies {
  49. classpath "org.ros.rosjava_bootstrap:gradle_plugins:0.2.0"
  50. }
  51. }