Skip to content

Commit

Permalink
Merge branch '2.5.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Feb 27, 2015
2 parents c7ebac8 + b46da3a commit d3b5e46
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 135 deletions.
46 changes: 23 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@ import org.apache.tools.ant.filters.ReplaceTokens

buildscript {
repositories {
maven { url "https://repo.grails.org/grails/core" }
jcenter()
}
dependencies {
classpath "commons-io:commons-io:2.2"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1"
classpath "com.netflix.nebula:gradle-extra-configurations-plugin:2.2.0"
classpath "com.github.adrianbk:gradle-travisci-trigger-plugin:1.0.0"
}
}

apply plugin: 'idea'

ext.optionalDeps = []
ext.providedDeps = []

ext.provided = { providedDeps << it }
ext {
bintrayPublish = false
grailsVersion = '3.0.0.BUILD-SNAPSHOT'
Expand Down Expand Up @@ -51,6 +49,7 @@ ext {
cglibVersion = "2.2.2"
objenesisVersion = "1.4"
tomcatVersion = "7.0.55"
servletApiVersion = "3.0.1"

isJava8Compatible = org.gradle.api.JavaVersion.current().isJava8Compatible()
}
Expand Down Expand Up @@ -152,11 +151,28 @@ subprojects { project ->
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'project-report'
apply plugin: 'provided-base'
apply plugin: 'optional-base'

sourceCompatibility = "1.7"
targetCompatibility = "1.7"

if(project.name =~ /^(grails-web|grails-plugin-|grails-project-api|grails-test-suite|grails-test)/) {
dependencies {
provided "javax.servlet:javax.servlet-api:$servletApiVersion"
// MockHttpServletRequest/Response/Context used in many classes
provided("org.springframework:spring-test:${springVersion}") {
exclude group: 'commons-logging', module:'commons-logging'
}
}
}

if(project.name =~ /^(grails-plugin-datasource|grails-test-suite)/) {
dependencies {
provided 'hsqldb:hsqldb:1.8.0.10'
provided 'com.h2database:h2:1.3.176'
}
}

jar{
manifest.mainAttributes(
Expand Down Expand Up @@ -340,20 +356,6 @@ subprojects { project ->

pom.withXml {
def xml = asNode()
// respect 'optional' and 'provided' dependencies
optionalDeps.each { dep ->
xml.dependencies.find { it.artifactId == dep.name }?.optional = true
}
providedDeps.each { dep ->
xml.dependencies.find { it.artifactId == dep.name }?.scope = 'provided'

}

configurations.runtime.allDependencies.each { dependency ->
if (dependency.hasProperty("notInPom") && dependency.notInPom) {
xml.dependencies.removeAll { it.groupId == dependency.group && it.artifactId == dependency.name }
}
}

xml.children().last() + {
delegate.name 'Grails'
Expand All @@ -374,8 +376,6 @@ subprojects { project ->
delegate.developerConnection 'scm:[email protected]:grails/grails-core.git'
}



delegate.developers {
delegate.developer {
delegate.id 'graemerocher'
Expand All @@ -386,8 +386,8 @@ subprojects { project ->
delegate.name 'Jeff Brown'
}
delegate.developer {
delegate.id 'burtbeckwith'
delegate.name 'Burt Beckwith'
delegate.id 'lhotari'
delegate.name 'Lari Hotari'
}
}

Expand Down Expand Up @@ -478,4 +478,4 @@ tciTrigger {
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
jarFile = 'gradle/wrapper/gradle-wrapper.jar'
}
}
28 changes: 6 additions & 22 deletions grails-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
configurations {
optional
}
dependencies {
compile 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final'
compile( "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:${concurrentlinkedhashmapVersion}" ) {
Expand All @@ -19,9 +16,8 @@ dependencies {
compile("org.springframework:spring-context:${springVersion}") {
exclude group: 'commons-logging', module:'commons-logging'
}
compile("org.springframework:spring-test:${springVersion}") {
provided("org.springframework:spring-test:${springVersion}") {
exclude group: 'commons-logging', module:'commons-logging'
ext.notInPom = true
}

// Used by Spring AOP
Expand All @@ -32,9 +28,7 @@ dependencies {
exclude group: 'xml-apis', module:'xml-apis'
}

optional ("org.springframework:springloaded:$springLoadedVersion")


provided ("org.springframework:springloaded:$springLoadedVersion")

compile project(":grails-bootstrap"), {
exclude group:"org.fusesource.jansi", module:"jansi"
Expand All @@ -60,26 +54,16 @@ dependencies {

// These dependencies are not required, but due to a Groovy compiler bug they are loaded by Groovy and hence
// have to be on the path for compilation even though they shouldn't be
optional "org.apache.ant:ant:${antVersion}"
optional "jline:jline:$jlineVersion"
optional "org.fusesource.jansi:jansi:$jansiVersion"
optional("org.codehaus.gant:gant_groovy1.8:${gantVersion}") {
provided "org.apache.ant:ant:${antVersion}"
provided "jline:jline:$jlineVersion"
provided "org.fusesource.jansi:jansi:$jansiVersion"
provided("org.codehaus.gant:gant_groovy1.8:${gantVersion}") {
exclude group:'commons-cli', module:'commons-cli'
exclude group:'org.apache.ant', module:'ant'
}

}

sourceSets {
main {
compileClasspath += files(configurations.optional)
}
test {
compileClasspath += files(configurations.optional)
runtimeClasspath += files(configurations.optional)
}
}
javadoc.classpath += files(configurations.optional)
compileGroovy.doFirst {
delete("${buildDir}/classes/main/META-INF")
ant.mkdir(dir:sourceSets.main.output.classesDir)
Expand Down
6 changes: 3 additions & 3 deletions grails-plugin-async/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
compile 'javax.servlet:javax.servlet-api:3.0.1', provided
compile 'javax:javaee-web-api:6.0', provided
provided "javax.servlet:javax.servlet-api:$servletApiVersion"
provided 'javax:javaee-web-api:6.0'
compile project(':grails-plugin-controllers'), project(':grails-plugin-events')
}
}
1 change: 1 addition & 0 deletions grails-plugin-converters/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ dependencies {

compile project(":grails-web"),
project(':grails-plugin-domain-class')
provided project(":grails-async")
}
18 changes: 0 additions & 18 deletions grails-plugin-datasource/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
configurations {
optional
}
dependencies {
compile("org.springframework:spring-jdbc:${springVersion}") {
exclude group: 'commons-logging', module:'commons-logging'
Expand All @@ -15,20 +12,5 @@ dependencies {
compile "org.apache.tomcat:tomcat-jdbc:$tomcatVersion"
runtime "org.apache.tomcat.embed:tomcat-embed-logging-log4j:$tomcatVersion"

optional 'hsqldb:hsqldb:1.8.0.10'

optional 'com.h2database:h2:1.3.176'

compile project(":grails-core")
}

sourceSets {
main {
compileClasspath += files(configurations.optional)
}
test {
compileClasspath += files(configurations.optional)
runtimeClasspath += files(configurations.optional)
}
}
javadoc.classpath += files(configurations.optional)
4 changes: 1 addition & 3 deletions grails-plugin-domain-class/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ dependencies {

compile project(":grails-core"), project(":grails-spring"), project(":grails-validation")

compile project(":grails-async"), {
ext.notInPom = true
}
provided project(":grails-async")

// Datastore APIs
compile("org.grails:grails-datastore-gorm:$datastoreVersion") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class DomainClassPluginSupport {
return true
}

def constraints = object.constraints
def constraints = object.getConstraints()
if (constraints) {
for (prop in constraints.values()) {
prop.messageSource = ctx.getBean("messageSource")
Expand Down
3 changes: 2 additions & 1 deletion grails-plugin-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ dependencies {
}

runtime "cglib:cglib:${cglibVersion}"

provided "org.apache.ant:ant:${antVersion}"
}

eclipse {
Expand All @@ -44,4 +46,3 @@ eclipse {
}
}
}

13 changes: 1 addition & 12 deletions grails-plugin-url-mappings/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
configurations {
optional
}
dependencies {
compile "commons-lang:commons-lang:$commonsLangVersion"
compile( "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:${concurrentlinkedhashmapVersion}" ) {
exclude group: 'commons-logging', module:'commons-logging'
}

compile project(":grails-web"), project(":grails-plugin-controllers"), project(":grails-validation")
optional "junit:junit:${junitVersion}"
provided "junit:junit:${junitVersion}"
}
sourceSets {
main {
compileClasspath += files(configurations.optional)
}
test {
runtimeClasspath += files(configurations.optional)
}
}
27 changes: 5 additions & 22 deletions grails-test/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
configurations {
optional
}
dependencies {

compile "org.springframework:spring-tx:${springVersion}"
Expand All @@ -15,37 +12,23 @@ dependencies {
compile "junit:junit:${junitVersion}", {
exclude group:'org.hamcrest', module: 'hamcrest-core'
}
compile("org.spockframework:spock-core:${spockVersion}") {
compile("org.spockframework:spock-core:${spockVersion}") {
transitive = false
exclude group:'junit', module: 'junit-dep'
exclude group:'org.codehaus.groovy', module: 'groovy-all'
}

// needed for Spock
compile 'org.objenesis:objenesis:1.4'

compile project(":grails-plugin-converters"), project(":grails-plugin-mimetypes")
compile project(":grails-web")

// command line requirements
optional "jline:jline:$jlineVersion"
optional "org.fusesource.jansi:jansi:$jansiVersion"
provided "jline:jline:$jlineVersion"
provided "org.fusesource.jansi:jansi:$jansiVersion"

// Ant
optional "org.apache.ant:ant:${antVersion}"
optional "org.apache.ant:ant-junit:${antVersion}"
provided "org.apache.ant:ant:${antVersion}"
provided "org.apache.ant:ant-junit:${antVersion}"

// needed for Spock
compile "org.objenesis:objenesis:${objenesisVersion}"
}

sourceSets {
main {
compileClasspath += files(configurations.optional)
}
test {
compileClasspath += files(configurations.optional)
runtimeClasspath += files(configurations.optional)
}
}
javadoc.classpath += files(configurations.optional)
3 changes: 1 addition & 2 deletions grails-web-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ dependencies {
compile project(":grails-gsp")

compile "org.codehaus.groovy:groovy-templates:$groovyVersion"
compile 'javax.servlet:javax.servlet-api:3.0.1', provided

compile "org.springframework:spring-webmvc:${springVersion}"
compile "org.springframework:spring-context-support:${springVersion}"
compile 'com.google.code.gson:gson:2.2.4'
}
}
15 changes: 1 addition & 14 deletions grails-web-gsp/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
configurations {
optional
}


dependencies {
compile( project(":grails-gsp") )
compile( project(":grails-web-common") )
Expand All @@ -16,13 +11,5 @@ dependencies {
// }

testRuntime( project(":grails-spring") )
optional "org.apache.ant:ant:${antVersion}"
provided "org.apache.ant:ant:${antVersion}"
}

sourceSets {
main {
compileClasspath += files(configurations.optional)
}
}

javadoc.classpath += files(configurations.optional)
16 changes: 2 additions & 14 deletions grails-web-url-mappings/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
configurations {
optional
}
dependencies {
compile project(":grails-web-common"),
project(":grails-validation")

compile 'javax.servlet:javax.servlet-api:3.0.1', provided
compile("org.grails:grails-datastore-core:$datastoreVersion") {
exclude group: 'org.springframework', module:'spring-core'
exclude group: 'org.springframework', module:'spring-context'
Expand All @@ -30,14 +26,6 @@ dependencies {
exclude group: 'commons-logging', module:'commons-logging'
}

optional "org.fusesource.jansi:jansi:$jansiVersion"
optional "jline:jline:$jlineVersion"
provided "org.fusesource.jansi:jansi:$jansiVersion"
provided "jline:jline:$jlineVersion"
}
sourceSets {
main {
compileClasspath += files(configurations.optional)
}
test {
runtimeClasspath += files(configurations.optional)
}
}

0 comments on commit d3b5e46

Please sign in to comment.