Skip to content

Commit

Permalink
whitespace, STS warnings, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
burtbeckwith committed May 28, 2011
1 parent 5ed3f75 commit 4a69917
Show file tree
Hide file tree
Showing 563 changed files with 5,847 additions and 6,411 deletions.
22 changes: 10 additions & 12 deletions build.gradle
Expand Up @@ -55,7 +55,7 @@ subprojects { project ->
targetCompatibility = "1.5"
archivesBaseName = 'grails'
version = grailsVersion
group = "org.grails"
group = "org.grails"

manifest.mainAttributes(
"Built-By": System.properties['user.name'],
Expand All @@ -81,7 +81,6 @@ subprojects { project ->
mavenRepo(urls: "http://repo.grails.org/grails/core") {
if (project.hasProperty('snapshotTimeout')) {
setSnapshotTimeout(Long.parseLong(project.snapshotTimeout))

}
}
}
Expand All @@ -105,7 +104,6 @@ subprojects { project ->
testCompile('org.spockframework:spock-core:0.5-groovy-1.8') {
transitive = false
}

}

install.doLast {
Expand Down Expand Up @@ -133,9 +131,9 @@ subprojects { project ->
from javadoc.destinationDir
}

groovydoc.doLast {
delete("${buildDir}/tmp")
}
groovydoc.doLast {
delete("${buildDir}/tmp")
}

configurations {
meta
Expand All @@ -156,11 +154,11 @@ subprojects { project ->

project.deployer = repositories.mavenDeployer {
repository(url: url) {
beforeDeployment { deployment ->
["sources", "javadoc"].each { type ->
deployment.addArtifact configurations.meta.artifacts.find { it.classifier == type }
}
}
beforeDeployment { deployment ->
["sources", "javadoc"].each { type ->
deployment.addArtifact configurations.meta.artifacts.find { it.classifier == type }
}
}
final username = project.properties["artifactoryPublishUsername"]
final password = project.properties["artifactoryPublishPassword"]

Expand All @@ -173,8 +171,8 @@ subprojects { project ->
}
}
}
uploadArchives.dependsOn sourcesJar, javadocJar

uploadArchives.dependsOn sourcesJar, javadocJar

/*
Install a method that can be used to fine tune the poms, e.g…
Expand Down
123 changes: 58 additions & 65 deletions gradle/assemble.gradle
@@ -1,69 +1,66 @@
import org.apache.tools.ant.filters.ReplaceTokens

dependencyCache = {
def cacheLocation = new File(gradle.gradleUserHomeDir, "cache")
copy {
from( cacheLocation ) {
def dependencyIncludes = [] as Set
def includeClosure = { artifact ->
def dependency = artifact.getResolvedDependency()
def file = artifact.file
def cacheLocation = new File(gradle.gradleUserHomeDir, "cache")
copy {
from(cacheLocation) {
def dependencyIncludes = [] as Set
def includeClosure = { artifact ->
def dependency = artifact.getResolvedDependency()
def file = artifact.file
dependencyIncludes << "${dependency.moduleGroup}/${dependency.moduleName}/*-${dependency.moduleVersion}.*"
dependencyIncludes << "${dependency.moduleGroup}/${dependency.moduleName}/jars/${dependency.moduleName}-${dependency.moduleVersion}.jar"
dependencyIncludes << "${dependency.moduleGroup}/${dependency.moduleName}/bundles/${dependency.moduleName}-${dependency.moduleVersion}.jar"
}
for(project in subprojects) {
project.configurations.compile.resolvedConfiguration.resolvedArtifacts.each(includeClosure)
project.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each(includeClosure)
project.configurations.findByName("jsp21")?.resolvedConfiguration?.resolvedArtifacts?.each(includeClosure)
project.configurations.findByName("agent")?.resolvedConfiguration?.resolvedArtifacts?.each(includeClosure)
}
includes = dependencyIncludes as List
exclude "org.grails/**"
}
into "$projectDir/lib"
}
copy {
from ( cacheLocation ) {
includes = ['org.grails/grails-datastore-gorm/jars/grails-datastore-gorm-*.jar',
'org.grails/grails-gdoc-engine/jars/grails-gdoc-engine-*.jar']
}
into "$projectDir/lib"
}

for (project in subprojects) {
project.configurations.compile.resolvedConfiguration.resolvedArtifacts.each(includeClosure)
project.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each(includeClosure)
project.configurations.findByName("jsp21")?.resolvedConfiguration?.resolvedArtifacts?.each(includeClosure)
project.configurations.findByName("agent")?.resolvedConfiguration?.resolvedArtifacts?.each(includeClosure)
}
includes = dependencyIncludes as List
exclude "org.grails/**"
}
into "$projectDir/lib"
}
copy {
from (cacheLocation) {
includes = ['org.grails/grails-datastore-gorm/jars/grails-datastore-gorm-*.jar',
'org.grails/grails-gdoc-engine/jars/grails-gdoc-engine-*.jar']
}
into "$projectDir/lib"
}
}

task populateDependencies {
doFirst dependencyCache
doFirst dependencyCache
}

task libs(dependsOn: getTasksByName("assemble", true)) {
doFirst dependencyCache
doFirst dependencyCache

destinationDir = 'dist'
doLast {
copy {
for(project in subprojects) {
from( project.libsDir ) {
include "*-${grailsVersion}.jar"
}
}
into 'dist'
}
copy {
from("$projectDir/grails-resources") {
include 'src/grails', 'src/war'
}
into projectDir
}

}
doLast {
copy {
for (project in subprojects) {
from(project.libsDir) {
include "*-${grailsVersion}.jar"
}
}
into 'dist'
}
copy {
from("$projectDir/grails-resources") {
include 'src/grails', 'src/war'
}
into projectDir
}
}
}

libs.inputs.files(subprojects.configurations.compile, subprojects.configurations.runtime)
libs.outputs.files(fileTree("lib"))


task pluginsFromSvn {
dir = "$buildDir/pluginsFromSvn"
grailsHibernateDest = "$dir/grails-hibernate-${grailsVersion}.zip"
Expand All @@ -72,12 +69,11 @@ task pluginsFromSvn {
doFirst {
ant {
mkdir(dir: dir)
def versionTag = grailsVersion.replaceAll(/\./, '_').toUpperCase()
def versionTag = grailsVersion.replaceAll(/\./, '_').toUpperCase()
get(src: "http://svn.codehaus.org/grails-plugins/grails-hibernate/tags/RELEASE_${versionTag}/grails-hibernate-${grailsVersion}.zip",
dest: grailsHibernateDest, verbose: true, usetimestamp: true)
dest: grailsHibernateDest, verbose: true, usetimestamp: true)
get(src: "http://svn.codehaus.org/grails-plugins/grails-tomcat/tags/RELEASE_${versionTag}/grails-tomcat-${grailsVersion}.zip",
dest: grailsTomcatDest, verbose: true, usetimestamp: true)

dest: grailsTomcatDest, verbose: true, usetimestamp: true)
}
}
}
Expand All @@ -90,19 +86,17 @@ distSpec = copySpec {
include 'lib/', 'gradle/', 'media/', 'samples/', 'scripts/', 'build.gradle', 'build.properties', 'dependencies.txt',
'LICENSE', 'INSTALL', "src/", "gradlew.bat","gradle.properties"
exclude 'ant/bin'

}
from("grails-resources") {
into "grails-$grailsVersion"
include 'src/grails/**', 'src/war/**'
from("grails-resources") {
into "grails-$grailsVersion"
include 'src/grails/**', 'src/war/**'
// this file is accounted for later with special handling to do some token replacement
exclude 'src/grails/grails-macros.xml'

}
}
from(projectDir) {
into "grails-$grailsVersion"
include "gradlew"
fileMode = 0755
into "grails-$grailsVersion"
include "gradlew"
fileMode = 0755
}
from(docs.destinationDir) {
into "grails-$grailsVersion/doc"
Expand All @@ -122,18 +116,17 @@ distSpec = copySpec {
from("grails-resources/src/grails/home/bash") {
into "grails-$grailsVersion/bin"
filter(ReplaceTokens, tokens: ['grails.version': grailsVersion])
filter(ReplaceTokens, tokens: ['groovy.version': groovyVersion])
filter(ReplaceTokens, tokens: ['groovy.version': groovyVersion])
filter(ReplaceTokens, tokens: ['spring.loaded.version': springLoadedVersion])
fileMode = 0755
}
from("grails-resources/src/grails/home/conf") {
into "grails-$grailsVersion/conf"
filter(ReplaceTokens, tokens: ['grails.version': grailsVersion])
filter(ReplaceTokens, tokens: ['grails.version': grailsVersion])
filter(ReplaceTokens, tokens: ['groovy.version': groovyVersion])
filter(ReplaceTokens, tokens: ['ant.version': antVersion])
filter(ReplaceTokens, tokens: ['gant.version': gantVersion])
filter(ReplaceTokens, tokens: ['ivy.version': ivyVersion])

}
from(libs.destinationDir) {
into "grails-$grailsVersion/dist"
Expand All @@ -147,9 +140,9 @@ distSpec = copySpec {

task zipDist(type: Zip,dependsOn:libs) {
from distSpec
destinationDir = "${buildDir}/distributions" as File
baseName = 'grails'
appendix = grailsVersion
destinationDir = "${buildDir}/distributions" as File
baseName = 'grails'
appendix = grailsVersion
}

/*task zipDoc(type: Zip) {
Expand Down
51 changes: 25 additions & 26 deletions gradle/docs.gradle
Expand Up @@ -10,29 +10,28 @@ task stubs {
mkdir(dir: destinationDir)
taskdef(name: "generatestubs", classname: "org.codehaus.groovy.grails.cli.GenerateStubsTask") {
classpath {
for(sub in subprojects) {
pathelement path: sub.sourceSets.main.compileClasspath.asPath
}
}
}
for(sub in subprojects) {
pathelement path: sub.sourceSets.main.compileClasspath.asPath
}
}
}

generatestubs(destdir: destinationDir) {
classpath {
for(sub in subprojects) {
pathelement path: sub.sourceSets.main.compileClasspath.asPath
}
for(sub in subprojects) {
pathelement path: sub.sourceSets.main.compileClasspath.asPath
}
}
src {
for(sub in subprojects) {
sub.sourceSets.main.groovy.srcDirs.each { srcDir ->
if(srcDir.exists()) {
dirset(dir: srcDir) {
exclude name: "**/*.properties"
}

}
}
}

for (sub in subprojects) {
sub.sourceSets.main.groovy.srcDirs.each { srcDir ->
if (srcDir.exists()) {
dirset(dir: srcDir) {
exclude name: "**/*.properties"
}
}
}
}
}
}
}
Expand All @@ -44,13 +43,13 @@ task docs {
}

