spring-security/saml2/saml2-service-provider/spring-security-saml2-service-provider.gradle

142 lines
4.5 KiB
Groovy
Raw Permalink Normal View History

apply plugin: 'io.spring.convention.spring-module'
2021-05-17 15:51:12 -05:00
configurations {
opensamlFiveMain { extendsFrom(optional, provided) }
opensamlFiveTest { extendsFrom(opensamlFiveMain, testImplementation, testRuntimeOnly) }
}
sourceSets {
2024-08-05 10:39:26 -06:00
opensaml5Main {
java {
compileClasspath = main.output + configurations.opensamlFiveMain
2024-08-05 10:39:26 -06:00
srcDir 'src/opensaml5Main/java'
}
}
opensaml5Test {
java {
compileClasspath = main.output + test.output + opensaml5Main.output + configurations.opensamlFiveTest
runtimeClasspath = main.output + test.output + opensaml5Main.output + configurations.opensamlFiveTest
2024-08-05 10:39:26 -06:00
srcDir 'src/opensaml5Test/java'
}
}
}
sourceSets.configureEach { set ->
if (!set.name.containsIgnoreCase("main")) {
return
}
def from = copySpec {
from("$projectDir/src/$set.name/java/org/springframework/security/saml2/internal")
}
copy {
into "$projectDir/src/$set.name/java/org/springframework/security/saml2/provider/service/authentication/logout"
filter { line -> line.replaceAll(".saml2.internal", ".saml2.provider.service.authentication.logout") }
with from
}
copy {
into "$projectDir/src/$set.name/java/org/springframework/security/saml2/provider/service/authentication"
filter { line -> line.replaceAll(".saml2.internal", ".saml2.provider.service.authentication") }
with from
}
copy {
into "$projectDir/src/$set.name/java/org/springframework/security/saml2/provider/service/metadata"
filter { line -> line.replaceAll(".saml2.internal", ".saml2.provider.service.metadata") }
with from
}
copy {
into "$projectDir/src/$set.name/java/org/springframework/security/saml2/provider/service/web/authentication/logout"
filter { line -> line.replaceAll(".saml2.internal", ".saml2.provider.service.web.authentication.logout") }
with from
}
copy {
into "$projectDir/src/$set.name/java/org/springframework/security/saml2/provider/service/web/authentication"
filter { line -> line.replaceAll(".saml2.internal", ".saml2.provider.service.web.authentication") }
with from
}
copy {
into "$projectDir/src/$set.name/java/org/springframework/security/saml2/provider/service/web"
filter { line -> line.replaceAll(".saml2.internal", ".saml2.provider.service.web") }
with from
}
copy {
into "$projectDir/src/$set.name/java/org/springframework/security/saml2/provider/service/registration"
filter { line -> line.replaceAll(".saml2.internal", ".saml2.provider.service.registration") }
with from
}
}
2020-12-07 12:28:19 -07:00
dependencies {
management platform(project(":spring-security-dependencies"))
api project(':spring-security-web')
2024-08-05 10:39:26 -06:00
api ('org.opensaml:opensaml-saml-api') {
exclude group: 'commons-logging', module: 'commons-logging'
}
2024-08-05 10:39:26 -06:00
api ('org.opensaml:opensaml-saml-impl') {
exclude group: 'commons-logging', module: 'commons-logging'
}
opensamlFiveMain (libs.org.opensaml.opensaml5.saml.api) {
2024-08-05 10:39:26 -06:00
exclude group: 'commons-logging', module: 'commons-logging'
}
opensamlFiveMain (libs.org.opensaml.opensaml5.saml.api) {
exclude group: 'commons-logging', module: 'commons-logging'
}
provided 'jakarta.servlet:jakarta.servlet-api'
2021-05-17 15:51:12 -05:00
optional 'com.fasterxml.jackson.core:jackson-databind'
optional 'org.springframework:spring-jdbc'
testImplementation project(path: ':spring-security-web', configuration: 'tests')
2021-05-17 15:51:12 -05:00
testImplementation 'com.squareup.okhttp3:mockwebserver'
testImplementation "org.assertj:assertj-core"
testImplementation "org.skyscreamer:jsonassert"
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"
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testRuntimeOnly 'org.hsqldb:hsqldb'
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
2024-08-05 10:39:26 -06:00
from sourceSets.opensaml5Main.output
}
sourcesJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
2024-08-05 10:39:26 -06:00
from sourceSets.opensaml5Main.allJava
}
testJar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
2024-08-05 10:39:26 -06:00
from sourceSets.opensaml5Test.output
}
javadoc {
classpath += configurations.opensamlFiveMain
source = sourceSets.main.allJava + sourceSets.opensaml5Main.allJava
}
2024-08-05 10:39:26 -06:00
tasks.register("opensaml5Test", Test) {
useJUnitPlatform()
testClassesDirs = sourceSets.opensaml5Test.output.classesDirs
classpath = sourceSets.opensaml5Test.output + sourceSets.opensaml5Test.runtimeClasspath
2024-08-05 10:39:26 -06:00
}
tasks.named("test") {
2024-08-05 10:39:26 -06:00
dependsOn opensaml5Test
}