Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ subprojects {
}
}

tasks.withType(Test).configureEach {
failOnNoDiscoveredTests = false
}

tasks.named('assemble') {
dependsOn processResources, compileJava, jar
}
Expand Down Expand Up @@ -236,7 +240,7 @@ tasks.register('aggregateJavadoc', Javadoc) {
dependsOn configurations.javadoc

maxMemory = '512m'
destinationDir = layout.buildDirectory.dir('documentation/javadocs').get().asFile
destinationDirectory = layout.buildDirectory.dir('documentation/javadocs')

def tapestryStylesheet = file('src/javadoc/stylesheet7.css')
int thisYear = java.time.Year.now().getValue()
Expand Down Expand Up @@ -285,15 +289,15 @@ tasks.register('aggregateJavadoc', Javadoc) {
doLast {
copy {
from allMainJavaSrcDirs
into aggregateJavadoc.destinationDir
into aggregateJavadoc.destinationDirectory
exclude '**/*.java'
exclude '**/*.xdoc'
exclude '**/package.html'
}

copy {
from file('src/javadoc/images')
into aggregateJavadoc.destinationDir
into aggregateJavadoc.destinationDirectory
}
}
}
Expand Down Expand Up @@ -381,7 +385,7 @@ tasks.register('zippedSources', Zip) {

destinationDirectory = layout.buildDirectory
archiveBaseName = 'apache-tapestry'
version project.version
archiveVersion = project.version
archiveClassifier = 'sources'

from project.projectDir
Expand All @@ -407,7 +411,7 @@ tasks.register('zippedApidoc', Zip) {

destinationDirectory = layout.buildDirectory
archiveBaseName = 'apache-tapestry'
version project.version
archiveVersion = project.version
archiveClassifier = 'apidocs'

from(file('src/docroot-template')) {
Expand All @@ -429,8 +433,8 @@ tasks.register('zippedApidoc', Zip) {
}

tasks.register('zippedBinaries', Zip) {
group 'Release artifact'
description 'Zip archive of binaries of each sub-project'
group = 'Release artifact'
description = 'Zip archive of binaries of each sub-project'

// TODO: Plus dependencies?
// This may create a few unwanted dependencies, but does
Expand All @@ -439,7 +443,7 @@ tasks.register('zippedBinaries', Zip) {

destinationDirectory = layout.buildDirectory
archiveBaseName = 'apache-tapestry'
version project.version
archiveVersion = project.version
archiveClassifier = 'bin'

// This is via some experimentation
Expand Down Expand Up @@ -480,10 +484,10 @@ if (canDeploy) {
}

tasks.register('generateChecksums', GenerateChecksums) {
group 'Release artifact'
description 'Creates MD5/SHA256 checksums for archives of source and JavaDoc'
group = 'Release artifact'
description = 'Creates MD5/SHA256 checksums for archives of source and JavaDoc'

source tasks.withType(Zip)
source.from(tasks.withType(Zip))
outputDir = layout.buildDirectory.dir('checksums').get().getAsFile()
}

Expand All @@ -502,18 +506,18 @@ if (canDeploy) {
// to all Apache mirrors (after about a 24 hour delay).

tasks.register('copyArchives', Copy) {
group 'Release artifact'
description 'Copies build archives (source, bin, docs) to a configured deployment folder, along with MD5 and SHA-256 checksums and PGP signatures (if signing is enabled)'
group = 'Release artifact'
description = 'Copies build archives (source, bin, docs) to a configured deployment folder, along with MD5 and SHA-256 checksums and PGP signatures (if signing is enabled)'

destinationDir = file(archiveDeployFolder.get())
into file(archiveDeployFolder.get())

from tasks.generateChecksums
from configurations.uploads.allArtifacts.files
}

tasks.register('generateRelease') {
group 'Release artifact'
description 'Generates and uploads a final release to Apache Nexus and copies archives for deployment'
group = 'Release artifact'
description = 'Generates and uploads a final release to Apache Nexus and copies archives for deployment'

dependsOn subprojects.assemble, subprojects.uploadPublished, subprojects.publish, copyArchives
}
Expand Down
7 changes: 4 additions & 3 deletions buildSrc/src/main/groovy/t5build/GenerateChecksums.groovy
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
package t5build

import org.gradle.api.DefaultTask
import org.gradle.api.file.DirectoryProperty
import org.gradle.api.tasks.InputFiles
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.SourceTask
import org.gradle.api.file.ConfigurableFileCollection

import java.security.MessageDigest

class GenerateChecksums extends SourceTask {
class GenerateChecksums extends DefaultTask {

enum Algorithm {
MD5('MD5', 32, 'md5'),
Expand All @@ -27,6 +25,9 @@ class GenerateChecksums extends SourceTask {
}
}

@InputFiles
ConfigurableFileCollection source = project.objects.fileCollection()

@OutputDirectory
File outputDir

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ tasks.withType(Test).configureEach { testTask ->
environment.LANG = 'en_US.UTF-8'

testLogging {
exceptionFormat 'full'
exceptionFormat = 'full'
events 'passed', 'skipped', 'failed'
showStandardStreams = true
}
Expand All @@ -42,21 +42,19 @@ tasks.withType(Test).configureEach { testTask ->
}
total++
if (total % 25 == 0) {
logger.lifecycle "Project ${project.name}: Tests run: ${total}, Passed: ${passed}, Failed: ${failed}, Skipped: ${skipped}"
logger.lifecycle "Project ${projectName}: Tests run: ${total}, Passed: ${passed}, Failed: ${failed}, Skipped: ${skipped}"
}
}

afterSuite { descriptor, result ->
// The root suite has a null parent. We only want to log the final summary.
if (descriptor.parent == null) {
total = passed + failed + skipped
// Using project.path gives a clear identifier like ":tapestry-core"
def projectName = project.path

// Don't log if no tests were run
if (total > 0) {
logger.lifecycle "------------------------------------------------------------------------"
logger.lifecycle "Test Results for ${projectName}"
logger.lifecycle "Test Results for ${projectPath}"
logger.lifecycle " Tests run: ${total}, Passed: ${passed}, Failed: ${failed}, Skipped: ${skipped}"
logger.lifecycle "------------------------------------------------------------------------"
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion tapestry-webresources/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
test {
systemProperties(
'tapestry.page-load-timeout': '60',
'tapestry.compiled-asset-cache-dir': "$buildDir/compiled-asset-cache",
'tapestry.compiled-asset-cache-dir': "${layout.buildDirectory.get().asFile}/compiled-asset-cache",
'tapestry.production-mode': 'false',
'tapestry.compress-whitespace': 'false',
'tapestry.combine-scripts': 'false'
Expand Down