| 
									
										
										
										
											2022-09-14 21:40:08 +08:00
										 |  |  | import io.spring.gradle.IncludeRepoTask | 
					
						
							| 
									
										
										
										
											2023-08-18 23:35:46 +08:00
										 |  |  | import trang.RncToXsd | 
					
						
							| 
									
										
										
										
											2022-09-14 21:40:08 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-06-21 00:40:54 +08:00
										 |  |  | buildscript { | 
					
						
							| 
									
										
										
										
											2015-03-24 00:14:26 +08:00
										 |  |  | 	dependencies { | 
					
						
							| 
									
										
										
										
											2023-09-28 02:42:42 +08:00
										 |  |  | 		classpath libs.io.spring.javaformat.spring.javaformat.gradle.plugin | 
					
						
							|  |  |  | 		classpath libs.io.spring.nohttp.nohttp.gradle | 
					
						
							|  |  |  | 		classpath libs.io.freefair.gradle.aspectj.plugin | 
					
						
							|  |  |  | 		classpath libs.org.jetbrains.kotlin.kotlin.gradle.plugin | 
					
						
							|  |  |  | 		classpath libs.com.netflix.nebula.nebula.project.plugin | 
					
						
							| 
									
										
										
										
											2015-03-24 00:14:26 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | 	repositories { | 
					
						
							| 
									
										
										
										
											2018-10-16 07:05:40 +08:00
										 |  |  | 		maven { url 'https://plugins.gradle.org/m2/' } | 
					
						
							| 
									
										
										
										
											2015-03-24 00:14:26 +08:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2010-08-25 01:27:44 +08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2020-01-08 01:08:43 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-05 21:22:53 +08:00
										 |  |  | plugins { | 
					
						
							|  |  |  | 	alias(libs.plugins.org.gradle.wrapper.upgrade) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-29 00:08:57 +08:00
										 |  |  | apply plugin: 'io.spring.nohttp' | 
					
						
							| 
									
										
										
										
											2019-12-17 00:45:15 +08:00
										 |  |  | apply plugin: 'locks' | 
					
						
							| 
									
										
										
										
											2017-03-29 04:45:30 +08:00
										 |  |  | apply plugin: 'io.spring.convention.root' | 
					
						
							| 
									
										
										
										
											2020-01-08 01:08:43 +08:00
										 |  |  | apply plugin: 'org.jetbrains.kotlin.jvm' | 
					
						
							| 
									
										
										
										
											2023-10-26 00:33:43 +08:00
										 |  |  | apply plugin: 'org.springframework.security.versions.verify-dependencies-versions' | 
					
						
							| 
									
										
										
										
											2024-06-27 01:04:17 +08:00
										 |  |  | apply plugin: 'org.springframework.security.check-expected-branch-version' | 
					
						
							| 
									
										
										
										
											2023-07-14 03:25:10 +08:00
										 |  |  | apply plugin: 'io.spring.security.release' | 
					
						
							| 
									
										
										
										
											2010-08-25 01:27:44 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-29 04:45:30 +08:00
										 |  |  | group = 'org.springframework.security' | 
					
						
							|  |  |  | description = 'Spring Security' | 
					
						
							| 
									
										
										
										
											2010-07-08 05:40:17 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-29 04:45:30 +08:00
										 |  |  | ext.snapshotBuild = version.contains("SNAPSHOT") | 
					
						
							|  |  |  | ext.releaseBuild = version.contains("SNAPSHOT") | 
					
						
							|  |  |  | ext.milestoneBuild = !(snapshotBuild || releaseBuild) | 
					
						
							| 
									
										
										
										
											2017-05-09 00:56:26 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-29 00:08:57 +08:00
										 |  |  | repositories { | 
					
						
							| 
									
										
										
										
											2019-05-02 09:08:26 +08:00
										 |  |  | 	mavenCentral() | 
					
						
							| 
									
										
										
										
											2023-07-15 08:38:34 +08:00
										 |  |  | 	maven { url "https://repo.spring.io/milestone" } | 
					
						
							| 
									
										
										
										
											2019-03-29 00:08:57 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-14 03:25:10 +08:00
										 |  |  | springRelease { | 
					
						
							| 
									
										
										
										
											2022-05-05 06:19:52 +08:00
										 |  |  | 	weekOfMonth = 3 | 
					
						
							|  |  |  | 	dayOfWeek = 1 | 
					
						
							| 
									
										
										
										
											2023-07-14 03:25:10 +08:00
										 |  |  | 	referenceDocUrl = "https://docs.spring.io/spring-security/reference/{version}/index.html" | 
					
						
							| 
									
										
										
										
											2024-05-09 04:58:45 +08:00
										 |  |  | 	apiDocUrl = "https://docs.spring.io/spring-security/site/docs/{version}/api/" | 
					
						
							| 
									
										
										
										
											2023-07-14 03:25:10 +08:00
										 |  |  | 	replaceSnapshotVersionInReferenceDocUrl = true | 
					
						
							| 
									
										
										
										
											2022-05-05 03:03:32 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-19 06:00:24 +08:00
										 |  |  | def toolchainVersion() { | 
					
						
							|  |  |  | 	if (project.hasProperty('testToolchain')) { | 
					
						
							|  |  |  | 		return project.property('testToolchain').toString().toInteger() | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	return 17 | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-11 23:43:29 +08:00
										 |  |  | subprojects { | 
					
						
							| 
									
										
										
										
											2023-09-21 23:49:12 +08:00
										 |  |  | 	java { | 
					
						
							|  |  |  | 		toolchain { | 
					
						
							|  |  |  | 			languageVersion = JavaLanguageVersion.of(toolchainVersion()) | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2023-09-27 03:41:24 +08:00
										 |  |  | 	kotlin { | 
					
						
							|  |  |  | 		jvmToolchain { | 
					
						
							|  |  |  | 			languageVersion = JavaLanguageVersion.of(17) | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2023-09-11 23:43:29 +08:00
										 |  |  | 	tasks.withType(JavaCompile).configureEach { | 
					
						
							| 
									
										
										
										
											2019-08-14 04:20:21 +08:00
										 |  |  | 		options.encoding = "UTF-8" | 
					
						
							| 
									
										
										
										
											2021-09-08 15:58:28 +08:00
										 |  |  | 		options.compilerArgs.add("-parameters") | 
					
						
							| 
									
										
										
										
											2023-09-27 22:59:09 +08:00
										 |  |  | 		options.release.set(17) | 
					
						
							| 
									
										
										
										
											2023-09-11 23:43:29 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2021-04-05 23:16:02 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-24 05:15:24 +08:00
										 |  |  | allprojects { | 
					
						
							| 
									
										
										
										
											2020-09-09 23:16:07 +08:00
										 |  |  | 	if (!['spring-security-bom', 'spring-security-docs'].contains(project.name)) { | 
					
						
							|  |  |  | 		apply plugin: 'io.spring.javaformat' | 
					
						
							|  |  |  | 		apply plugin: 'checkstyle' | 
					
						
							| 
									
										
										
										
											2020-07-25 02:37:53 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-09 23:16:07 +08:00
										 |  |  | 		pluginManager.withPlugin("io.spring.convention.checkstyle", { plugin -> | 
					
						
							|  |  |  | 			configure(plugin) { | 
					
						
							|  |  |  | 				dependencies { | 
					
						
							| 
									
										
										
										
											2023-09-28 02:42:42 +08:00
										 |  |  | 					checkstyle libs.io.spring.javaformat.spring.javaformat.checkstyle | 
					
						
							| 
									
										
										
										
											2020-09-09 23:16:07 +08:00
										 |  |  | 				} | 
					
						
							|  |  |  | 				checkstyle { | 
					
						
							|  |  |  | 					toolVersion = '8.34' | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2020-07-25 02:37:53 +08:00
										 |  |  | 			} | 
					
						
							| 
									
										
										
										
											2020-09-09 23:16:07 +08:00
										 |  |  | 		}) | 
					
						
							| 
									
										
										
										
											2020-07-25 02:37:53 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-09-09 23:16:07 +08:00
										 |  |  | 		if (project.name.contains('sample')) { | 
					
						
							|  |  |  | 			tasks.whenTaskAdded { task -> | 
					
						
							|  |  |  | 				if (task.name.contains('format') || task.name.contains('checkFormat') || task.name.contains("checkstyle")) { | 
					
						
							|  |  |  | 					task.enabled = false | 
					
						
							|  |  |  | 				} | 
					
						
							| 
									
										
										
										
											2020-07-24 05:15:24 +08:00
										 |  |  | 			} | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-05-08 05:00:10 +08:00
										 |  |  | develocity { | 
					
						
							| 
									
										
										
										
											2020-09-30 22:20:12 +08:00
										 |  |  | 	buildScan { | 
					
						
							| 
									
										
										
										
											2024-05-08 05:00:10 +08:00
										 |  |  | 		termsOfUseUrl = 'https://gradle.com/help/legal-terms-of-use' | 
					
						
							|  |  |  | 		termsOfUseAgree = 'yes' | 
					
						
							| 
									
										
										
										
											2020-09-30 22:20:12 +08:00
										 |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-10 23:08:31 +08:00
										 |  |  | nohttp { | 
					
						
							| 
									
										
										
										
											2024-10-18 10:40:51 +08:00
										 |  |  | 	source.exclude "buildSrc/build/**", "javascript/.gradle/**", "javascript/package-lock.json", "javascript/node_modules/**", "javascript/build/**", "javascript/dist/**" | 
					
						
							| 
									
										
										
										
											2023-08-18 23:35:46 +08:00
										 |  |  | 	source.builtBy(project(':spring-security-config').tasks.withType(RncToXsd)) | 
					
						
							| 
									
										
										
										
											2020-06-10 23:08:31 +08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2021-06-30 20:00:32 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-22 03:38:07 +08:00
										 |  |  | tasks.named('checkstyleNohttp') { | 
					
						
							|  |  |  | 	maxHeapSize = '1g' | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-10 22:16:40 +08:00
										 |  |  | tasks.register('cloneRepository', IncludeRepoTask) { | 
					
						
							|  |  |  | 	repository = project.getProperties().get("repositoryName") | 
					
						
							|  |  |  | 	ref = project.getProperties().get("ref") | 
					
						
							|  |  |  | 	var defaultDirectory = project.file("build/tmp/clone") | 
					
						
							|  |  |  | 	outputDirectory = project.hasProperty("cloneOutputDirectory") ? project.file("$cloneOutputDirectory") : defaultDirectory | 
					
						
							| 
									
										
										
										
											2021-06-30 20:00:32 +08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2021-09-28 04:48:41 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-10-05 21:22:53 +08:00
										 |  |  | wrapperUpgrade { | 
					
						
							|  |  |  | 	gradle { | 
					
						
							| 
									
										
										
										
											2023-10-10 19:32:33 +08:00
										 |  |  | 		'spring-security' { | 
					
						
							| 
									
										
										
										
											2023-10-05 21:22:53 +08:00
										 |  |  | 			repo = 'spring-projects/spring-security' | 
					
						
							| 
									
										
										
										
											2025-03-21 03:21:24 +08:00
										 |  |  | 			baseBranch = '6.3.x' // runs only on 6.3.x and the update is merged forward to main
 | 
					
						
							| 
									
										
										
										
											2023-10-05 21:22:53 +08:00
										 |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } |