buildscript.gradle 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. if (rosMavenPath != null) {
  21. rosMavenPath.tokenize(":").each { path ->
  22. maven {
  23. // We can't use uri() here because we aren't running inside something
  24. // that implements the Script interface.
  25. url "file:${path}"
  26. }
  27. }
  28. }
  29. maven {
  30. url "http://repository.springsource.com/maven/bundles/release"
  31. }
  32. maven {
  33. url "http://repository.springsource.com/maven/bundles/external"
  34. }
  35. if (rosMavenRepository != null) {
  36. maven {
  37. url rosMavenRepository
  38. }
  39. }
  40. maven {
  41. url "https://github.com/rosjava/rosjava_mvn_repo/raw/master"
  42. }
  43. mavenCentral()
  44. }
  45. dependencies {
  46. classpath "org.ros.rosjava_bootstrap:gradle_plugins:[0.2,0.3)"
  47. }
  48. }