build.gradle 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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.12'
  18. }
  19. project.ext {
  20. /* the ros plugin defines this, but since we're building the plugin... */
  21. rosMavenDeploymentRepository = "$System.env.ROS_MAVEN_DEPLOYMENT_REPOSITORY"
  22. rosMavenPath = "$System.env.ROS_MAVEN_PATH".split(':')
  23. rosMavenRepository = "$System.env.ROS_MAVEN_REPOSITORY"
  24. }
  25. allprojects {
  26. group='org.ros.rosjava_bootstrap'
  27. version = '0.1.24'
  28. }
  29. subprojects {
  30. /* Have to manually do this below since our gradle plugin is our sub project */
  31. apply plugin: 'java'
  32. apply plugin: 'maven'
  33. apply plugin: 'maven-publish'
  34. sourceCompatibility = 1.6
  35. targetCompatibility = 1.6
  36. repositories {
  37. mavenLocal()
  38. maven {
  39. url project.rosMavenRepository
  40. }
  41. mavenCentral()
  42. }
  43. if ( project.rosMavenDeploymentRepository != 'null' && project.rosMavenDeploymentRepository != '' ) {
  44. publishing {
  45. publications {
  46. mavenJava(MavenPublication) {
  47. from components.java
  48. }
  49. }
  50. repositories {
  51. maven {
  52. url 'file://' + project.rosMavenDeploymentRepository
  53. }
  54. }
  55. }
  56. }
  57. }
  58. defaultTasks 'install'