Standardize Build
The build now uses spring build conventions to simplify the build Fixes gh-4284
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
// Core build file
|
||||
|
||||
// We don't define a module dependency on crypto to avoid creating a transitive dependency
|
||||
def cryptoProject = project(':spring-security-crypto')
|
||||
def cryptoClasses = cryptoProject.sourceSets.main.output
|
||||
|
||||
configurations {
|
||||
included
|
||||
|
||||
compile.extendsFrom included
|
||||
|
||||
testCompile.exclude group: 'org.mockito', module: 'mockito-all'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile springCoreDependency,
|
||||
'aopalliance:aopalliance:1.0',
|
||||
"org.springframework:spring-aop:$springVersion",
|
||||
"org.springframework:spring-beans:$springVersion",
|
||||
"org.springframework:spring-context:$springVersion",
|
||||
"org.springframework:spring-expression:$springVersion"
|
||||
|
||||
optional "net.sf.ehcache:ehcache:$ehcacheVersion",
|
||||
'javax.annotation:jsr250-api:1.0',
|
||||
"org.aspectj:aspectjrt:$aspectjVersion",
|
||||
"org.springframework:spring-jdbc:$springVersion",
|
||||
"org.springframework:spring-tx:$springVersion",
|
||||
"com.fasterxml.jackson.core:jackson-databind:$jacksonDatabindVersion"
|
||||
|
||||
included cryptoProject
|
||||
|
||||
testCompile "commons-collections:commons-collections:$commonsCollectionsVersion",
|
||||
"org.springframework:spring-test:$springVersion",
|
||||
"org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
||||
powerMockDependencies,
|
||||
"org.skyscreamer:jsonassert:$jsonassertVersion"
|
||||
|
||||
testRuntime "org.hsqldb:hsqldb:$hsqlVersion"
|
||||
}
|
||||
|
||||
classes.doLast {
|
||||
copy {
|
||||
from cryptoClasses
|
||||
into sourceSets.main.output.classesDir
|
||||
}
|
||||
}
|
||||
|
||||
sourceJar.from cryptoProject.sourceSets.main.java
|
||||
|
||||
configure(project.tasks.withType(Test)) {
|
||||
systemProperties['springSecurityVersion'] = version
|
||||
systemProperties['springVersion'] = springVersion
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
apply plugin: 'io.spring.convention.spring-module'
|
||||
|
||||
def includeProject = project(':spring-security-crypto')
|
||||
|
||||
configurations {
|
||||
tests
|
||||
published.extendsFrom tests, archives
|
||||
|
||||
included
|
||||
compile.extendsFrom included
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'aopalliance:aopalliance'
|
||||
compile 'commons-logging:commons-logging'
|
||||
compile 'org.springframework:spring-aop'
|
||||
compile 'org.springframework:spring-beans'
|
||||
compile 'org.springframework:spring-context'
|
||||
compile 'org.springframework:spring-core'
|
||||
compile 'org.springframework:spring-expression'
|
||||
|
||||
included includeProject
|
||||
|
||||
optional 'com.fasterxml.jackson.core:jackson-databind'
|
||||
optional 'javax.annotation:jsr250-api'
|
||||
optional 'net.sf.ehcache:ehcache'
|
||||
optional 'org.aspectj:aspectjrt'
|
||||
optional 'org.springframework:spring-jdbc'
|
||||
optional 'org.springframework:spring-tx'
|
||||
|
||||
testCompile powerMockDependencies
|
||||
testCompile 'commons-collections:commons-collections'
|
||||
testCompile 'org.skyscreamer:jsonassert'
|
||||
testCompile 'org.slf4j:jcl-over-slf4j'
|
||||
testCompile 'org.springframework:spring-test'
|
||||
|
||||
testRuntime 'org.hsqldb:hsqldb'
|
||||
}
|
||||
|
||||
classes.doLast {
|
||||
copy {
|
||||
from includeProject.sourceSets.main.output
|
||||
into sourceSets.main.output.classesDir
|
||||
}
|
||||
}
|
||||
|
||||
tasks.sourcesJar.from {includeProject.sourceSets.main.java}
|
||||
|
||||
configure(project.tasks.withType(Test)) {
|
||||
systemProperties['springSecurityVersion'] = version
|
||||
systemProperties['springVersion'] = project.dependencyManagement.managedVersions['org.springframework:spring-core']
|
||||
}
|
||||
|
||||
task testJar(type: Jar) {
|
||||
classifier = 'tests'
|
||||
from sourceSets.test.output
|
||||
}
|
||||
|
||||
artifacts {
|
||||
tests testJar
|
||||
}
|
||||
|
||||
uploadPublished {
|
||||
// maven deployer configuration
|
||||
}
|
||||
|
||||
install {
|
||||
configuration = configurations.published
|
||||
}
|
||||
@@ -40,7 +40,7 @@ public class SpringSecurityCoreVersion {
|
||||
*/
|
||||
public static final long SERIAL_VERSION_UID = 500L;
|
||||
|
||||
static final String MIN_SPRING_VERSION = "4.3.5.RELEASE";
|
||||
static final String MIN_SPRING_VERSION = "5.0.0.BUILD-SNAPSHOT";
|
||||
|
||||
static {
|
||||
performVersionChecks();
|
||||
|
||||
Reference in New Issue
Block a user