You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2012/01/20 19:09:39 UTC

svn commit: r1234047 - /tapestry/tapestry5/trunk/build.gradle

Author: hlship
Date: Fri Jan 20 18:09:38 2012
New Revision: 1234047

URL: http://svn.apache.org/viewvc?rev=1234047&view=rev
Log:
A number of simplifications & cleanups to the Gradle build

Modified:
    tapestry/tapestry5/trunk/build.gradle

Modified: tapestry/tapestry5/trunk/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/build.gradle?rev=1234047&r1=1234046&r2=1234047&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/build.gradle (original)
+++ tapestry/tapestry5/trunk/build.gradle Fri Jan 20 18:09:38 2012
@@ -20,260 +20,262 @@ doSign = !project.hasProperty('noSign') 
 
 allprojects {
 
-    apply plugin: 'eclipse'
-    apply plugin: 'idea'
+  apply plugin: 'eclipse'
+  apply plugin: 'idea'
 
-    repositories {
-        mavenCentral()
+  repositories {
+    mavenCentral()
 
-        // All things JBoss/Hibernate
-        mavenRepo name: "JBoss", url: "https://repository.jboss.org/nexus/content/repositories/releases/"
-    }
-
-    idea {
-        project {
-            // Technically, Tapestry is built for JDK 1.5, but we're all using Eclipse or IntelliJ with
-            // JDK 1.6 at this point.
-            jdkName = "1.6"
-        }
+    // All things JBoss/Hibernate
+    mavenRepo name: "JBoss", url: "https://repository.jboss.org/nexus/content/repositories/releases/"
+  }
+
+  idea {
+    project {
+      // Technically, Tapestry is built for JDK 1.5, but we're all using Eclipse or IntelliJ with
+      // JDK 1.6 at this point.
+      jdkName = "1.6"
     }
+  }
 
 }
 
 subprojects {
-    version = parent.version
+  version = parent.version
 
-    group = 'org.apache.tapestry'
+  group = 'org.apache.tapestry'
 
-    configurations {
-        provided
-        deployerJars
+  configurations {
+    provided
+    deployerJars
 
-        // meta -- non-code artifacts, such as sources and javadoc JARs
-        meta
-    }
+    // meta -- non-code artifacts, such as sources and javadoc JARs
+    meta
+  }
 
-    apply plugin: 'java'
-    apply plugin: 'groovy' // mostly for testing
-    apply plugin: 'maven'
-    apply plugin: 'project-report'
-
-    sourceCompatibility = '1.5'
-    targetCompatibility = '1.5'
-
-    // See http://jira.codehaus.org/browse/GRADLE-784
-
-    sourceSets {
-        main {
-            compileClasspath += configurations.provided
-        }
-        test {
-            compileClasspath += configurations.provided
-            runtimeClasspath += configurations.provided
-        }
-    }
+  apply plugin: 'java'
+  apply plugin: 'groovy' // mostly for testing
+  apply plugin: 'maven'
+  apply plugin: 'project-report'
 
-    idea.module {
-        scopes.PROVIDED.plus += configurations.provided
-    }
+  sourceCompatibility = '1.5'
+  targetCompatibility = '1.5'
 
-    dependencies {
-        groovy "org.codehaus.groovy:groovy-all:1.7.4"
+  // See http://jira.codehaus.org/browse/GRADLE-784
 
-        deployerJars "org.apache.maven.wagon:wagon-http-lightweight:1.0-beta-6"
+  sourceSets {
+    main {
+      compileClasspath += configurations.provided
     }
-
     test {
-        useTestNG()
+      compileClasspath += configurations.provided
+      runtimeClasspath += configurations.provided
+    }
+  }
 
-        options.suites("src/test/conf/testng.xml")
+  idea.module {
+    scopes.PROVIDED.plus += configurations.provided
+  }
 
-        maxHeapSize = "400M"
+  dependencies {
+    groovy "org.codehaus.groovy:groovy-all:1.7.4"
 
-        // Turn off live service reloading
+    deployerJars "org.apache.maven.wagon:wagon-http-lightweight:1.0-beta-6"
+  }
 
-        systemProperties["tapestry.service-reloading-enabled"] = "false"
+  test {
+    useTestNG()
 
-        jvmArgs("-XX:MaxPermSize=512m", "-Dfile.encoding=UTF-8")
-    }
+    options.suites("src/test/conf/testng.xml")
 
-    task sourcesJar(type: Jar, dependsOn: classes) {
-        classifier = 'sources'
-        from sourceSets.main.allSource
-    }
+    maxHeapSize "400M"
 
-    artifacts {
-        meta sourcesJar
-    }
+    // Turn off live service reloading
+
+    systemProperties["tapestry.service-reloading-enabled"] = "false"
+
+    jvmArgs("-XX:MaxPermSize=512m", "-Dfile.encoding=UTF-8")
+  }
 
+  task sourcesJar(type: Jar) {
+    dependsOn classes
+    classifier 'sources'
+    from sourceSets.main.allSource
+  }
 
-    configurations {
-        // published -- what gets uploaded to the Nexus repository
-        published.extendsFrom archives, meta
+  artifacts {
+    meta sourcesJar
+  }
 
-        if (doSign)
-        { published.extendsFrom signatures }
+
+  configurations {
+    // published -- what gets uploaded to the Nexus repository
+    published.extendsFrom archives, meta
+
+    if (doSign) { 
+      published.extendsFrom signatures 
     }
+  }
+
+  if (doSign) {
+    apply plugin: 'signing'
+    // sign (create PGP signature for) archives (standard JARs)
+    // and meta (sources JARs)
+    signing { sign configurations.archives, configurations.meta }
+  }
 
-    if (doSign)
-    {
-        apply plugin: 'signing'
-        // sign (create PGP signature for) archives (standard JARs)
-        // and meta (sources JARs)
-        signing { sign configurations.archives, configurations.meta }
+  // apacheDeployUserName and apacheDeployPassword should be specified in ~/.gradle/gradle.properties
+
+  deployUsernameProperty = isSnapshot() ? "snapshotDeployUserName" : "apacheDeployUserName"
+  deployPasswordProperty = isSnapshot() ? "snapshotDeployPassword" : "apacheDeployPassword"
+  canDeploy = [deployUsernameProperty, deployPasswordProperty].every { project.hasProperty(it) }
+
+  uploadPublished {
+
+    doFirst {
+      if (!canDeploy) {
+        throw new InvalidUserDataException("Missing upload credentials. Set '$deployUsernameProperty' and '$deployPasswordProperty' project properties.")
+      }
     }
 
-    // apacheDeployUserName and apacheDeployPassword should be specified in ~/.gradle/gradle.properties
+    if (canDeploy) {
+      repositories {
 
-    deployUsernameProperty = isSnapshot() ? "snapshotDeployUserName" : "apacheDeployUserName"
-    deployPasswordProperty = isSnapshot() ? "snapshotDeployPassword" : "apacheDeployPassword"
-    canDeploy = [deployUsernameProperty, deployPasswordProperty].every { project.hasProperty(it) }
-
-    uploadPublished {
-
-        doFirst {
-            if (!canDeploy)
-            {
-                throw new InvalidUserDataException("Missing upload credentials. Set '$deployUsernameProperty' and '$deployPasswordProperty' project properties.")
-            }
-        }
+        project.deployer = repositories.mavenDeployer {
+
+          repository(url: stagingUrl) {
+            authentication(userName: project.getProperty(deployUsernameProperty), password: project.getProperty(deployPasswordProperty))
+          }
 
-        if (canDeploy)
-        {
-            repositories {
-
-                project.deployer = repositories.mavenDeployer {
-
-                    repository(url: stagingUrl) {
-                        authentication(userName: project.getProperty(deployUsernameProperty), password: project.getProperty(deployPasswordProperty))
-                    }
-
-                    snapshotRepository(url: snapshotUrl) {
-                        authentication(userName: project.getProperty(deployUsernameProperty), password: project.getProperty(deployPasswordProperty))
-                    }
-                }
-            }
+          snapshotRepository(url: snapshotUrl) {
+            authentication(userName: project.getProperty(deployUsernameProperty), password: project.getProperty(deployPasswordProperty))
+          }
         }
+      }
     }
+  }
 }
 
 // Specific to top-level build, not set for subprojects:
 
 configurations {
-    javadoc
-    published.extendsFrom archives, meta
-    if (doSign)
-    { published.extendsFrom signatures }
+  javadoc
+  published.extendsFrom archives, meta
+  if (doSign) { 
+    published.extendsFrom signatures 
+  }
 }
 
 dependencies {
-    javadoc project(':tapestry-javadoc')
+  javadoc project(':tapestry-javadoc')
 }
 
 subprojects.each { project.evaluationDependsOn(it.name) }
 
 // Cribbed from https://github.com/hibernate/hibernate-core/blob/master/release/release.gradle#L19
 
-javadocBuildDir = dir(buildDirName + "/documentation/javadocs")
-
-task aggregateJavadoc(type: Javadoc, group: "Documentation") {
+task aggregateJavadoc(type: Javadoc) {
 
-    dependsOn configurations.javadoc
+  dependsOn configurations.javadoc
+  group "Documentation"
 
-    description = "Build the aggregated JavaDocs for all modules"
-    maxMemory = '512m'
-    destinationDir = javadocBuildDir.dir
-    configure(options) {
-        // overview = new File( projectDir, 'src/javadoc/package.html' )
-        splitIndex = true
-        linkSource = true
-        stylesheetFile = new File(projectDir, 'src/javadoc/stylesheet.css')
-        windowTitle = 'Tapestry API Documentation'
-        docTitle = "Tapestry JavaDoc ($project.version)"
-        bottom = "Copyright &copy; 2003-2012 <a href=\"http://tapestry.apache.org\">The Apache Software Foundation</a>."
-        use = true
-        links = ['http://download.oracle.com/javase/6/docs/api/', 'http://download.oracle.com/javaee/6/api/']
-        addStringOption "tagletpath", configurations.javadoc.asPath
-        addStringOption "taglet", "org.apache.tapestry5.javadoc.TapestryDocTaglet"
-        exclude "org/apache/tapestry5/internal/plastic/asm/**"
-    }
-
-    subprojects.each({ sp -> sp.name != "quickstart" }).each { sp ->
-        sp.sourceSets.find { set -> set.name != "test" }.each { set ->
-
-            source set.java
-
-            classpath += set.output + set.compileClasspath
-
-            // Some of the component .xdoc files refer to PNG images
-            // (we could also exclude .java and .xdoc)
-            copy {
-                from set.java.srcDirs.toList()
-                into javadocBuildDir.dir
-                include '**/*.png'
-            }
-        }
+  description "Build the aggregated JavaDocs for all modules"
+  maxMemory '512m'
+  destinationDir file("$buildDirName/documentation/javadocs")
+  configure(options) {
+    splitIndex true
+    linkSource true
+    stylesheetFile file('src/javadoc/stylesheet.css')
+    windowTitle 'Tapestry API Documentation'
+    docTitle "Tapestry JavaDoc ($project.version)"
+    bottom 'Copyright &copy; 2003-2012 <a href="http://tapestry.apache.org">The Apache Software Foundation</a>.'
+    use = true // 'use' seems to be a reserved word for the DSL
+    links 'http://download.oracle.com/javase/6/docs/api/'
+    links 'http://download.oracle.com/javaee/6/api/'
+    addStringOption "tagletpath", configurations.javadoc.asPath
+    addStringOption "taglet", "org.apache.tapestry5.javadoc.TapestryDocTaglet"
+    exclude "org/apache/tapestry5/internal/plastic/asm/**"
+  }
+
+  subprojects.each({ sp -> sp.name != "quickstart" }).each { sp ->
+    sp.sourceSets.find { set -> set.name != "test" }.each { set ->
+
+      source set.java
+
+      classpath += set.output + set.compileClasspath
+
+      // Some of the component .xdoc files refer to PNG images
+      // (we could also just exclude .java and .xdoc and copy anything else)
+      copy {
+        from set.java.srcDirs.toList()
+        into aggregateJavadoc.destinationDir
+        include '**/*.png'
+      }
     }
+  }
 }
 
 aggregateJavadoc.doLast {
-    copy {
-        from new File(projectDir, 'src/javadoc/images')
-        into new File(javadocBuildDir.dir, "/images")
-    }
+  copy {
+    from file('src/javadoc/images')
+    into aggregateJavadoc.destinationDir
+  }
 }
 
-task clean(type: Delete) {
-    delete buildDirName
+task clean(type: Delete) {      
+  delete buildDirName
 }
 
-task continuousIntegration(dependsOn: [subprojects.build, 'aggregateJavadoc', subprojects.uploadPublished],
-        description: "Task executed on Jenkins CI server after SVN commits")
+task continuousIntegration {
+  dependsOn subprojects.build, 'aggregateJavadoc', subprojects.uploadPublished
+  description "Task executed on Jenkins CI server after SVN commits"
+}
 
-task generateRelease(dependsOn: ['quickstart:clean', 'continuousIntegration', subprojects.uploadPublished, 'zippedSources', 'zippedJavadoc'],
-        group: "Release artifact",
-        description: "Generates and uploads a final release to Apache Nexus")
+task generateRelease {
+  dependsOn 'quickstart:clean', 'continuousIntegration', subprojects.uploadPublished, 'zippedSources', 'zippedJavadoc'
+  group "Release artifact"
+  description "Generates and uploads a final release to Apache Nexus"
+}
 
 task wrapper(type: Wrapper) {
-    gradleVersion = '1.0-milestone-7'
-    description = "Regenerates the Gradle Wrapper files"
+  description "Regenerates the Gradle Wrapper files"
 }
 
 task zippedSources(type: Zip) {
-    description = "Creates a combined Zip file of all sub-project's sources"
-    group = "Release artifact"
+  description "Creates a combined Zip file of all sub-project's sources"
+  group "Release artifact"
+
+  destinationDir buildDir
+  baseName "apache-tapestry"
+  version project.version
+  classifier "sources"
+
+  from project.projectDir
+  exclude "out/**"
+  exclude "**/*.iml"
+  exclude "**/*.ipr"
+  exclude "**/*.iws"
+  exclude "**/.*/**"
+  exclude "**/bin/**"
+  exclude "**/target/**"
+  exclude "**/build/**"
+  exclude "**/test-output/**"  // Left around by TestNG sometimes
+}
+
+task zippedJavadoc(type: Zip) {
+  dependsOn aggregateJavadoc
+  description "Zip archive of the project's aggregate JavaDoc"
+  group "Release artifact"
+
+  destinationDir buildDir
+  baseName "apache-tapestry"
+  version project.version
+  classifier "javadocs"
+
+  from aggregateJavadoc.outputs.files
+  into "apidocs"
+}
 
-    destinationDir = buildDir
-    baseName = "apache-tapestry"
-    version = project.version
-    classifier = "sources"
-
-    from project.projectDir
-    exclude "out/**"
-    exclude "**/*.iml"
-    exclude "**/*.ipr"
-    exclude "**/*.iws"
-    exclude "**/.*/**"
-    exclude "**/bin/**"
-    exclude "**/target/**"
-    exclude "**/build/**"
-    exclude "**/test-output/**"  // Left around by TestNG sometimes
-}
-
-task zippedJavadoc(type: Zip, dependsOn: aggregateJavadoc) {
-    description = "Zip archive of the project's aggregate JavaDoc"
-    group = "Release artifact"
-
-    destinationDir = buildDir
-    baseName = "apache-tapestry"
-    version = project.version
-    classifier = "javadocs"
-
-    from javadocBuildDir.dir
-    into "apidocs"
-}
-
-boolean isSnapshot()
-{
-    project.version.contains('SNAPSHOT')
+boolean isSnapshot() {
+  project.version.contains('SNAPSHOT')
 }



Re: svn commit: r1234047 - /tapestry/tapestry5/trunk/build.gradle

Posted by Ulrich Stärk <ul...@spielviel.de>.
I just stumbled upon this trying to import Tapestry into a fresh Eclipse project and the compiler
giving me errors about @Override all over the place.

jdkName="1.6" apparently sets IDEA's build compatibility to 1.6, inserting 1.6 features all over the
place. If I'm not mistaken, we are now shipping Tapestry with Java 1.6 as a requirement, something
the PMC has discussed numerous times but no concensus was found and even more importantly, something
we haven't told our users.

I'm going to revert this to 1.5 and remove all 1.6 features so that we once again are 1.5 compatible.

Uli

On 20.01.2012 19:09, hlship@apache.org wrote:
> Author: hlship
> Date: Fri Jan 20 18:09:38 2012
> New Revision: 1234047
>
> URL: http://svn.apache.org/viewvc?rev=1234047&view=rev
> Log:
> A number of simplifications & cleanups to the Gradle build
>
> Modified:
>     tapestry/tapestry5/trunk/build.gradle
>
> Modified: tapestry/tapestry5/trunk/build.gradle
> URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/build.gradle?rev=1234047&r1=1234046&r2=1234047&view=diff
> ==============================================================================
> --- tapestry/tapestry5/trunk/build.gradle (original)
> +++ tapestry/tapestry5/trunk/build.gradle Fri Jan 20 18:09:38 2012
> @@ -20,260 +20,262 @@ doSign = !project.hasProperty('noSign') 
>  
>  allprojects {
>  
> -    apply plugin: 'eclipse'
> -    apply plugin: 'idea'
> +  apply plugin: 'eclipse'
> +  apply plugin: 'idea'
>  
> -    repositories {
> -        mavenCentral()
> +  repositories {
> +    mavenCentral()
>  
> -        // All things JBoss/Hibernate
> -        mavenRepo name: "JBoss", url: "https://repository.jboss.org/nexus/content/repositories/releases/"
> -    }
> -
> -    idea {
> -        project {
> -            // Technically, Tapestry is built for JDK 1.5, but we're all using Eclipse or IntelliJ with
> -            // JDK 1.6 at this point.
> -            jdkName = "1.6"
> -        }
> +    // All things JBoss/Hibernate
> +    mavenRepo name: "JBoss", url: "https://repository.jboss.org/nexus/content/repositories/releases/"
> +  }
> +
> +  idea {
> +    project {
> +      // Technically, Tapestry is built for JDK 1.5, but we're all using Eclipse or IntelliJ with
> +      // JDK 1.6 at this point.
> +      jdkName = "1.6"
>      }
> +  }
>  
>  }
>  
>  subprojects {
> -    version = parent.version
> +  version = parent.version
>  
> -    group = 'org.apache.tapestry'
> +  group = 'org.apache.tapestry'
>  
> -    configurations {
> -        provided
> -        deployerJars
> +  configurations {
> +    provided
> +    deployerJars
>  
> -        // meta -- non-code artifacts, such as sources and javadoc JARs
> -        meta
> -    }
> +    // meta -- non-code artifacts, such as sources and javadoc JARs
> +    meta
> +  }
>  
> -    apply plugin: 'java'
> -    apply plugin: 'groovy' // mostly for testing
> -    apply plugin: 'maven'
> -    apply plugin: 'project-report'
> -
> -    sourceCompatibility = '1.5'
> -    targetCompatibility = '1.5'
> -
> -    // See http://jira.codehaus.org/browse/GRADLE-784
> -
> -    sourceSets {
> -        main {
> -            compileClasspath += configurations.provided
> -        }
> -        test {
> -            compileClasspath += configurations.provided
> -            runtimeClasspath += configurations.provided
> -        }
> -    }
> +  apply plugin: 'java'
> +  apply plugin: 'groovy' // mostly for testing
> +  apply plugin: 'maven'
> +  apply plugin: 'project-report'
>  
> -    idea.module {
> -        scopes.PROVIDED.plus += configurations.provided
> -    }
> +  sourceCompatibility = '1.5'
> +  targetCompatibility = '1.5'
>  
> -    dependencies {
> -        groovy "org.codehaus.groovy:groovy-all:1.7.4"
> +  // See http://jira.codehaus.org/browse/GRADLE-784
>  
> -        deployerJars "org.apache.maven.wagon:wagon-http-lightweight:1.0-beta-6"
> +  sourceSets {
> +    main {
> +      compileClasspath += configurations.provided
>      }
> -
>      test {
> -        useTestNG()
> +      compileClasspath += configurations.provided
> +      runtimeClasspath += configurations.provided
> +    }
> +  }
>  
> -        options.suites("src/test/conf/testng.xml")
> +  idea.module {
> +    scopes.PROVIDED.plus += configurations.provided
> +  }
>  
> -        maxHeapSize = "400M"
> +  dependencies {
> +    groovy "org.codehaus.groovy:groovy-all:1.7.4"
>  
> -        // Turn off live service reloading
> +    deployerJars "org.apache.maven.wagon:wagon-http-lightweight:1.0-beta-6"
> +  }
>  
> -        systemProperties["tapestry.service-reloading-enabled"] = "false"
> +  test {
> +    useTestNG()
>  
> -        jvmArgs("-XX:MaxPermSize=512m", "-Dfile.encoding=UTF-8")
> -    }
> +    options.suites("src/test/conf/testng.xml")
>  
> -    task sourcesJar(type: Jar, dependsOn: classes) {
> -        classifier = 'sources'
> -        from sourceSets.main.allSource
> -    }
> +    maxHeapSize "400M"
>  
> -    artifacts {
> -        meta sourcesJar
> -    }
> +    // Turn off live service reloading
> +
> +    systemProperties["tapestry.service-reloading-enabled"] = "false"
> +
> +    jvmArgs("-XX:MaxPermSize=512m", "-Dfile.encoding=UTF-8")
> +  }
>  
> +  task sourcesJar(type: Jar) {
> +    dependsOn classes
> +    classifier 'sources'
> +    from sourceSets.main.allSource
> +  }
>  
> -    configurations {
> -        // published -- what gets uploaded to the Nexus repository
> -        published.extendsFrom archives, meta
> +  artifacts {
> +    meta sourcesJar
> +  }
>  
> -        if (doSign)
> -        { published.extendsFrom signatures }
> +
> +  configurations {
> +    // published -- what gets uploaded to the Nexus repository
> +    published.extendsFrom archives, meta
> +
> +    if (doSign) { 
> +      published.extendsFrom signatures 
>      }
> +  }
> +
> +  if (doSign) {
> +    apply plugin: 'signing'
> +    // sign (create PGP signature for) archives (standard JARs)
> +    // and meta (sources JARs)
> +    signing { sign configurations.archives, configurations.meta }
> +  }
>  
> -    if (doSign)
> -    {
> -        apply plugin: 'signing'
> -        // sign (create PGP signature for) archives (standard JARs)
> -        // and meta (sources JARs)
> -        signing { sign configurations.archives, configurations.meta }
> +  // apacheDeployUserName and apacheDeployPassword should be specified in ~/.gradle/gradle.properties
> +
> +  deployUsernameProperty = isSnapshot() ? "snapshotDeployUserName" : "apacheDeployUserName"
> +  deployPasswordProperty = isSnapshot() ? "snapshotDeployPassword" : "apacheDeployPassword"
> +  canDeploy = [deployUsernameProperty, deployPasswordProperty].every { project.hasProperty(it) }
> +
> +  uploadPublished {
> +
> +    doFirst {
> +      if (!canDeploy) {
> +        throw new InvalidUserDataException("Missing upload credentials. Set '$deployUsernameProperty' and '$deployPasswordProperty' project properties.")
> +      }
>      }
>  
> -    // apacheDeployUserName and apacheDeployPassword should be specified in ~/.gradle/gradle.properties
> +    if (canDeploy) {
> +      repositories {
>  
> -    deployUsernameProperty = isSnapshot() ? "snapshotDeployUserName" : "apacheDeployUserName"
> -    deployPasswordProperty = isSnapshot() ? "snapshotDeployPassword" : "apacheDeployPassword"
> -    canDeploy = [deployUsernameProperty, deployPasswordProperty].every { project.hasProperty(it) }
> -
> -    uploadPublished {
> -
> -        doFirst {
> -            if (!canDeploy)
> -            {
> -                throw new InvalidUserDataException("Missing upload credentials. Set '$deployUsernameProperty' and '$deployPasswordProperty' project properties.")
> -            }
> -        }
> +        project.deployer = repositories.mavenDeployer {
> +
> +          repository(url: stagingUrl) {
> +            authentication(userName: project.getProperty(deployUsernameProperty), password: project.getProperty(deployPasswordProperty))
> +          }
>  
> -        if (canDeploy)
> -        {
> -            repositories {
> -
> -                project.deployer = repositories.mavenDeployer {
> -
> -                    repository(url: stagingUrl) {
> -                        authentication(userName: project.getProperty(deployUsernameProperty), password: project.getProperty(deployPasswordProperty))
> -                    }
> -
> -                    snapshotRepository(url: snapshotUrl) {
> -                        authentication(userName: project.getProperty(deployUsernameProperty), password: project.getProperty(deployPasswordProperty))
> -                    }
> -                }
> -            }
> +          snapshotRepository(url: snapshotUrl) {
> +            authentication(userName: project.getProperty(deployUsernameProperty), password: project.getProperty(deployPasswordProperty))
> +          }
>          }
> +      }
>      }
> +  }
>  }
>  
>  // Specific to top-level build, not set for subprojects:
>  
>  configurations {
> -    javadoc
> -    published.extendsFrom archives, meta
> -    if (doSign)
> -    { published.extendsFrom signatures }
> +  javadoc
> +  published.extendsFrom archives, meta
> +  if (doSign) { 
> +    published.extendsFrom signatures 
> +  }
>  }
>  
>  dependencies {
> -    javadoc project(':tapestry-javadoc')
> +  javadoc project(':tapestry-javadoc')
>  }
>  
>  subprojects.each { project.evaluationDependsOn(it.name) }
>  
>  // Cribbed from https://github.com/hibernate/hibernate-core/blob/master/release/release.gradle#L19
>  
> -javadocBuildDir = dir(buildDirName + "/documentation/javadocs")
> -
> -task aggregateJavadoc(type: Javadoc, group: "Documentation") {
> +task aggregateJavadoc(type: Javadoc) {
>  
> -    dependsOn configurations.javadoc
> +  dependsOn configurations.javadoc
> +  group "Documentation"
>  
> -    description = "Build the aggregated JavaDocs for all modules"
> -    maxMemory = '512m'
> -    destinationDir = javadocBuildDir.dir
> -    configure(options) {
> -        // overview = new File( projectDir, 'src/javadoc/package.html' )
> -        splitIndex = true
> -        linkSource = true
> -        stylesheetFile = new File(projectDir, 'src/javadoc/stylesheet.css')
> -        windowTitle = 'Tapestry API Documentation'
> -        docTitle = "Tapestry JavaDoc ($project.version)"
> -        bottom = "Copyright &copy; 2003-2012 <a href=\"http://tapestry.apache.org\">The Apache Software Foundation</a>."
> -        use = true
> -        links = ['http://download.oracle.com/javase/6/docs/api/', 'http://download.oracle.com/javaee/6/api/']
> -        addStringOption "tagletpath", configurations.javadoc.asPath
> -        addStringOption "taglet", "org.apache.tapestry5.javadoc.TapestryDocTaglet"
> -        exclude "org/apache/tapestry5/internal/plastic/asm/**"
> -    }
> -
> -    subprojects.each({ sp -> sp.name != "quickstart" }).each { sp ->
> -        sp.sourceSets.find { set -> set.name != "test" }.each { set ->
> -
> -            source set.java
> -
> -            classpath += set.output + set.compileClasspath
> -
> -            // Some of the component .xdoc files refer to PNG images
> -            // (we could also exclude .java and .xdoc)
> -            copy {
> -                from set.java.srcDirs.toList()
> -                into javadocBuildDir.dir
> -                include '**/*.png'
> -            }
> -        }
> +  description "Build the aggregated JavaDocs for all modules"
> +  maxMemory '512m'
> +  destinationDir file("$buildDirName/documentation/javadocs")
> +  configure(options) {
> +    splitIndex true
> +    linkSource true
> +    stylesheetFile file('src/javadoc/stylesheet.css')
> +    windowTitle 'Tapestry API Documentation'
> +    docTitle "Tapestry JavaDoc ($project.version)"
> +    bottom 'Copyright &copy; 2003-2012 <a href="http://tapestry.apache.org">The Apache Software Foundation</a>.'
> +    use = true // 'use' seems to be a reserved word for the DSL
> +    links 'http://download.oracle.com/javase/6/docs/api/'
> +    links 'http://download.oracle.com/javaee/6/api/'
> +    addStringOption "tagletpath", configurations.javadoc.asPath
> +    addStringOption "taglet", "org.apache.tapestry5.javadoc.TapestryDocTaglet"
> +    exclude "org/apache/tapestry5/internal/plastic/asm/**"
> +  }
> +
> +  subprojects.each({ sp -> sp.name != "quickstart" }).each { sp ->
> +    sp.sourceSets.find { set -> set.name != "test" }.each { set ->
> +
> +      source set.java
> +
> +      classpath += set.output + set.compileClasspath
> +
> +      // Some of the component .xdoc files refer to PNG images
> +      // (we could also just exclude .java and .xdoc and copy anything else)
> +      copy {
> +        from set.java.srcDirs.toList()
> +        into aggregateJavadoc.destinationDir
> +        include '**/*.png'
> +      }
>      }
> +  }
>  }
>  
>  aggregateJavadoc.doLast {
> -    copy {
> -        from new File(projectDir, 'src/javadoc/images')
> -        into new File(javadocBuildDir.dir, "/images")
> -    }
> +  copy {
> +    from file('src/javadoc/images')
> +    into aggregateJavadoc.destinationDir
> +  }
>  }
>  
> -task clean(type: Delete) {
> -    delete buildDirName
> +task clean(type: Delete) {      
> +  delete buildDirName
>  }
>  
> -task continuousIntegration(dependsOn: [subprojects.build, 'aggregateJavadoc', subprojects.uploadPublished],
> -        description: "Task executed on Jenkins CI server after SVN commits")
> +task continuousIntegration {
> +  dependsOn subprojects.build, 'aggregateJavadoc', subprojects.uploadPublished
> +  description "Task executed on Jenkins CI server after SVN commits"
> +}
>  
> -task generateRelease(dependsOn: ['quickstart:clean', 'continuousIntegration', subprojects.uploadPublished, 'zippedSources', 'zippedJavadoc'],
> -        group: "Release artifact",
> -        description: "Generates and uploads a final release to Apache Nexus")
> +task generateRelease {
> +  dependsOn 'quickstart:clean', 'continuousIntegration', subprojects.uploadPublished, 'zippedSources', 'zippedJavadoc'
> +  group "Release artifact"
> +  description "Generates and uploads a final release to Apache Nexus"
> +}
>  
>  task wrapper(type: Wrapper) {
> -    gradleVersion = '1.0-milestone-7'
> -    description = "Regenerates the Gradle Wrapper files"
> +  description "Regenerates the Gradle Wrapper files"
>  }
>  
>  task zippedSources(type: Zip) {
> -    description = "Creates a combined Zip file of all sub-project's sources"
> -    group = "Release artifact"
> +  description "Creates a combined Zip file of all sub-project's sources"
> +  group "Release artifact"
> +
> +  destinationDir buildDir
> +  baseName "apache-tapestry"
> +  version project.version
> +  classifier "sources"
> +
> +  from project.projectDir
> +  exclude "out/**"
> +  exclude "**/*.iml"
> +  exclude "**/*.ipr"
> +  exclude "**/*.iws"
> +  exclude "**/.*/**"
> +  exclude "**/bin/**"
> +  exclude "**/target/**"
> +  exclude "**/build/**"
> +  exclude "**/test-output/**"  // Left around by TestNG sometimes
> +}
> +
> +task zippedJavadoc(type: Zip) {
> +  dependsOn aggregateJavadoc
> +  description "Zip archive of the project's aggregate JavaDoc"
> +  group "Release artifact"
> +
> +  destinationDir buildDir
> +  baseName "apache-tapestry"
> +  version project.version
> +  classifier "javadocs"
> +
> +  from aggregateJavadoc.outputs.files
> +  into "apidocs"
> +}
>  
> -    destinationDir = buildDir
> -    baseName = "apache-tapestry"
> -    version = project.version
> -    classifier = "sources"
> -
> -    from project.projectDir
> -    exclude "out/**"
> -    exclude "**/*.iml"
> -    exclude "**/*.ipr"
> -    exclude "**/*.iws"
> -    exclude "**/.*/**"
> -    exclude "**/bin/**"
> -    exclude "**/target/**"
> -    exclude "**/build/**"
> -    exclude "**/test-output/**"  // Left around by TestNG sometimes
> -}
> -
> -task zippedJavadoc(type: Zip, dependsOn: aggregateJavadoc) {
> -    description = "Zip archive of the project's aggregate JavaDoc"
> -    group = "Release artifact"
> -
> -    destinationDir = buildDir
> -    baseName = "apache-tapestry"
> -    version = project.version
> -    classifier = "javadocs"
> -
> -    from javadocBuildDir.dir
> -    into "apidocs"
> -}
> -
> -boolean isSnapshot()
> -{
> -    project.version.contains('SNAPSHOT')
> +boolean isSnapshot() {
> +  project.version.contains('SNAPSHOT')
>  }
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org