task javadoc(type:Javadoc) {
classpath = files(subprojects.configurations.compile)
classpath = files(subprojects.configurations.compile)
dependsOn stubs
maxMemory = '256M'
destinationDir = file("$docs.destinationDir/javadoc")
source subprojects.sourceSets.main.groovy.srcDirs + stubs.destinationDir
include "org/codehaus/groovy/grails/**", "grails/**"
exclude "**/**.groovy"
exclude "**/**.groovy"
project.configure(options) {
windowTitle = "Grails $grailsVersion"
docTitle = "<h1>Grails</h1>"
Expand All @@ -67,8 +66,8 @@ task javadoc(type:Javadoc) {
}

task groovydoc(type:Groovydoc) {
classpath = files(subprojects.configurations.compile)
groovyClasspath = files(subprojects.configurations.compile)
classpath = files(subprojects.configurations.compile)
groovyClasspath = files(subprojects.configurations.compile)
destinationDir = file("$docs.destinationDir/api")
windowTitle = "Grails $grailsVersion"
docTitle = "Grails $grailsVersion"
Expand All @@ -78,9 +77,9 @@ task groovydoc(type:Groovydoc) {
// link("http://static.springsource.org/spring/docs/3.0.x/javadoc-api", "org.springframework.")
// link("http://download.oracle.com/javase/1.5.0/docs/api", "java." , "javax.")
// link("http://download.oracle.com/javaee/5/api", "javax.")
doLast {
delete("${buildDir}/tmp")
}
doLast {
delete("${buildDir}/tmp")
}
}

task fetchGrailsDocsSource << {
Expand Down
13 changes: 4 additions & 9 deletions grails-bootstrap/build.gradle
@@ -1,4 +1,5 @@
import org.apache.tools.ant.filters.ReplaceTokens

dependencies {
compile "org.springframework:spring-core:${springVersion}",
"org.springframework:spring-beans:${springVersion}",
Expand All @@ -7,7 +8,7 @@ dependencies {
"org.springframework:spring-context-support:${springVersion}"


compile( "org.springframework.uaa:org.springframework.uaa.client:1.0.1.RELEASE" ) {
compile("org.springframework.uaa:org.springframework.uaa.client:1.0.1.RELEASE") {
// Explicitly exclude OSGIified dependencies - GRAILS-7525
// Have to use excludes instead of transitive = false - GRADLE-1574
["protobuf-java-lite", "json-simple", "bcpg-jdk15", "bcprov-jdk15"].each { dep ->
Expand All @@ -19,18 +20,14 @@ dependencies {
compile 'com.google.protobuf:protobuf-java:2.3.0',
'com.googlecode.json-simple:json-simple:1.1',
"org.bouncycastle:bcpg-jdk15:1.45"



compile "commons-lang:commons-lang:$commonsLangVersion"
compile 'commons-cli:commons-cli:1.2'



compile( 'org.codehaus.gpars:gpars:0.9' ) {
compile('org.codehaus.gpars:gpars:0.9') {
exclude module:'netty'
}


// Ant
compile "org.apache.ant:ant:${antVersion}",
"org.apache.ant:ant-launcher:${antVersion}",
Expand All @@ -42,8 +39,6 @@ dependencies {
runtime 'org.coconut.forkjoin:jsr166y:070108', // Dependency for parallel execution in Gpars
'org.fusesource.jansi:jansi:1.2.1',
'jline:jline:0.9.94'


}

processResources{
Expand Down

0 comments on commit 4a69917

Please sign in to comment.