Repository: Vantiq/vantiq-extension-sources (language: python)

Issue:
Upgrade to Gradle 8 & uptake the dcompose plugin
Gradle deprecations to fix for 8

The AbstractArchiveTask.baseName property has been deprecated.	
This is scheduled to be removed in Gradle 8.0.	
Please use the archiveBaseName property instead.	
Documentation	
2 usages	
Script:camelComponent/build.gradle:77	
at org.gradle.api.tasks.bundling.AbstractArchiveTask.setBaseName(AbstractArchiveTask.java:259)	
•••
at build$_run_closure8.doCall(/Users/fcarter/Documents/dev/ves/camelComponent/build.gradle:77)	
•••
at build.run(/Users/fcarter/Documents/dev/ves/camelComponent/build.gradle:76)	
•••
Script:extjsdk/build.gradle:63	
at org.gradle.api.tasks.bundling.AbstractArchiveTask.setBaseName(AbstractArchiveTask.java:259)	
•••
at build$_run_closure7.doCall(/Users/fcarter/Documents/dev/ves/extjsdk/build.gradle:63)	
•••
at build.run(/Users/fcarter/Documents/dev/ves/extjsdk/build.gradle:62)	
•••
The AbstractArchiveTask.appendix property has been deprecated.	
This is scheduled to be removed in Gradle 8.0.	
Please use the archiveAppendix property instead.	
Documentation	
1 usage	
Script:extjsdk/build.gradle:91	
at org.gradle.api.tasks.bundling.AbstractArchiveTask.setAppendix(AbstractArchiveTask.java:304)	
•••
at build$_run_closure10.doCall(/Users/fcarter/Documents/dev/ves/extjsdk/build.gradle:91)	
•••
at build.run(/Users/fcarter/Documents/dev/ves/extjsdk/build.gradle:90)	
•••
The AbstractArchiveTask.archiveName property has been deprecated.	
This is scheduled to be removed in Gradle 8.0.	
Please use the archiveFileName property instead.	
Documentation	
1 usage	
Script:camelConnector/build.gradle:123	
at org.gradle.api.tasks.bundling.AbstractArchiveTask.setArchiveName(AbstractArchiveTask.java:131)	
•••
at build$_run_closure7.doCall(/Users/fcarter/Documents/dev/ves/camelConnector/build.gradle:123)	
•••
at build.run(/Users/fcarter/Documents/dev/ves/camelConnector/build.gradle:109)	
•••
The JavaExec.main property has been deprecated.	
This is scheduled to be removed in Gradle 8.0.	
Please use the mainClass property instead.	
Documentation	
1 usage	
Script:opcuaSource/build.gradle:94	
at org.gradle.api.tasks.JavaExec.setMain(JavaExec.java:420)	
•••
at build$_run_closure9.doCall(/Users/fcarter/Documents/dev/ves/opcuaSource/build.gradle:94)	
•••
at build.run(/Users/fcarter/Documents/dev/ves/opcuaSource/build.gradle:93)	
•••
The Report.enabled property has been deprecated.	
This is scheduled to be removed in Gradle 8.0.	
Please use the required property instead.	
Documentation	
1 usage	
Script:build.gradle:310	
at org.gradle.api.reporting.internal.SimpleReport.setEnabled(SimpleReport.java:111)	
•••
at build$_run_closure7$_closure32.doCall(/Users/fcarter/Documents/dev/ves/build.gradle:310)	
•••
at build$_run_closure7.doCall(/Users/fcarter/Documents/dev/ves/build.gradle:309)	
•••
at build.run(/Users/fcarter/Documents/dev/ves/build.gradle:284)


Discussion / hints:

Fix patch:
diff --git a/CSVSource/build.gradle b/CSVSource/build.gradle
index c3c3460a..e077a859 100644
--- a/CSVSource/build.gradle
+++ b/CSVSource/build.gradle
@@ -1,16 +1,27 @@
-group 'io.vantiq'
-version 'unspecified'
+plugins {
+    id 'java'
+    id 'application'
+}
 
-apply plugin: 'java'
-apply plugin: 'application'
+group'io.vantiq'
+version 'unspecified'
 
-sourceCompatibility = 1.8
+java {
+    sourceCompatibility = 1.8
+}
 
 repositories {
     mavenCentral()
 }
 
