You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.gradle 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*******************************************************************************
  2. * Copyright (c) 2019 Contributors
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * http://www.eclipse.org/legal/epl-v10.html
  7. *******************************************************************************/
  8. apply plugin: 'java-library'
  9. if (!JavaVersion.current().isJava11Compatible()) {
  10. throw new GradleException("Run with with JDK 11 or newer.")
  11. }
  12. sourceSets {
  13. java11 {
  14. java {
  15. srcDirs = ['src/main/java11']
  16. }
  17. }
  18. moduleInfo {
  19. java {
  20. srcDirs = ['src/main/module-info']
  21. }
  22. }
  23. }
  24. compileJava {
  25. sourceCompatibility = 8
  26. targetCompatibility = 8
  27. }
  28. compileJava11Java {
  29. sourceCompatibility = 11
  30. targetCompatibility = 11
  31. }
  32. compileModuleInfoJava {
  33. sourceCompatibility = 11
  34. targetCompatibility = 11
  35. }
  36. jar {
  37. into('META-INF/versions/11') {
  38. from sourceSets.java11.output
  39. }
  40. into('') {
  41. from sourceSets.moduleInfo.output
  42. }
  43. manifest.attributes(
  44. 'Multi-Release': 'true',
  45. 'Main-Class': 'org.aspectj.JdkSpecific'
  46. )
  47. }