This is an automated email from the ASF dual-hosted git repository. benw pushed a commit to branch gradle-improvements in repository https://gitbox.apache.org/repos/asf/tapestry-5.git
commit a8f7bdb12ab68ce49d409b1bfa9d4b6d2bd8d111 Author: Ben Weidig <b...@netzgut.net> AuthorDate: Sun Jun 15 13:09:03 2025 +0200 TAP5-2809: fix deprecations, cleanup --- .../main/groovy/tapestry.testng-convention.gradle | 16 ------- genericsresolver-guava/build.gradle | 2 +- tapestry-beanvalidator/build.gradle | 6 +-- tapestry-clojure/build.gradle | 2 +- tapestry-hibernate-core/build.gradle | 2 +- tapestry-hibernate/build.gradle | 6 +-- tapestry-ioc-jcache/build.gradle | 2 +- tapestry-ioc/build.gradle | 2 +- tapestry-jpa/build.gradle | 49 ++++------------------ tapestry-kaptcha/build.gradle | 2 +- tapestry-mongodb/build.gradle | 2 +- tapestry-rest-jackson/build.gradle | 2 +- tapestry-runner/build.gradle | 2 +- tapestry-spring/build.gradle | 2 +- tapestry-upload/build.gradle | 2 +- tapestry-webresources/build.gradle | 4 +- 16 files changed, 27 insertions(+), 76 deletions(-) diff --git a/buildSrc/src/main/groovy/tapestry.testng-convention.gradle b/buildSrc/src/main/groovy/tapestry.testng-convention.gradle index 2d00b95c3..2962c3670 100644 --- a/buildSrc/src/main/groovy/tapestry.testng-convention.gradle +++ b/buildSrc/src/main/groovy/tapestry.testng-convention.gradle @@ -9,22 +9,6 @@ dependencies { } tasks.withType(Test).configureEach { testTask -> - /* - useTestNG { - def suiteFile = [ - 'src/test/resources/testng.xml', - 'src/test/conf/testng.xml' - ].find { path -> - project.file(path).exists() - } - if (suiteFile) { - logger.lifecycle "!!!!!!!!!!!!!!!!!!TestNG: Using suite file: ${suiteFile}" - suites suiteFile // Pass the relative path string - } else { - logger.lifecycle '!!!!!!!!!!!!!!!!!TestNG: No suite file found in standard locations, using default configuration' - } - } - */ def suiteFile = [ 'src/test/resources/testng.xml', diff --git a/genericsresolver-guava/build.gradle b/genericsresolver-guava/build.gradle index 6762729eb..9fa32c2cf 100644 --- a/genericsresolver-guava/build.gradle +++ b/genericsresolver-guava/build.gradle @@ -3,7 +3,7 @@ plugins { } description = "Replaces the Tapestry Commons's own Java Generics resolution code with the one from Google Guava's one" -ext.moduleLibs = [ +def moduleLibs = [ guava: 'com.google.guava:guava:27.0.1-jre', ] diff --git a/tapestry-beanvalidator/build.gradle b/tapestry-beanvalidator/build.gradle index d7c2014c3..26a49253a 100644 --- a/tapestry-beanvalidator/build.gradle +++ b/tapestry-beanvalidator/build.gradle @@ -6,7 +6,7 @@ import t5build.* description = 'Support for JSR-303 Bean Validation via the Hibernate validator implementation' -ext.moduleLibs = [ +def moduleLibs = [ hibernateValidator: 'org.hibernate:hibernate-validator:8.0.1.Final', ] @@ -27,12 +27,12 @@ dependencies { def generatedOutputBaseDir = 'src/main/generated' task compileCoffeeScript(type: CompileCoffeeScript) { - outputDir "${generatedOutputBaseDir}/compiled-coffeescript" + outputDir = "${generatedOutputBaseDir}/compiled-coffeescript" } // Start up the test app, useful when debugging failing integration tests task runTestApp303(type:JavaExec) { - main = 'org.apache.tapestry5.test.JettyRunner' + mainClass = 'org.apache.tapestry5.test.JettyRunner' args "-d", "src/test/webapp", "-p", "8080" classpath += project.sourceSets.test.runtimeClasspath } diff --git a/tapestry-clojure/build.gradle b/tapestry-clojure/build.gradle index 6e1bfa77c..dde7f7942 100644 --- a/tapestry-clojure/build.gradle +++ b/tapestry-clojure/build.gradle @@ -3,7 +3,7 @@ plugins { } description = 'Allows Clojure functions to be injected into Tapestry services and components' -ext.moduleLibs = [ +def moduleLibs = [ clojure: 'org.clojure:clojure:1.6.0', ] diff --git a/tapestry-hibernate-core/build.gradle b/tapestry-hibernate-core/build.gradle index 88e63acaf..d90175664 100644 --- a/tapestry-hibernate-core/build.gradle +++ b/tapestry-hibernate-core/build.gradle @@ -4,7 +4,7 @@ plugins { description = 'Basic Hibernate services for Tapestry, useable outside of a Tapestry web application' -ext.moduleLibs = [ +def moduleLibs = [ jaxbRuntime: 'org.glassfish.jaxb:jaxb-runtime:2.3.2', ] diff --git a/tapestry-hibernate/build.gradle b/tapestry-hibernate/build.gradle index 0cee4c56d..37892a798 100644 --- a/tapestry-hibernate/build.gradle +++ b/tapestry-hibernate/build.gradle @@ -4,7 +4,7 @@ plugins { description = 'Provides support for simple CRUD applications built on top of Tapestry and Hibernate' -ext.moduleLibs = [ +def moduleLibs = [ jbossLogging: 'org.jboss.logging:jboss-logging:3.3.0.Final', ] @@ -21,8 +21,8 @@ dependencies { jar.manifest.attributes 'Tapestry-Module-Classes': 'org.apache.tapestry5.hibernate.web.modules.HibernateModule' task runTestApp0(type:JavaExec) { - description 'Start tapestry-hibernate integration test app, useful when debugging failing integration tests' - main = 'org.apache.tapestry5.test.JettyRunner' + description = 'Start tapestry-hibernate integration test app, useful when debugging failing integration tests' + mainClass = 'org.apache.tapestry5.test.JettyRunner' args "-d", "src/test/webapp", "-p", "8080" classpath += project.sourceSets.test.runtimeClasspath } diff --git a/tapestry-ioc-jcache/build.gradle b/tapestry-ioc-jcache/build.gradle index 07cc1df77..bab5d7717 100644 --- a/tapestry-ioc-jcache/build.gradle +++ b/tapestry-ioc-jcache/build.gradle @@ -4,7 +4,7 @@ plugins { description = 'JCache (JSR 107) integration for Tapestry-IoC' -ext.moduleLibs = [ +def moduleLibs = [ javaxCacheApi: 'javax.cache:cache-api:1.0.0', javaxCacheTests: 'javax.cache:cache-tests:1.0.0', javaxCacheDomain: 'javax.cache:test-domain:1.0.0', diff --git a/tapestry-ioc/build.gradle b/tapestry-ioc/build.gradle index 9fb52df35..31cd32795 100644 --- a/tapestry-ioc/build.gradle +++ b/tapestry-ioc/build.gradle @@ -24,5 +24,5 @@ dependencies { test { // Override the master build.gradle - systemProperties.remove("tapestry.service-reloading-enabled") + systemProperties.remove('tapestry.service-reloading-enabled') } diff --git a/tapestry-jpa/build.gradle b/tapestry-jpa/build.gradle index ba7e471a2..b6dc77069 100644 --- a/tapestry-jpa/build.gradle +++ b/tapestry-jpa/build.gradle @@ -4,7 +4,7 @@ plugins { description = 'Provides support for simple CRUD applications built on top of Tapestry and JPA' -ext.moduleLibs = [ +def moduleLibs = [ jakartaCdiApi: 'jakarta.enterprise:jakarta.enterprise.cdi-api:3.0.1', eclipselink: 'org.eclipse.persistence:eclipselink:3.0.4', dbcp: 'org.apache.tomcat:dbcp:6.0.32', @@ -28,44 +28,11 @@ dependencies { jar.manifest.attributes 'Tapestry-Module-Classes': 'org.apache.tapestry5.jpa.modules.JpaModule' -task runTestApp1(type:JavaExec) { - description 'Start app1 integration test app, useful when debugging failing integration tests' - main = 'org.apache.tapestry5.test.JettyRunner' - args "-d", "src/test/app1", "-p", "8080" - classpath += project.sourceSets.test.runtimeClasspath -} - -task runTestApp2(type:JavaExec) { - description 'Start app2 integration test app, useful when debugging failing integration tests' - main = 'org.apache.tapestry5.test.JettyRunner' - args "-d", "src/test/app2", "-p", "8080" - classpath += project.sourceSets.test.runtimeClasspath -} - -task runTestApp3(type:JavaExec) { - description 'Start app3 integration test app, useful when debugging failing integration tests' - main = 'org.apache.tapestry5.test.JettyRunner' - args "-d", "src/test/app3", "-p", "8080" - classpath += project.sourceSets.test.runtimeClasspath -} - -task runTestApp4(type:JavaExec) { - description 'Start app4 integration test app, useful when debugging failing integration tests' - main = 'org.apache.tapestry5.test.JettyRunner' - args "-d", "src/test/app4", "-p", "8080" - classpath += project.sourceSets.test.runtimeClasspath -} - -task runTestApp5(type:JavaExec) { - description 'Start app5 integration test app, useful when debugging failing integration tests' - main = 'org.apache.tapestry5.test.JettyRunner' - args "-d", "src/test/app5", "-p", "8080" - classpath += project.sourceSets.test.runtimeClasspath -} - -task runTestApp6(type:JavaExec) { - description 'Start app6 integration test app, useful when debugging failing integration tests' - main = 'org.apache.tapestry5.test.JettyRunner' - args "-d", "src/test/app6", "-p", "8080" - classpath += project.sourceSets.test.runtimeClasspath +(1..6).each { i -> + tasks.register("runTestApp$i", JavaExec) { + description = "Start app$i integration test app, useful when debugging failing integration tests" + mainClass = 'org.apache.tapestry5.test.JettyRunner' + args "-d", "src/test/app$i", "-p", "8080" + classpath = project.sourceSets.test.runtimeClasspath + } } diff --git a/tapestry-kaptcha/build.gradle b/tapestry-kaptcha/build.gradle index cb1a26c1c..48848bbf5 100644 --- a/tapestry-kaptcha/build.gradle +++ b/tapestry-kaptcha/build.gradle @@ -4,7 +4,7 @@ plugins { description = 'Kaptcha user verification support' -ext.moduleLibs= [ +def moduleLibs= [ kaptcha: 'com.github.axet:kaptcha:0.0.8', ] dependencies { diff --git a/tapestry-mongodb/build.gradle b/tapestry-mongodb/build.gradle index e9d3aaecd..10fe2eb32 100644 --- a/tapestry-mongodb/build.gradle +++ b/tapestry-mongodb/build.gradle @@ -6,7 +6,7 @@ import groovy.transform.AutoExternalize description = 'Basic MongoDB services for Tapestry, useable outside of a Tapestry web application' -ext.moduleLibs = [ +def moduleLibs = [ mongoJavaDriver: 'org.mongodb:mongo-java-driver:2.10.1', jongo: 'org.jongo:jongo:0.3', embedMongo: 'de.flapdoodle.embed:de.flapdoodle.embed.mongo:1.28', diff --git a/tapestry-rest-jackson/build.gradle b/tapestry-rest-jackson/build.gradle index 01f7efd19..c40d9f11b 100644 --- a/tapestry-rest-jackson/build.gradle +++ b/tapestry-rest-jackson/build.gradle @@ -1,6 +1,6 @@ description = "Support for using Jackson Databind with the Tapestry REST support" -ext.moduleLibs = [ +def moduleLibs = [ jacksonDatabind: 'com.fasterxml.jackson.core:jackson-databind:2.13.1', jsonschemaGenerator: 'com.github.victools:jsonschema-generator:4.20.0', ] diff --git a/tapestry-runner/build.gradle b/tapestry-runner/build.gradle index 2cf2b129a..315f529c5 100644 --- a/tapestry-runner/build.gradle +++ b/tapestry-runner/build.gradle @@ -1,6 +1,6 @@ description = 'Utilities for running a Tapestry application in Jetty or Tomcat as part of test suite.' -ext.moduleVersions = [ +def moduleVersions = [ jetty: '11.0.16', tomcat: '10.1.13', commonsCli: '1.2', diff --git a/tapestry-spring/build.gradle b/tapestry-spring/build.gradle index acdfb62eb..57da96e2c 100644 --- a/tapestry-spring/build.gradle +++ b/tapestry-spring/build.gradle @@ -8,7 +8,7 @@ description = 'Integration of Tapestry with the Spring Inversion Of Control Cont sourceCompatibility = '17' targetCompatibility = '17' -ext.moduleLibs = [ +def moduleLibs = [ springWebsocket: 'org.springframework:spring-websocket:6.0.11', ] diff --git a/tapestry-upload/build.gradle b/tapestry-upload/build.gradle index 234e6ed71..ad518f74f 100644 --- a/tapestry-upload/build.gradle +++ b/tapestry-upload/build.gradle @@ -4,7 +4,7 @@ plugins { description = 'File Upload component, with supporting services' -ext.moduleLibs = [ +def moduleLibs = [ commonsFileupload2: 'org.apache.commons:commons-fileupload2-jakarta:2.0.0-M1', ] diff --git a/tapestry-webresources/build.gradle b/tapestry-webresources/build.gradle index 6505e3608..4a55e2dcb 100644 --- a/tapestry-webresources/build.gradle +++ b/tapestry-webresources/build.gradle @@ -5,7 +5,7 @@ plugins { description = 'Integration with WRO4J to perform runtime CoffeeScript compilation, JavaScript minimization, and more.' -ext.moduleLibs = [ +def moduleLibs = [ closureCompiler: 'com.google.javascript:closure-compiler-unshaded:v20220502', less4j: 'com.github.sommeri:less4j:1.12.0', autoValueAnnotations: 'com.google.auto.value:auto-value-annotations:1.9', @@ -30,7 +30,7 @@ dependencies { exclude group: 'org.codehaus.groovy', module: 'groovy-all' // avoid multiple Groovy compilers on classpath } - testImplementation project(":tapestry-spock") + testImplementation project(":tapestry-spock") testImplementation libs.selenium.java testImplementation libs.webdrivermanager }