-mainClassName = 'io.vantiq.extsrc.CSVSource.CSVMain'
+application {
+    mainClassName = 'io.vantiq.extsrc.CSVSource.CSVMain'
+    // Copies the logger setup into logConfig in the distribution
+    applicationDistribution.from("src/main/resources") {
+        include "log4j2.xml"
+        into "logConfig"
+    }
+}
 
 startScripts{
     doLast{
@@ -22,12 +33,6 @@ startScripts{
     }
 }
 
-// Copies the logger setup into logConfig in the distribution
-applicationDistribution.from("src/main/resources") {
-    include "log4j2.xml"
-    into "logConfig"
-}
-
 dependencies {
     // This dependency is used internally, and not exposed to consumers on their own compile classpath.
     implementation "com.google.guava:guava:${guavaVersion}"
@@ -41,11 +46,11 @@ dependencies {
     testImplementation "io.vantiq:vantiq-sdk:${vantiqSDKVersion}"
     
     // Use JUnit test framework
-    testImplementation 'junit:junit:4.12'
+    testImplementation 'junit:junit:4.13.1'
     testImplementation project(path:":extjsdk", configuration:"testArtifacts")
 }
 
-tasks.withType(Test) {
+tasks.withType(Test).configureEach {
     if (rootProject.hasProperty('TestAuthToken')) {
         systemProperty 'TestAuthToken', rootProject.findProperty('TestAuthToken') ?: 'empty'
     }
@@ -65,9 +70,9 @@ tasks.withType(Test) {
         systemProperty 'EntMaxLinesInEvent', rootProject.findProperty('EntMaxLinesInEvent')
     }
     if (rootProject.hasProperty('EntDelimiter')) {
-        systemProperty 'EntDelimiter', rootProject.findProperty('EntDelimiter')?:","
+        systemProperty 'EntDelimiter', rootProject.findProperty('EntDelimiter') ?: ","
     }
     if (rootProject.hasProperty('EntFullFilePath')) {
-        systemProperty 'EntFullFilePath', rootProject.findProperty('EntFullFilePath')?:"b.csv"
+        systemProperty 'EntFullFilePath', rootProject.findProperty('EntFullFilePath') ?: "b.csv"
     }
 }
\ No newline at end of file
diff --git a/EasyModbusSource/build.gradle b/EasyModbusSource/build.gradle
index fed22b5c..53eda72f 100644
--- a/EasyModbusSource/build.gradle
+++ b/EasyModbusSource/build.gradle
@@ -1,17 +1,19 @@
+plugins {
+    id 'java'
+    id 'application'
+}
 
 group 'io.vantiq'
 version 'unspecified'
 
-apply plugin: 'java'
-apply plugin: 'application'
-
-sourceCompatibility = 1.8
+java {
+    sourceCompatibility = 1.8
+}
 
 repositories {
     mavenCentral()
 }
 
-mainClassName = 'io.vantiq.extsrc.EasyModbusSource.EasyModbusMain'
 
 startScripts{
     doLast{
@@ -23,10 +25,14 @@ startScripts{
     }
 }
 
-// Copies the logger setup into logConfig in the distribution
-applicationDistribution.from("src/main/resources") {
-    include "log4j2.xml"
-    into "logConfig"
+application {
+    mainClassName = 'io.vantiq.extsrc.EasyModbusSource.EasyModbusMain'
+
+    // Copies the logger setup into logConfig in the distribution
+    applicationDistribution.from("src/main/resources") {
+        include "log4j2.xml"
+        into "logConfig"
+    }
 }
 
 if (System.env.EASY_MODBUS_LOC == null ) {
@@ -48,18 +54,18 @@ dependencies {
     testImplementation "io.vantiq:vantiq-sdk:${vantiqSDKVersion}"
     
     // Use JUnit test framework
-    testImplementation 'junit:junit:4.12'
+    testImplementation 'junit:junit:4.13.1'
     testImplementation project(path:":extjsdk", configuration:"testArtifacts")
 
     // Used to create a connection pool if asynchronous processing has been specified for publish/query handlers
     implementation group: 'com.zaxxer', name: 'HikariCP', version: '3.3.1'
 
 }
-tasks.withType(Test) {
-	//if (System.env.EASYModBus_LOC == null) {
+tasks.withType(Test).configureEach {
+    //if (System.env.EASYModBus_LOC == null) {
     //	logger.warn("Some tests may have been skipped. Environment variable 'EASYModBus_LOC' is not set. " +
     //			"Please set it to a location containing the appropriate EasyModbus Driver .jar file.")
-    //}	
+    //}
     if (rootProject.hasProperty("EntConTestSourceName")) {
         systemProperty "EntConTestSourceName", rootProject.findProperty("EntConTestSourceName")
     }
@@ -72,7 +78,7 @@ tasks.withType(Test) {
     }
     if (rootProject.hasProperty("EntConIPAddress")) {
         systemProperty 'EntConIPAddress', rootProject.findProperty('EntConIPAddress') ?: "127.0.0.1"
-    } 
+    }
     if (rootProject.hasProperty("EntConIPPort")) {
         systemProperty "EntConIPPort", rootProject.findProperty("EntConIPPort") ?: "502"
     }
diff --git a/build.gradle b/build.gradle
index dae38420..a6a84038 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,3 +1,5 @@
+
+
 buildscript {
     repositories { mavenCentral() }
     dependencies {
@@ -12,26 +14,15 @@ plugins {
     id("io.freefair.lombok") version "6.3.0" // version "8.7.1
     id 'pl.allegro.tech.build.axion-release' version '1.6.0'
     id 'jacoco'
-    id 'com.chrisgahlert.gradle-dcompose-plugin' version '0.17.2' apply false
+    id 'com.vantiq.gradle-dcompose-plugin' version '0.18.0' apply false
+    id 'idea'
 }
 
 wrapper {
-    gradleVersion = '7.3.1'
+    gradleVersion = '8.9'
     distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
 }
 
-private Map getHostInfo() {
-    def info = [:]
-    try {
-        info.name = InetAddress.localHost.hostName
-        info.ip = InetAddress.localHost.hostAddress
-    } catch (Exception e) {
-        info.name = 'localhost'
-        info.ip = '127.0.0.1'
-    }
-    return info
-}
-
 group 'io.vantiq'
 
 ext {
@@ -45,10 +36,6 @@ ext {
     jacksonVersion = '2.17.2'
 }
 
-
-// Add idea support in root project to get around bug in Scala plugin
-apply plugin: 'idea'
-
 allprojects {
     group 'io.vantiq'
     //version scmVersion.version
@@ -80,7 +67,6 @@ if (!rootProject.hasProperty('dockerRegistryPassword')) {
     logger.warn('The property "dockerRegistryPassword" was not provided. This may affect publish operations.')
 }
 
-
 subprojects {
     apply plugin: 'groovy'
     apply plugin: 'idea'
@@ -88,7 +74,7 @@ subprojects {
     if (!['extpdk', 'pythonExecSource', 'kamelet2assembly'].contains(it.name)) {
         apply plugin: 'java'
     }
-    apply plugin: 'com.chrisgahlert.gradle-dcompose-plugin'
+    apply plugin: 'com.vantiq.gradle-dcompose-plugin'
 
     // Using gradle-dcompose-plugin to build/push docker images
     dcompose {
@@ -114,7 +100,7 @@ subprojects {
                 repositoryBase = repositoryBase.replace('//', '/')
                 repository = rootProject.hasProperty('imageTag') ? repositoryBase + ":${rootProject.getProperty('imageTag')}" : repositoryBase
                 logBuildStatus = true
-                buildLogFile = file("$buildDir/dockerBuildLog.txt")
+                buildLogFile = file(layout.buildDirectory.dir('dockerBuildLog.txt'))
             }
 
             // The credentials here should be stored in gradle.properties.
@@ -146,9 +132,10 @@ subprojects {
         apply plugin: "jacoco"
     }
 
-    sourceCompatibility = 1.8
-    java.sourceCompatibility = 1.8
-    java.targetCompatibility = JavaVersion.VERSION_1_8
+    java {
+        sourceCompatibility = 1.8
+        targetCompatibility = JavaVersion.VERSION_1_8
+    }
 
 
     // Simulate provided dependencies
@@ -233,8 +220,6 @@ subprojects {
     }
 }
 
-apply plugin: 'java'
-
 repositories {
     mavenCentral()
     maven { url 'https://jitpack.io' }
@@ -254,9 +239,9 @@ apply plugin: 'base'
 // Otherwise, this task will RUN ALL the tests, rather than just collecting the existing reports...
 //     
 task testReport(type: TestReport) {
-    destinationDir = file("$buildDir/reports/allTests")
+    destinationDirectory = file(layout.buildDirectory.dir('reports/allTests'))
     // Include the results from the `test` task in all subprojects
-    reportOn subprojects*.test
+    testResults.from(subprojects*.test*.binaryResultsDirectory)
 }
 
 def publishedProjects = subprojects.findAll()
@@ -307,7 +292,7 @@ task jacocoRootReport(type: JacocoReport, group: 'Coverage reports') {
     }
 
     reports {
-        html.enabled = true // human readable
-        xml.enabled = true // required by coveralls
+        html.required = true // human readable
+        xml.required = true // required by coveralls
     }
 }
diff --git a/camelAssemblies/build.gradle b/camelAssemblies/build.gradle
index 8c274f39..492de120 100644
--- a/camelAssemblies/build.gradle
+++ b/camelAssemblies/build.gradle
@@ -23,8 +23,8 @@ tasks.register('zipAssemblies') {
     outputs.upToDateWhen { false }
     def assyCount = 0
     doLast {
-        File vtqResources = new File(project.buildDir, "${generatedResourceBase}")
-        def distributions = new File(project.buildDir, "${distributionsDir}")
+        File vtqResources = new File(layout.buildDirectory.dir(generatedResourceBase).get().asFile.absolutePath)
+        def distributions = new File(layout.buildDirectory.dir(distributionsDir).get().asFile.absolutePath)
         mkdir(distributions)
         vtqResources.eachDir { resourceDir ->
             def projName = resourceDir.name
@@ -64,7 +64,7 @@ tasks.register('importAssemblies') {
             logger.lifecycle('Using {} as the "vantiq" command', catalogVantiqCommand)
         }
 
-        File genProjects = new File(project.buildDir, "${generatedResourceBase}")
+        File genProjects = new File(layout.buildDirectory.dir(generatedResourceBase).get().asFile.absolutePath)
         genProjects.eachDir { projectDir ->
             def assemblyName = projectDir.name
             def assyParts = assemblyName.split('\\.')
@@ -124,7 +124,7 @@ tasks.register('publishAssemblies') {
             changeLog = changeLog.replace(' ', '_')
         }
 
-        File genProjects = new File(project.buildDir, "${generatedResourceBase}")
+        File genProjects = new File(layout.buildDirectory.dir(generatedResourceBase).get().asFile.absolutePath)
         def projectFiles= project.fileTree(dir: genProjects, include: '**/projects/*.json')
         logger.debug('Project files: {}', projectFiles.asList())
         projectFiles.each { projectFile ->
diff --git a/camelComponent/build.gradle b/camelComponent/build.gradle
index 395824e5..f2980996 100644
--- a/camelComponent/build.gradle
+++ b/camelComponent/build.gradle
@@ -57,11 +57,11 @@ test {
     useJUnitPlatform()
 }
 
-tasks.withType(JavaCompile) {
+tasks.withType(JavaCompile).configureEach {
     options.encoding = 'UTF-8'
 }
 
-tasks.withType(Test) {
+tasks.withType(Test).configureEach {
     if (rootProject.hasProperty("TestAuthToken")) {
         systemProperty "TestAuthToken", rootProject.findProperty("TestAuthToken") ?: "empty"
     }
@@ -69,12 +69,12 @@ tasks.withType(Test) {
         systemProperty "TestVantiqServer", rootProject.findProperty("TestVantiqServer") ?: "empty"
     }
     // Use the build dir as a base to get our various test artifacts.
-    systemProperty "buildDir", "${buildDir}"
+    systemProperty "buildDir", layout.buildDirectory.get().asFile.absolutePath
 }
 
 
 task testJar (type: Jar) {
-    baseName = "${project.name}-test"
+    archiveBaseName = "${project.name}-test"
     from sourceSets.test.output
 }
 
diff --git a/camelConnector/build.gradle b/camelConnector/build.gradle
index 9c34e524..1b1dfcdb 100644
--- a/camelConnector/build.gradle
+++ b/camelConnector/build.gradle
@@ -10,8 +10,6 @@ plugins {
     id("io.freefair.lombok")   //version "6.3.0" // version "8.7.1"
 }
 
-mainClassName = 'io.vantiq.extsrc.camelconn.connector.CamelMain'
-
 startScripts{
     // Use shorter classpath here. We've injected the complete list into the main jar file's manifest.
     classpath = jar.outputs.files
@@ -25,9 +23,13 @@ startScripts{
 }
 
 // Copies the logger setup into logConfig in the distribution
-applicationDistribution.from("src/main/resources") {
-    include "log4j2.xml"
-    into "logConfig"
+application {
+    mainClassName = 'io.vantiq.extsrc.camelconn.connector.CamelMain'
+
+    applicationDistribution.from("src/main/resources") {
+        include "log4j2.properties"
+        into "logConfig"
+    }
 }
 
 repositories {
@@ -120,7 +122,7 @@ task zipAssembly(type: Zip) {
         include 'types/**/*'
     }
     into "${project.name}"
-    archiveName "camel4connector-assembly.zip"
+    archiveFileName = "camel4connector-assembly.zip"
 }
 
 jar.finalizedBy zipAssembly
@@ -304,7 +306,7 @@ tasks.withType(Test).configureEach {
         systemProperty "TestVantiqServer", rootProject.findProperty("TestVantiqServer") ?: "empty"
     }
     // Use the build dir as a base to get our various test artifacts.
-    systemProperty "buildDir", "${buildDir}"
+    systemProperty "buildDir", layout.buildDirectory.get().asFile.absolutePath
 
     if (rootProject.hasProperty("camel-salesforce-loginUrl")) {
         systemProperty "camel-salesforce-loginUrl", rootProject.findProperty("camel-salesforce-loginUrl") ?: "empty"
diff --git a/extjsdk/build.gradle b/extjsdk/build.gradle
index 92647ab8..4a7bea7f 100644
--- a/extjsdk/build.gradle
+++ b/extjsdk/build.gradle
@@ -44,7 +44,7 @@ test {
     }
 }
 
-tasks.withType(Test) {
+tasks.withType(Test).configureEach {
     if (rootProject.hasProperty("TestAuthToken")) {
         systemProperty "TestAuthToken", rootProject.findProperty("TestAuthToken") ?: "empty"
     }
@@ -56,11 +56,11 @@ tasks.withType(Test) {
         systemProperty "TestRepeatedConnects", rootProject.findProperty("TestRepeatedConnects") ?: "empty"
     }
     // Use the build dir as a base to get our various test artifacts.
-    systemProperty "buildDir", "${buildDir}"
+    systemProperty "buildDir", "${layout.buildDirectory as String}"
 }
 
 task testJar (type: Jar) {
-    baseName = "${project.name}-test"
+    archiveBaseName = "${project.name}-test"
     from sourceSets.test.output
 }
 
@@ -77,7 +77,7 @@ dependencies {
     implementation "com.squareup.okhttp3:okhttp:${okhttpVersion}"
     implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
 
-    testImplementation group: 'junit', name: 'junit', version: '4.12'
+    testImplementation group: 'junit', name: 'junit', version: '4.13.1'
 
     // Used in tests
     testImplementation "io.vantiq:vantiq-sdk:${vantiqSDKVersion}"
@@ -88,7 +88,7 @@ dependencies {
 
 // Create a jar with all dependencies included
 task fatJar(type: Jar) {
-    appendix = 'fat'
+    archiveAppendix = 'fat'
     from sourceSets.main.output
     duplicatesStrategy 'include'
     from(".") {
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index e340d988..327ca117 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
 #Wed Dec 09 14:41:33 PST 2020
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStorePath=wrapper/dists
diff --git a/jdbcSource/build.gradle b/jdbcSource/build.gradle
index 2ec5b5af..a880017c 100644
--- a/jdbcSource/build.gradle
+++ b/jdbcSource/build.gradle
@@ -10,14 +10,14 @@ plugins {
 group 'io.vantiq'
 version 'unspecified'
 
-sourceCompatibility = 1.8
+java {
+    sourceCompatibility = 1.8
+}
 
 repositories {
     mavenCentral()
 }
 
-mainClassName = 'io.vantiq.extsrc.jdbcSource.JDBCMain'
-
 startScripts{
     doLast{
         def windowsScriptFile = file getWindowsScript()
@@ -28,18 +28,21 @@ startScripts{
     }
 }
 
-// Copies the logger setup into logConfig in the distribution
-applicationDistribution.from("src/main/resources") {
-    include "log4j2.xml"
-    into "logConfig"
+application {
+    mainClassName = 'io.vantiq.extsrc.jdbcSource.JDBCMain'
+    // Copies the logger setup into logConfig in the distribution
+    applicationDistribution.from("src/main/resources") {
+        include "log4j2.xml"
+        into "logConfig"
+    }
 }
 
-tasks.withType(Test) {
-	if (System.env.JDBC_DRIVER_LOC == null) {
-    	logger.warn("Some tests may have been skipped. Environment variable 'JDBC_DRIVER_LOC' is not set. " +
-    			"Please set it to a location containing the appropriate JDBC Driver .jar file.")
-    }	
-	if (rootProject.hasProperty("EntConJDBCUsername")) {
+tasks.withType(Test).configureEach {
+    if (System.env.JDBC_DRIVER_LOC == null) {
+        logger.warn("Some tests may have been skipped. Environment variable 'JDBC_DRIVER_LOC' is not set. " +
+            "Please set it to a location containing the appropriate JDBC Driver .jar file.")
+    }
+    if (rootProject.hasProperty("EntConJDBCUsername")) {
         systemProperty "EntConJDBCUsername", rootProject.findProperty("EntConJDBCUsername") ?: "empty"
     }
     if (rootProject.hasProperty("EntConJDBCPassword")) {
@@ -84,9 +87,9 @@ dependencies {
     testImplementation "io.vantiq:vantiq-sdk:${vantiqSDKVersion}"
     
     // Use JUnit test framework
-    testImplementation 'junit:junit:4.12'
+    testImplementation 'junit:junit:4.13.1'
     testImplementation project(path:":extjsdk", configuration:"testArtifacts")
-    testImplementation "com.fasterxml.jackson.core:jackson-databind:2.9.3"
+    testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
 
     // Used to create a connection pool if asynchronous processing has been specified for publish/query handlers
     implementation group: 'com.zaxxer', name: 'HikariCP', version: '3.3.1'
diff --git a/jmsSource/build.gradle b/jmsSource/build.gradle
index 9e8223dc..02d65697 100644
--- a/jmsSource/build.gradle
+++ b/jmsSource/build.gradle
@@ -4,14 +4,14 @@ version 'unspecified'
 apply plugin: 'java'
 apply plugin: 'application'
 
-sourceCompatibility = 1.8
+java {
+    sourceCompatibility = 1.8
+}
 
 repositories {
     mavenCentral()
 }
 
-mainClassName = 'io.vantiq.extsrc.jmsSource.JMSMain'
-
 startScripts{
     doLast{
         def windowsScriptFile = file getWindowsScript()
@@ -22,24 +22,28 @@ startScripts{
     }
 }
 
-// Copies the logger setup into logConfig in the distribution
-applicationDistribution.from("src/main/resources") {
-    include "log4j2.xml"
-    into "logConfig"
+application {
+    mainClassName = 'io.vantiq.extsrc.jmsSource.JMSMain'
+
+    // Copies the logger setup into logConfig in the distribution
+    applicationDistribution.from("src/main/resources") {
+        include "log4j2.xml"
+        into "logConfig"
+    }
 }
 
 def configProps = ["EntConJMSUsername", "EntConJMSPassword", "EntConJMSURL", "EntConJMSConnectionFactory", "EntConJMSInitialContext",
 				"EntConJMSTopic", "EntConJMSQueue", "EntConTestSourceName", "EntConTestTypeName", "TestAuthToken", "TestVantiqServer"]
 
-tasks.withType(Test) {
+tasks.withType(Test).configureEach {
     if (System.env.JMS_DRIVER_LOC == null) {
-    	logger.warn("Some tests may have been skipped. Environment variable 'JMS_DRIVER_LOC' is not set. " +
-    			"Please set it to a location containing the appropriate JMS Driver .jar file.")
+        logger.warn("Some tests may have been skipped. Environment variable 'JMS_DRIVER_LOC' is not set. " +
+            "Please set it to a location containing the appropriate JMS Driver .jar file.")
     }
     configProps.each { aConfigProp ->
-	    if (rootProject.hasProperty(aConfigProp)) {
-	        systemProperty aConfigProp, rootProject.findProperty(aConfigProp)
-	    }
+        if (rootProject.hasProperty(aConfigProp)) {
+            systemProperty aConfigProp, rootProject.findProperty(aConfigProp)
+        }
     }
 }
 
@@ -65,6 +69,6 @@ dependencies {
     testImplementation "io.vantiq:vantiq-sdk:${vantiqSDKVersion}"
 
     // Use JUnit test framework
-    testImplementation 'junit:junit:4.12'
+    testImplementation 'junit:junit:4.13.1'
     testImplementation project(path:":extjsdk", configuration:"testArtifacts")
 }
\ No newline at end of file
diff --git a/objectRecognitionSource/build.gradle b/objectRecognitionSource/build.gradle
index ed0f1e71..29716a05 100644
--- a/objectRecognitionSource/build.gradle
+++ b/objectRecognitionSource/build.gradle
@@ -7,7 +7,9 @@ plugins {
 group 'io.vantiq'
 version 'unspecified'
 
-sourceCompatibility = 1.8
+java {
+    sourceCompatibility = 1.8
+}
 
 repositories {
     mavenCentral()
@@ -26,7 +28,21 @@ repositories {
     }
 }
 
-mainClassName = 'io.vantiq.extsrc.objectRecognition.ObjectRecognitionMain'
+application {
+    mainClassName = 'io.vantiq.extsrc.objectRecognition.ObjectRecognitionMain'
+    // Copies the README and licenses into the distribution
+    applicationDistribution.from(".") {
+        include "README.md"
+        include "LICENSE/*"
+        into ""
+    }
+
+    // Copies the logger setup into logConfig in the distribution
+    applicationDistribution.from("src/main/resources") {
+        include "log4j2.xml"
+        into "logConfig"
+    }
+}
 
 // Used to automatically ignore tests for implementations that have been removed.
 // The tests should be called "Test<source file name>.java"
@@ -55,19 +71,6 @@ startScripts{
 // Don't javadoc the Yolo code
 javadoc.exclude("edu/*")
 
-// Copies the README and licenses into the distribution
-applicationDistribution.from(".") {
-    include "README.md"
-    include "LICENSE/*"
-    into ""
-}
-
-// Copies the logger setup into logConfig in the distribution
-applicationDistribution.from("src/main/resources") {
-    include "log4j2.xml"
-    into "logConfig"
-}
-
 test {
     // set heap size for the test JVM(s)
     minHeapSize = "2048m"
@@ -75,15 +78,15 @@ test {
     forkEvery = 1
 }
 
-tasks.withType(Test) {
+tasks.withType(Test).configureEach {
+    // Use the build dir as a base to get our various test artifacts.
+    systemProperty 'buildDir', layout.buildDirectory.get().asFile.absolutePath
     if (rootProject.hasProperty("TestAuthToken")) {
         systemProperty "TestAuthToken", rootProject.findProperty("TestAuthToken") ?: "empty"
     }
     if (rootProject.hasProperty("TestVantiqServer")) {
         systemProperty "TestVantiqServer", rootProject.findProperty("TestVantiqServer") ?: "empty"
     }
-    // Use the build dir as a base to get our various test artifacts.
-    systemProperty "buildDir", "${buildDir}"
 }
 
 compileJava.doFirst {
@@ -131,7 +134,7 @@ dependencies {
 
     implementation "org.projectlombok:lombok:${lombokVersion}"
 
-    implementation "com.fasterxml.jackson.core:jackson-databind:2.9.3"
+    implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
     
     // Used by YoloProcessor alone. These two dependencies and all files in the edu.* package may be removed if YoloProcessor
     // is removed
@@ -139,7 +142,7 @@ dependencies {
     implementation "org.apache.commons:commons-math3:3.6.1"
     
     // Used by FtpRetriever alone. Can be removed if FtpRetriever is removed
-    implementation "commons-net:commons-net:3.6"
+    implementation 'commons-net:commons-net:3.9.0'
     implementation "com.jcraft:jsch:0.1.54"
     
     // The following dependencies are used to download neural net model information (and test artifacts) used in our
@@ -167,7 +170,7 @@ dependencies {
     implementation "io.vantiq:vantiq-sdk:${vantiqSDKVersion}"
 
     // Use JUnit test framework
-    testImplementation 'junit:junit:4.12'
+    testImplementation 'junit:junit:4.13.1'
     testImplementation project(path:":extjsdk", configuration:"testArtifacts")
 }
 
@@ -180,14 +183,14 @@ task copyModels(type: Copy, dependsOn: [configurations.testRuntimeClasspath, con
         configurations.metaTest.find { it.name == "coco-1.1.meta" },
         configurations.metaTest.find { it.name == "coco-1.1.pb" }
 
-    into "$buildDir/models/"
+    into layout.buildDirectory.dir('models')
 }
 
 task copyOldCocoModels(type: Copy, dependsOn: [configurations.testRuntimeClasspath, configurations.oldYoloNames]) {
     from configurations.oldYoloNames.find { it.name == 'coco-1.0.pb' },
          configurations.oldYoloNames.find { it.name == 'coco-1.0.names' }
 
-    into "$buildDir/models/"
+    into layout.buildDirectory.dir('models')
 }
 
 
@@ -203,7 +206,7 @@ task copyOldYoloModels(type: Copy, dependsOn: [configurations.testRuntimeClasspa
         }
     }
 
-    into "$buildDir/models/"
+    into layout.buildDirectory.dir('models')
 }
 
 task copyTestResources(type: Copy, dependsOn: [configurations.testRuntimeClasspath, configurations.oldYoloNames]) {
@@ -211,7 +214,7 @@ task copyTestResources(type: Copy, dependsOn: [configurations.testRuntimeClasspa
          configurations.testRuntimeClasspath.find { it.name == 'nothingVideo-1.0.mov' },
          sourceSets.test.resources.asList()
 
-    into "$buildDir/testResources/"
+    into layout.buildDirectory.dir('testResources')
 }
 
 test.dependsOn copyModels, copyTestResources
\ No newline at end of file
diff --git a/opcuaSource/build.gradle b/opcuaSource/build.gradle
index baa613dd..66fec36e 100644
--- a/opcuaSource/build.gradle
+++ b/opcuaSource/build.gradle
@@ -16,12 +16,14 @@ plugins {
 group 'io.vantiq'
 version 'unspecified'
 
-sourceCompatibility = 1.8
+java {
+    sourceCompatibility = 1.8
+}
 
 ext {
     eclipseMiloVersion = '0.6.12'
     logbackVersion = '1.2.3'
-    junitVersion = '4.12'
+    junitVersion = '4.13.1'
     commonsCliVersion = '1.4'
     bouncyCastleVersion = '1.58'
     slf4jApiVersion = '1.7.25'
@@ -59,8 +61,6 @@ dependencies {
     testImplementation "org.eclipse.milo:client-examples:${eclipseMiloVersion}"
 }
 
-mainClassName = 'io.vantiq.extsrc.opcua.opcUaSource.OpcUaServer'
-
 startScripts{
     doLast{
         def windowsScriptFile = file getWindowsScript()
@@ -71,12 +71,16 @@ startScripts{
     }
 }
 
-applicationDistribution.from("src/main/resources/LICENSES") {
-    into "LICENSES"
-}
+application {
+    mainClassName = 'io.vantiq.extsrc.opcua.opcUaSource.OpcUaServer'
 
-applicationDistribution.from("src/main/resources/log4j2.xml") {
-    into "logConfig"
+    applicationDistribution.from("src/main/resources/LICENSES") {
+        into "LICENSES"
+    }
+
+    applicationDistribution.from("src/main/resources/log4j2.xml") {
+        into "logConfig"
+    }
 }
 
 test {
@@ -91,6 +95,6 @@ task generateJavadoc(type: Javadoc) {
 }
 
 task runExampleServer(type: JavaExec) {
-    main = "io.vantiq.extsrc.opcua.io.vantiq.extsrc.opcua.sampleServer.RunExampleServer"
+    mainClass = "io.vantiq.extsrc.opcua.io.vantiq.extsrc.opcua.sampleServer.RunExampleServer"
     classpath = sourceSets.test.runtimeClasspath
 }
\ No newline at end of file
diff --git a/udpSource/build.gradle b/udpSource/build.gradle
index e9267030..235bd91b 100644
--- a/udpSource/build.gradle
+++ b/udpSource/build.gradle
@@ -1,27 +1,22 @@
+
+// Apply the java-library plugin to add support for Java Library
+plugins {
+    id 'java'
+    id 'application'
+}
 group 'io.vantiq'
 version 'unspecified'
 
-/*
- * This build file was generated by the Gradle 'init' task.
- *
- * This generated file contains a sample Java Library project to get you started.
- * For more details take a look at the Java Libraries chapter in the Gradle
- * user guide available at https://docs.gradle.org/4.3/userguide/java_library_plugin.html
- */
 
-// Apply the java-library plugin to add support for Java Library
-apply plugin: 'java'
-apply plugin: 'application'
-
-sourceCompatibility = 1.8
+java {
+    sourceCompatibility = 1.8
+}
 
 // In this section you declare where to find the dependencies of your project
 repositories {
     mavenCentral()
 }
 
-mainClassName = 'io.vantiq.extsrc.udp.ConfigurableUDPSource'
-
 // 
 startScripts{
     doLast{
@@ -33,17 +28,21 @@ startScripts{
     }
 }
 
+application {
+    mainClassName = 'io.vantiq.extsrc.udp.ConfigurableUDPSource'
+
 // Copies the README and licenses into the distribution
-applicationDistribution.from(".") {
-    include "README.md"
-    include "LICENSE/*"
-    into ""
-}
+    applicationDistribution.from(".") {
+        include "README.md"
+        include "LICENSE/*"
+        into ""
+    }
 
 // Copies the logger setup into logConfig in the distribution
-applicationDistribution.from("src/main/resources") {
-    include "log4j2.xml"
-    into "logConfig"
+    applicationDistribution.from("src/main/resources") {
+        include "log4j2.xml"
+        into "logConfig"
+    }
 }
 
 dependencies {
@@ -53,15 +52,15 @@ dependencies {
     implementation "org.slf4j:slf4j-api:1.7.25"
     implementation "org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}"
 
-    implementation "com.fasterxml.jackson.core:jackson-databind:2.9.3"
-    implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.3"	//XML parsing
-    implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.9.3"
+    implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2'
+    implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.4'    //XML parsing
+    implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.9.4'
     
 
     // This dependency is used internally, and not exposed to consumers on their own compile classpath.
     implementation "com.google.guava:guava:${guavaVersion}"
 
     // Use JUnit test framework
-    testImplementation 'junit:junit:4.12'
+    testImplementation 'junit:junit:4.13.1'
     testImplementation project(path:":extjsdk", configuration:"testArtifacts")
 }
\ No newline at end of file


Test patch:
diff --git a/opcuaSource/src/test/java/io/vantiq/extsrc/opcua/uaOperations/Connection.java b/opcuaSource/src/test/java/io/vantiq/extsrc/opcua/uaOperations/Connection.java
index bb715fc6..35edec99 100644
--- a/opcuaSource/src/test/java/io/vantiq/extsrc/opcua/uaOperations/Connection.java
+++ b/opcuaSource/src/test/java/io/vantiq/extsrc/opcua/uaOperations/Connection.java
@@ -19,7 +19,10 @@
 import org.junit.Test;
 
 import java.io.IOException;
+import java.net.InetSocketAddress;
 import java.net.Socket;
+import java.net.SocketAddress;
+import java.net.SocketTimeoutException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.UnknownHostException;
@@ -32,6 +35,7 @@
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.CompletionException;
 import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
 
 import lombok.extern.slf4j.Slf4j;
 
@@ -42,6 +46,7 @@
 @Slf4j
 public class Connection extends OpcUaTestBase {
 
+    public final static long SOCKET_CONNECT_TIMEOUT_MS = TimeUnit.SECONDS.toMillis(6);
     // List of status that means the server's a mess so we'll ignore it in this test...
     public static final List<String> serverHosedStatus =
             Arrays.asList(
@@ -793,11 +798,12 @@ public void makeConnection(boolean runAsync,
                 String host = opcuri.getHost();
                 int port = opcuri.getPort();
                 log.info("Making socket connection to {}:{}", host, port);
-
+                
                 // We don't use the result so we won't save it.  We just care that it completes w/o error
                 // We'll use a try-with-resources block here to ensure that the socket is closed...
-                //noinspection EmptyTryBlock
-                try (Socket s = new Socket(host, port)) {
+                try (Socket s = new Socket()) {
+                    SocketAddress addr = new InetSocketAddress(host, port);
+                    s.connect(addr, (int) SOCKET_CONNECT_TIMEOUT_MS);
                     // Ignore
                 }
                 log.trace("Socket connection to {}:{} succeeded", host, port);
@@ -805,12 +811,14 @@ public void makeConnection(boolean runAsync,
                 // We'll assume it's our OPC server & let the test proceed
             } catch (UnknownHostException | URISyntaxException badURL) {
                 fail("URL " + discEP + " has unknown host or invalid syntax.  " +
-                                "Probably means that the list of free servers has changed... ");
+                             "Probably means that the list of free servers has changed... ");
+            } catch (SocketTimeoutException soe) {
+                log.warn("Discovery Endpoint: {} timed out on open.  Skipping it.", discEP);
             } catch (IOException ioe) {
                 // Could be bad connection or socket timeout (a subclass of ioexception)
                 // In either case, this means our free server is not currently available (you get what you pay for)
                 // so skip this one...
-                log.warn("Discovery Endpoint: {} not responding to open.  Skipping it.", discEP);
+                log.warn("Discovery Endpoint: {} not responding to open.  Skipping it.", discEP, ioe);
                 continue;
             }
 
diff --git a/testConnector/build.gradle b/testConnector/build.gradle
index cadcf2c5..295c08e1 100644
--- a/testConnector/build.gradle
+++ b/testConnector/build.gradle
@@ -1,17 +1,18 @@
+plugins {
+    id 'java'
+    id 'application'
+}
 group 'io.vantiq'
 version 'unspecified'
 
-apply plugin: 'java'
-apply plugin: 'application'
-
+java {
 sourceCompatibility = 1.8
+    }
 
 repositories {
     mavenCentral()
 }
 
-mainClassName = 'io.vantiq.extsrc.testConnector.TestConnectorMain'
-
 startScripts{
     doLast{
         def windowsScriptFile = file getWindowsScript()
@@ -22,13 +23,17 @@ startScripts{
     }
 }
 
-// Copies the logger setup into logConfig in the distribution
-applicationDistribution.from("src/main/resources") {
-    include "log4j2.xml"
-    into "logConfig"
+application {
+    mainClassName = 'io.vantiq.extsrc.testConnector.TestConnectorMain'
+
+    // Copies the logger setup into logConfig in the distribution
+    applicationDistribution.from("src/main/resources") {
+        include "log4j2.xml"
+        into "logConfig"
+    }
 }
 
-tasks.withType(Test) {
+tasks.withType(Test).configureEach {
     if (rootProject.hasProperty("TestConnectorEnvVarName")) {
         systemProperty "TestConnectorEnvVarName", rootProject.findProperty("TestConnectorEnvVarName") ?: "empty"
     }
@@ -47,6 +52,6 @@ dependencies {
     implementation "org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}"
 
     // Use JUnit test framework
-    testImplementation 'junit:junit:4.12'
+    testImplementation 'junit:junit:4.13.1'
     testImplementation project(path:":extjsdk", configuration:"testArtifacts")
 }