2
0

build.gradle 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. import io.spring.gradle.IncludeRepoTask
  2. import trang.RncToXsd
  3. buildscript {
  4. dependencies {
  5. classpath libs.io.spring.javaformat.spring.javaformat.gradle.plugin
  6. classpath libs.io.spring.nohttp.nohttp.gradle
  7. classpath libs.io.freefair.gradle.aspectj.plugin
  8. classpath libs.org.jetbrains.kotlin.kotlin.gradle.plugin
  9. classpath libs.com.netflix.nebula.nebula.project.plugin
  10. }
  11. repositories {
  12. maven { url 'https://plugins.gradle.org/m2/' }
  13. }
  14. }
  15. apply plugin: 'io.spring.nohttp'
  16. apply plugin: 'locks'
  17. apply plugin: 's101'
  18. apply plugin: 'io.spring.convention.root'
  19. apply plugin: 'org.jetbrains.kotlin.jvm'
  20. apply plugin: 'org.springframework.security.versions.verify-dependencies-versions'
  21. apply plugin: 'io.spring.security.release'
  22. group = 'org.springframework.security'
  23. description = 'Spring Security'
  24. ext.snapshotBuild = version.contains("SNAPSHOT")
  25. ext.releaseBuild = version.contains("SNAPSHOT")
  26. ext.milestoneBuild = !(snapshotBuild || releaseBuild)
  27. repositories {
  28. mavenCentral()
  29. }
  30. springRelease {
  31. weekOfMonth = 3
  32. dayOfWeek = 1
  33. referenceDocUrl = "https://docs.spring.io/spring-security/reference/{version}/index.html"
  34. apiDocUrl = "https://docs.spring.io/spring-security/docs/{version}/api/"
  35. replaceSnapshotVersionInReferenceDocUrl = true
  36. }
  37. subprojects {
  38. plugins.withType(JavaPlugin) {
  39. java {
  40. sourceCompatibility=JavaVersion.VERSION_17
  41. }
  42. }
  43. tasks.withType(JavaCompile) {
  44. options.encoding = "UTF-8"
  45. options.compilerArgs.add("-parameters")
  46. }
  47. }
  48. allprojects {
  49. if (!['spring-security-bom', 'spring-security-docs'].contains(project.name)) {
  50. apply plugin: 'io.spring.javaformat'
  51. apply plugin: 'checkstyle'
  52. pluginManager.withPlugin("io.spring.convention.checkstyle", { plugin ->
  53. configure(plugin) {
  54. dependencies {
  55. checkstyle libs.io.spring.javaformat.spring.javaformat.checkstyle
  56. }
  57. checkstyle {
  58. toolVersion = '8.34'
  59. }
  60. }
  61. })
  62. if (project.name.contains('sample')) {
  63. tasks.whenTaskAdded { task ->
  64. if (task.name.contains('format') || task.name.contains('checkFormat') || task.name.contains("checkstyle")) {
  65. task.enabled = false
  66. }
  67. }
  68. }
  69. }
  70. tasks.withType(JavaCompile).configureEach {
  71. javaCompiler = javaToolchains.compilerFor {
  72. languageVersion = JavaLanguageVersion.of(17)
  73. }
  74. }
  75. }
  76. if (hasProperty('buildScan')) {
  77. buildScan {
  78. termsOfServiceUrl = 'https://gradle.com/terms-of-service'
  79. termsOfServiceAgree = 'yes'
  80. }
  81. }
  82. nohttp {
  83. source.exclude "buildSrc/build/**"
  84. source.builtBy(project(':spring-security-config').tasks.withType(RncToXsd))
  85. }
  86. tasks.register('cloneRepository', IncludeRepoTask) {
  87. repository = project.getProperties().get("repositoryName")
  88. ref = project.getProperties().get("ref")
  89. var defaultDirectory = project.file("build/tmp/clone")
  90. outputDirectory = project.hasProperty("cloneOutputDirectory") ? project.file("$cloneOutputDirectory") : defaultDirectory
  91. }
  92. s101 {
  93. repository = 'https://s101-pickup.s3.amazonaws.com'
  94. version = '7.0.24375'
  95. configurationDirectory = project.file("etc/s101")
  96. }