| 
									
										
										
										
											2020-04-07 10:49:38 -04:00
										 |  |  | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | 
					
						
							| 
									
										
										
										
											2023-09-14 16:01:50 -05:00
										 |  |  | import org.springframework.gradle.xsd.CreateVersionlessXsdTask | 
					
						
							| 
									
										
										
										
											2023-08-17 15:45:45 +01:00
										 |  |  | import trang.RncToXsd | 
					
						
							| 
									
										
										
										
											2020-04-07 10:49:38 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | apply plugin: 'io.spring.convention.spring-module' | 
					
						
							|  |  |  | apply plugin: 'trang' | 
					
						
							| 
									
										
										
										
											2020-01-07 12:08:43 -05:00
										 |  |  | apply plugin: 'kotlin' | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | dependencies { | 
					
						
							| 
									
										
										
										
											2021-10-05 11:23:29 -03:00
										 |  |  | 	management platform(project(":spring-security-dependencies")) | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 	// NB: Don't add other compile time dependencies to the config module as this breaks tooling
 | 
					
						
							| 
									
										
										
										
											2021-04-04 07:31:47 -05:00
										 |  |  | 	api project(':spring-security-core') | 
					
						
							|  |  |  | 	api 'org.springframework:spring-aop' | 
					
						
							|  |  |  | 	api 'org.springframework:spring-beans' | 
					
						
							|  |  |  | 	api 'org.springframework:spring-context' | 
					
						
							|  |  |  | 	api 'org.springframework:spring-core' | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	optional project(':spring-security-ldap') | 
					
						
							|  |  |  | 	optional project(':spring-security-messaging') | 
					
						
							| 
									
										
										
										
											2021-05-17 15:51:12 -05:00
										 |  |  | 	optional project(':spring-security-saml2-service-provider') | 
					
						
							| 
									
										
										
										
											2017-03-20 16:18:08 -04:00
										 |  |  | 	optional project(':spring-security-oauth2-client') | 
					
						
							| 
									
										
										
										
											2017-10-23 09:04:01 -04:00
										 |  |  | 	optional project(':spring-security-oauth2-jose') | 
					
						
							| 
									
										
										
										
											2018-06-12 21:33:26 -06:00
										 |  |  | 	optional project(':spring-security-oauth2-resource-server') | 
					
						
							| 
									
										
										
										
											2019-09-04 19:16:56 -05:00
										 |  |  | 	optional project(':spring-security-rsocket') | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 	optional project(':spring-security-web') | 
					
						
							| 
									
										
										
										
											2017-10-12 13:45:23 -05:00
										 |  |  | 	optional 'io.projectreactor:reactor-core' | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 	optional 'org.aspectj:aspectjweaver' | 
					
						
							|  |  |  | 	optional 'org.springframework:spring-jdbc' | 
					
						
							| 
									
										
										
										
											2019-09-04 19:16:56 -05:00
										 |  |  | 	optional 'org.springframework:spring-messaging' | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 	optional 'org.springframework:spring-tx' | 
					
						
							|  |  |  | 	optional 'org.springframework:spring-webmvc' | 
					
						
							|  |  |  | 	optional'org.springframework:spring-web' | 
					
						
							| 
									
										
										
										
											2017-10-12 13:45:23 -05:00
										 |  |  | 	optional'org.springframework:spring-webflux' | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 	optional'org.springframework:spring-websocket' | 
					
						
							| 
									
										
										
										
											2020-01-07 12:08:43 -05:00
										 |  |  | 	optional 'org.jetbrains.kotlin:kotlin-reflect' | 
					
						
							|  |  |  | 	optional 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' | 
					
						
							| 
									
										
										
										
											2021-10-11 16:01:02 -03:00
										 |  |  | 	optional 'jakarta.annotation:jakarta.annotation-api' | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-11 16:01:02 -03:00
										 |  |  | 	provided 'jakarta.servlet:jakarta.servlet-api' | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-04 07:31:47 -05:00
										 |  |  | 	testImplementation project(':spring-security-aspects') | 
					
						
							| 
									
										
										
										
											2022-12-10 11:39:24 -05:00
										 |  |  | 	testImplementation project(':spring-security-cas') | 
					
						
							| 
									
										
										
										
											2021-04-04 07:31:47 -05:00
										 |  |  | 	testImplementation project(':spring-security-test') | 
					
						
							|  |  |  | 	testImplementation project(path : ':spring-security-core', configuration : 'tests') | 
					
						
							|  |  |  | 	testImplementation project(path : ':spring-security-ldap', configuration : 'tests') | 
					
						
							|  |  |  | 	testImplementation project(path : ':spring-security-oauth2-client', configuration : 'tests') | 
					
						
							|  |  |  | 	testImplementation project(path : ':spring-security-oauth2-resource-server', configuration : 'tests') | 
					
						
							| 
									
										
										
										
											2022-09-07 13:39:26 -05:00
										 |  |  | 	testImplementation project(':spring-security-saml2-service-provider') | 
					
						
							| 
									
										
										
										
											2021-05-17 15:51:12 -05:00
										 |  |  | 	testImplementation project(path : ':spring-security-saml2-service-provider', configuration : 'tests') | 
					
						
							| 
									
										
										
										
											2021-04-04 07:31:47 -05:00
										 |  |  | 	testImplementation project(path : ':spring-security-web', configuration : 'tests') | 
					
						
							| 
									
										
										
										
											2022-01-14 16:35:45 -06:00
										 |  |  | 	testImplementation "jakarta.inject:jakarta.inject-api" | 
					
						
							| 
									
										
										
										
											2021-07-12 13:06:44 -05:00
										 |  |  | 	testImplementation "org.assertj:assertj-core" | 
					
						
							|  |  |  | 	testImplementation "org.junit.jupiter:junit-jupiter-api" | 
					
						
							|  |  |  | 	testImplementation "org.junit.jupiter:junit-jupiter-params" | 
					
						
							|  |  |  | 	testImplementation "org.junit.jupiter:junit-jupiter-engine" | 
					
						
							|  |  |  | 	testImplementation "org.mockito:mockito-core" | 
					
						
							|  |  |  | 	testImplementation "org.mockito:mockito-junit-jupiter" | 
					
						
							|  |  |  | 	testImplementation "org.springframework:spring-test" | 
					
						
							| 
									
										
										
										
											2021-04-04 07:31:47 -05:00
										 |  |  | 	testImplementation 'com.squareup.okhttp3:mockwebserver' | 
					
						
							|  |  |  | 	testImplementation 'ch.qos.logback:logback-classic' | 
					
						
							|  |  |  | 	testImplementation 'io.projectreactor.netty:reactor-netty' | 
					
						
							|  |  |  | 	testImplementation 'io.rsocket:rsocket-transport-netty' | 
					
						
							| 
									
										
										
										
											2021-10-11 16:01:02 -03:00
										 |  |  | 	testImplementation 'jakarta.annotation:jakarta.annotation-api' | 
					
						
							|  |  |  | 	testImplementation 'jakarta.xml.bind:jakarta.xml.bind-api' | 
					
						
							| 
									
										
										
										
											2022-11-07 13:43:26 -03:00
										 |  |  | 	testImplementation 'jakarta.websocket:jakarta.websocket-api' | 
					
						
							|  |  |  | 	testImplementation 'jakarta.websocket:jakarta.websocket-client-api' | 
					
						
							| 
									
										
										
										
											2021-04-04 07:31:47 -05:00
										 |  |  | 	testImplementation 'ldapsdk:ldapsdk:4.1' | 
					
						
							|  |  |  | 	testImplementation('net.sourceforge.htmlunit:htmlunit') { | 
					
						
							| 
									
										
										
										
											2017-09-08 15:45:17 -05:00
										 |  |  | 		exclude group: 'commons-logging', module: 'commons-logging' | 
					
						
							| 
									
										
										
										
											2023-05-16 08:31:21 +01:00
										 |  |  | 		exclude group: 'xml-apis', module: 'xml-apis' | 
					
						
							| 
									
										
										
										
											2017-09-08 15:45:17 -05:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-07-12 13:06:44 -05:00
										 |  |  | 	testImplementation "org.apache.directory.server:apacheds-core" | 
					
						
							|  |  |  | 	testImplementation "org.apache.directory.server:apacheds-core-entry" | 
					
						
							|  |  |  | 	testImplementation "org.apache.directory.server:apacheds-protocol-shared" | 
					
						
							|  |  |  | 	testImplementation "org.apache.directory.server:apacheds-protocol-ldap" | 
					
						
							|  |  |  | 	testImplementation "org.apache.directory.server:apacheds-server-jndi" | 
					
						
							|  |  |  | 	testImplementation 'org.apache.directory.shared:shared-ldap' | 
					
						
							| 
									
										
										
										
											2021-10-04 15:21:34 +02:00
										 |  |  | 	testImplementation "com.unboundid:unboundid-ldapsdk" | 
					
						
							| 
									
										
										
										
											2021-10-11 16:01:02 -03:00
										 |  |  | 	testImplementation 'jakarta.persistence:jakarta.persistence-api' | 
					
						
							| 
									
										
										
										
											2022-07-15 14:37:24 -03:00
										 |  |  | 	testImplementation "org.hibernate.orm:hibernate-core" | 
					
						
							| 
									
										
										
										
											2021-04-04 07:31:47 -05:00
										 |  |  | 	testImplementation 'org.hsqldb:hsqldb' | 
					
						
							| 
									
										
										
										
											2021-07-07 09:11:53 -05:00
										 |  |  | 	testImplementation 'org.mockito:mockito-core' | 
					
						
							| 
									
										
										
										
											2021-04-04 07:31:47 -05:00
										 |  |  | 	testImplementation('org.seleniumhq.selenium:htmlunit-driver') { | 
					
						
							| 
									
										
										
										
											2017-09-08 15:45:17 -05:00
										 |  |  | 		exclude group: 'commons-logging', module: 'commons-logging' | 
					
						
							| 
									
										
										
										
											2023-05-16 08:31:21 +01:00
										 |  |  | 		exclude group: 'xml-apis', module: 'xml-apis' | 
					
						
							| 
									
										
										
										
											2017-09-08 15:45:17 -05:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-04-04 07:31:47 -05:00
										 |  |  | 	testImplementation('org.seleniumhq.selenium:selenium-java') { | 
					
						
							| 
									
										
										
										
											2017-09-08 15:45:17 -05:00
										 |  |  | 		exclude group: 'commons-logging', module: 'commons-logging' | 
					
						
							|  |  |  | 		exclude group: 'io.netty', module: 'netty' | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-04-04 07:31:47 -05:00
										 |  |  | 	testImplementation 'org.springframework.ldap:spring-ldap-core' | 
					
						
							|  |  |  | 	testImplementation 'org.springframework:spring-expression' | 
					
						
							|  |  |  | 	testImplementation 'org.springframework:spring-jdbc' | 
					
						
							|  |  |  | 	testImplementation 'org.springframework:spring-orm' | 
					
						
							|  |  |  | 	testImplementation 'org.springframework:spring-tx' | 
					
						
							| 
									
										
										
										
											2022-12-14 10:15:24 -03:00
										 |  |  | 	testImplementation 'org.springframework:spring-core-test' | 
					
						
							| 
									
										
										
										
											2021-04-04 07:31:47 -05:00
										 |  |  | 	testImplementation ('org.springframework.data:spring-data-jpa') { | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 		exclude group: 'org.aspectj', module: 'aspectjrt' | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2021-04-09 13:11:18 +02:00
										 |  |  | 	testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core' | 
					
						
							|  |  |  | 	testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-reactor' | 
					
						
							| 
									
										
										
										
											2021-04-28 12:33:18 +02:00
										 |  |  | 	testImplementation 'io.mockk:mockk' | 
					
						
							| 
									
										
										
										
											2022-10-04 14:38:28 -03:00
										 |  |  | 	testImplementation 'org.junit.platform:junit-platform-launcher' | 
					
						
							|  |  |  | 	testImplementation 'org.apache.maven.resolver:maven-resolver-connector-basic' | 
					
						
							|  |  |  | 	testImplementation ('org.apache.maven.resolver:maven-resolver-impl') { | 
					
						
							|  |  |  | 		exclude(group: "javax.annotation", module: "javax.annotation-api") | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	testImplementation ('org.apache.maven:maven-resolver-provider') { | 
					
						
							|  |  |  | 		exclude(group: "javax.inject", module: "javax.inject") | 
					
						
							|  |  |  | 		exclude(group: "javax.annotation", module: "javax.annotation-api") | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 	testImplementation ('org.apache.maven.resolver:maven-resolver-transport-http') { | 
					
						
							|  |  |  | 		exclude group: "org.slf4j", module: "jcl-over-slf4j" | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2024-01-04 15:25:15 -03:00
										 |  |  | 	testImplementation libs.org.instancio.instancio.junit | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-04 07:31:47 -05:00
										 |  |  | 	testRuntimeOnly 'org.hsqldb:hsqldb' | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-18 14:07:24 -05:00
										 |  |  | def rncToXsd = tasks.named('rncToXsd', RncToXsd) | 
					
						
							|  |  |  | rncToXsd.configure { | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 	rncDir = file('src/main/resources/org/springframework/security/config/') | 
					
						
							|  |  |  | 	xsdDir = rncDir | 
					
						
							|  |  |  | 	xslFile = new File(rncDir, 'spring-security.xsl') | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-18 14:17:46 -05:00
										 |  |  | def versionlessXsd = tasks.register("versionlessXsd", CreateVersionlessXsdTask) { | 
					
						
							|  |  |  | 	inputFiles.from(rncToXsd.map { task -> project.fileTree(task.xsdDir) }) | 
					
						
							| 
									
										
										
										
											2023-09-14 16:01:50 -05:00
										 |  |  | 	versionlessXsdFile = project.layout.buildDirectory.file("versionlessXsd/spring-security.xsd") | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-18 14:07:24 -05:00
										 |  |  | tasks.named('processResources', ProcessResources).configure { | 
					
						
							| 
									
										
										
										
											2023-09-14 16:01:50 -05:00
										 |  |  | 	from(versionlessXsd) { | 
					
						
							|  |  |  | 		into 'org/springframework/security/config/' | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2023-09-18 14:17:46 -05:00
										 |  |  | 	from(rncToXsd) { | 
					
						
							|  |  |  | 		duplicatesStrategy DuplicatesStrategy.EXCLUDE | 
					
						
							|  |  |  | 		into 'org/springframework/security/config/' | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2023-09-14 16:01:50 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2017-03-28 15:45:30 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-18 14:23:34 -05:00
										 |  |  | tasks.named('sourcesJar', Jar).configure { | 
					
						
							|  |  |  | 	from(rncToXsd) { | 
					
						
							|  |  |  | 		duplicatesStrategy DuplicatesStrategy.EXCLUDE | 
					
						
							|  |  |  | 		into 'org/springframework/security/config/' | 
					
						
							| 
									
										
										
										
											2023-08-18 16:26:17 +01:00
										 |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-07 10:49:38 -04:00
										 |  |  | tasks.withType(KotlinCompile).configureEach { | 
					
						
							|  |  |  | 	kotlinOptions { | 
					
						
							| 
									
										
										
										
											2022-06-18 09:43:24 -03:00
										 |  |  | 		languageVersion = "1.7" | 
					
						
							|  |  |  | 		apiVersion = "1.7" | 
					
						
							| 
									
										
										
										
											2021-05-17 10:08:27 -05:00
										 |  |  | 		freeCompilerArgs = ["-Xjsr305=strict", "-Xsuppress-version-warnings"] | 
					
						
							| 
									
										
										
										
											2022-02-22 08:51:27 -03:00
										 |  |  | 		jvmTarget = "17" | 
					
						
							| 
									
										
										
										
											2020-04-07 10:49:38 -04:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2020-01-07 12:08:43 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2024-01-04 15:25:15 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | configure(project.tasks.withType(Test)) { | 
					
						
							|  |  |  | 	doFirst { | 
					
						
							|  |  |  | 		systemProperties['springSecurityVersion'] = version | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } |