configure-artifacts.gradle 964 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * multidexlib2 - Copyright 2015-2020 Rodrigo Balerdi
  3. * (GNU General Public License version 3 or later)
  4. *
  5. * multidexlib2 is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published
  7. * by the Free Software Foundation, either version 3 of the License,
  8. * or (at your option) any later version.
  9. */
  10. java {
  11. withJavadocJar()
  12. withSourcesJar()
  13. }
  14. processResources {
  15. from(rootDir) {
  16. include 'README.txt'
  17. include 'NOTICE.txt'
  18. include 'LICENSE.txt'
  19. into 'META-INF/about'
  20. }
  21. }
  22. def sharedManifest = manifest {
  23. attributes(
  24. 'Implementation-Title': artifactName,
  25. 'Implementation-Version': version
  26. )
  27. }
  28. tasks.withType(Jar).configureEach {
  29. archiveBaseName.set mainArtifact
  30. manifest.from sharedManifest
  31. reproducibleFileOrder = true
  32. preserveFileTimestamps = false
  33. duplicatesStrategy = DuplicatesStrategy.FAIL
  34. }