forked from grails/grails-spring-security-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
128 lines (105 loc) · 4.25 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
buildscript {
ext {
grailsVersion = project.grailsVersion
}
repositories {
mavenLocal()
maven { url 'https://repo.grails.org/grails/core' }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "org.grails:grails-docs:$grailsVersion"
}
}
plugins {
id 'io.spring.dependency-management' version '0.5.2.RELEASE'
id 'com.jfrog.bintray' version '1.2'
}
version '3.0.0.M1'
group 'org.grails.plugins'
apply plugin: 'maven-publish'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'org.grails.grails-plugin'
apply plugin: 'org.grails.grails-gsp'
apply plugin: 'org.grails.grails-doc'
String repoRoot = 'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/'
apply from: "$repoRoot/grailsCentralPublishing.gradle"
//apply from: "$repoRoot/bintrayPublishing.gradle"
apply from: 'bintrayPublishing.gradle' // using modified local copy so the issueTrackerUrl and vcsUrl properties are correct
ext {
grailsVersion = project.grailsVersion
gradleWrapperVersion = project.gradleWrapperVersion
}
sourceCompatibility = targetCompatibility = 1.7
repositories {
mavenLocal()
mavenCentral()
maven { url 'https://repo.grails.org/grails/core' }
}
dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
}
applyMavenExclusions false
}
dependencies {
provided 'javax.servlet:javax.servlet-api:3.1.0'
provided 'org.grails:grails-dependencies'
provided 'org.grails:grails-web-boot'
provided 'org.springframework.boot:spring-boot-autoconfigure'
String springSecurityVersion = '3.2.8.RELEASE'
compile "org.springframework.security:spring-security-core:$springSecurityVersion", {
['aopalliance', 'aspectjrt', 'commons-collections', 'commons-logging', 'ehcache-core',
'fest-assert', 'hsqldb', 'jcl-over-slf4j', 'jsr250-api', 'junit', 'logback-classic',
'mockito-core', 'powermock-api-mockito', 'powermock-api-support', 'powermock-core',
'powermock-module-junit4', 'powermock-module-junit4-common', 'powermock-reflect',
'spring-aop', 'spring-beans', 'spring-context', 'spring-core', 'spring-expression',
'spring-jdbc', 'spring-test', 'spring-tx'].each { exclude module: it }
}
compile "org.springframework.security:spring-security-web:$springSecurityVersion", {
['aopalliance', 'commons-codec', 'commons-logging', 'fest-assert', 'groovy-all',
'hsqldb', 'javax.servlet-api', 'jcl-over-slf4j', 'junit', 'logback-classic',
'mockito-core', 'powermock-api-mockito', 'powermock-api-support',
'powermock-core', 'powermock-module-junit4', 'powermock-module-junit4-common',
'powermock-reflect', 'spock-core', 'spock-spring', 'spring-beans',
'spring-context', 'spring-core', 'spring-expression', 'spring-jdbc',
'spring-security-core', 'spring-test', 'spring-tx', 'spring-web',
'spring-webmvc'].each { exclude module: it }
}
compile 'net.sf.ehcache:ehcache:2.9.0'
console 'org.grails:grails-console'
testCompile 'org.grails:grails-plugin-testing'
}
docs.doLast {
// can't do this in custom css because the order doesn't support overriding, only adding
File mainCss = new File(project.buildDir, 'docs/manual/css/main.css')
mainCss.text = mainCss.text.replaceAll('font-size: 85%', 'font-size: 100%;')
// delete unused images
['pivotal-logo-color', 'pivotal-logo', 'springsource-logo', 'grails-icon', 'grails', 'groovy'].each { String name ->
assert new File(project.buildDir, 'docs/manual/img/' + name + '.png').delete()
}
assert new File(project.buildDir, 'docs/manual/img/favicon.ico').delete()
}
task docsWithPdf(dependsOn: 'docs') << {
// based on grails.doc.gradle.PublishPdf
def outputDir = new File(project.buildDir, 'docs/manual')
def htmlFile = new File(outputDir, 'guide/single.html')
def pdfBuilder = new grails.doc.PdfBuilder()
def xml = pdfBuilder.createXml(htmlFile, outputDir.absolutePath)
pdfBuilder.createPdf xml, new File(htmlFile.parentFile, 'single.pdf'), htmlFile
}
task wrapper(type: Wrapper) {
gradleVersion = gradleWrapperVersion
}
eclipse {
classpath {
plusConfigurations += [configurations.provided]
}
}
idea {
module {
scopes.PROVIDED.plus += [configurations.provided]
}
}