build.gradle 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (C) 2013 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. allprojects {
  20. group = "org.ros.rosjava_bootstrap"
  21. version = "0.2.0"
  22. }
  23. subprojects {
  24. apply plugin: "java"
  25. apply plugin: "maven"
  26. // These external repositories are copied from bootstrap.gradle.
  27. repositories {
  28. mavenCentral()
  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. }
  36. sourceCompatibility = 1.6
  37. targetCompatibility = 1.6
  38. // Configuration of the deployment repository is copied from the RosPlugin.
  39. String mavenDeploymentRepository = System.getenv("ROS_MAVEN_DEPLOYMENT_REPOSITORY")
  40. if (mavenDeploymentRepository != null &&
  41. mavenDeploymentRepository != "") {
  42. project.uploadArchives {
  43. repositories.mavenDeployer {
  44. repository(url: project.uri(mavenDeploymentRepository))
  45. }
  46. }
  47. } else {
  48. logger.warn("ROS_MAVEN_DEPLOYMENT_REPOSITORY is not set. Have you sourced setup.bash?")
  49. }
  50. }
  51. defaultTasks "uploadArchives"