build.gradle 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. * Licensed to Elasticsearch under one or more contributor
  3. * license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright
  5. * ownership. Elasticsearch licenses this file to you under
  6. * the Apache License, Version 2.0 (the "License"); you may
  7. * not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. import org.elasticsearch.gradle.precommit.PrecommitTasks
  20. apply plugin: 'nebula.maven-base-publish'
  21. apply plugin: 'nebula.maven-scm'
  22. archivesBaseName = 'elasticsearch-nio'
  23. publishing {
  24. publications {
  25. nebula {
  26. artifactId = archivesBaseName
  27. }
  28. }
  29. }
  30. dependencies {
  31. compile "org.apache.logging.log4j:log4j-api:${versions.log4j}"
  32. testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
  33. testCompile "junit:junit:${versions.junit}"
  34. testCompile "org.hamcrest:hamcrest-all:${versions.hamcrest}"
  35. if (isEclipse == false || project.path == ":libs:elasticsearch-nio-tests") {
  36. testCompile("org.elasticsearch.test:framework:${version}") {
  37. exclude group: 'org.elasticsearch', module: 'elasticsearch-nio'
  38. }
  39. }
  40. }
  41. if (isEclipse) {
  42. // in eclipse the project is under a fake root, we need to change around the source sets
  43. sourceSets {
  44. if (project.path == ":libs:elasticsearch-nio") {
  45. main.java.srcDirs = ['java']
  46. main.resources.srcDirs = ['resources']
  47. } else {
  48. test.java.srcDirs = ['java']
  49. test.resources.srcDirs = ['resources']
  50. }
  51. }
  52. }
  53. forbiddenApisMain {
  54. // elasticsearch-nio does not depend on core, so only jdk signatures should be checked
  55. // es-all is not checked as we connect and accept sockets
  56. signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')]
  57. }
  58. //JarHell is part of es core, which we don't want to pull in
  59. jarHell.enabled=false
  60. thirdPartyAudit.excludes = [
  61. 'org/osgi/framework/AdaptPermission',
  62. 'org/osgi/framework/AdminPermission',
  63. 'org/osgi/framework/Bundle',
  64. 'org/osgi/framework/BundleActivator',
  65. 'org/osgi/framework/BundleContext',
  66. 'org/osgi/framework/BundleEvent',
  67. 'org/osgi/framework/SynchronousBundleListener',
  68. 'org/osgi/framework/wiring/BundleWire',
  69. 'org/osgi/framework/wiring/BundleWiring'
  70. ]