diff --git a/build.gradle b/build.gradle index e81d914fc6..c5a45d411e 100644 --- a/build.gradle +++ b/build.gradle @@ -101,7 +101,7 @@ ext { tasks.named('wrapper') { distributionType = Wrapper.DistributionType.ALL - gradleVersion = '6.9.1' + gradleVersion = '7.6.4' } gradle.projectsEvaluated { diff --git a/dap4/d4ts/build.gradle b/dap4/d4ts/build.gradle index 7b02b113e3..b20cf3aaf3 100644 --- a/dap4/d4ts/build.gradle +++ b/dap4/d4ts/build.gradle @@ -12,8 +12,8 @@ dependencies { compileOnly 'org.slf4j:slf4j-api' - runtime 'org.apache.logging.log4j:log4j-slf4j-impl' - runtime 'org.apache.logging.log4j:log4j-web' + runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl' + runtimeOnly 'org.apache.logging.log4j:log4j-web' compileOnly 'org.slf4j:slf4j-api' } diff --git a/gradle/any/shared-mvn-coords.gradle b/gradle/any/shared-mvn-coords.gradle index 2f539646a9..70047bc50e 100644 --- a/gradle/any/shared-mvn-coords.gradle +++ b/gradle/any/shared-mvn-coords.gradle @@ -6,7 +6,7 @@ ext { // plugin version management buildPlugins = [:] buildPlugins.gretty = 'org.gretty:gretty:3.0.9' - buildPlugins.shadow = 'com.github.jengelman.gradle.plugins:shadow:5.2.0' + buildPlugins.shadow = 'gradle.plugin.com.github.johnrengelman:shadow:7.1.2' buildPlugins.sonarqube = 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0' buildPlugins.spotless = 'com.diffplug.spotless:spotless-plugin-gradle:4.5.1' buildPlugins.protobuf = 'com.google.protobuf:protobuf-gradle-plugin:0.8.18' diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c19e35bf78..763217c50f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/opendap/dtswar/build.gradle b/opendap/dtswar/build.gradle index 4c8a399d81..9abbafd6f3 100644 --- a/opendap/dtswar/build.gradle +++ b/opendap/dtswar/build.gradle @@ -7,18 +7,19 @@ apply from: "$rootDir/gradle/any/war-published.gradle" dependencies { implementation enforcedPlatform(project(':tds-platform')) - compile project(':opendap:opendap-servlet') + implementation project(':opendap:opendap-servlet') - compile 'edu.ucar:cdm-core' - compile 'edu.ucar:opendap' - compile 'org.slf4j:slf4j-api' + implementation 'edu.ucar:cdm-core' + implementation 'edu.ucar:opendap' + implementation 'org.jdom:jdom2' + implementation 'org.slf4j:slf4j-api' providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}" - runtime 'org.apache.taglibs:taglibs-standard-spec' - runtime 'org.apache.taglibs:taglibs-standard-impl' + runtimeOnly 'org.apache.taglibs:taglibs-standard-spec' + runtimeOnly 'org.apache.taglibs:taglibs-standard-impl' - runtime 'org.apache.logging.log4j:log4j-slf4j-impl' - runtime 'org.apache.logging.log4j:log4j-web' + runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl' + runtimeOnly 'org.apache.logging.log4j:log4j-web' } diff --git a/opendap/server/build.gradle b/opendap/server/build.gradle index f7ebe02d2c..d5c317c13f 100644 --- a/opendap/server/build.gradle +++ b/opendap/server/build.gradle @@ -8,9 +8,10 @@ dependencies { implementation enforcedPlatform(project(':tds-platform')) testImplementation enforcedPlatform (project(':tds-testing-platform')) - compile 'edu.ucar:cdm-core' - compile 'edu.ucar:opendap' - compile 'org.slf4j:slf4j-api' + implementation 'edu.ucar:cdm-core' + implementation 'edu.ucar:opendap' + implementation 'org.jdom:jdom2' + implementation 'org.slf4j:slf4j-api' compileOnly 'jakarta.servlet:jakarta.servlet-api' diff --git a/tdcommon/build.gradle b/tdcommon/build.gradle index e7d74ff39f..d73d713a8c 100644 --- a/tdcommon/build.gradle +++ b/tdcommon/build.gradle @@ -8,26 +8,27 @@ apply from: "$rootDir/gradle/any/protobuf.gradle" dependencies { implementation enforcedPlatform(project(':tds-platform')) testImplementation enforcedPlatform (project(':tds-testing-platform')) - compile 'edu.ucar:cdm-core' - compile 'edu.ucar:cdm-s3' - compile 'edu.ucar:grib' - compile 'org.jdom:jdom2' + implementation 'edu.ucar:cdm-core' + implementation 'edu.ucar:cdm-s3' + implementation 'edu.ucar:grib' + implementation 'org.jdom:jdom2' - compile 'jakarta.validation:jakarta.validation-api' - compile 'jakarta.annotation:jakarta.annotation-api' + implementation 'jakarta.validation:jakarta.validation-api' + implementation 'jakarta.annotation:jakarta.annotation-api' - compile 'org.quartz-scheduler:quartz' - compile 'net.openhft:chronicle-map' - compile 'com.google.code.findbugs:jsr305' - compile 'com.google.guava:guava' - compile 'com.google.protobuf:protobuf-java' + implementation 'org.quartz-scheduler:quartz' + implementation 'net.openhft:chronicle-map' + implementation 'com.google.code.findbugs:jsr305' + implementation 'com.google.guava:guava' + implementation 'com.google.protobuf:protobuf-java' + implementation 'com.google.re2j:re2j' - compile 'org.slf4j:slf4j-api' + implementation 'org.slf4j:slf4j-api' // Spring - compile 'org.springframework:spring-core' - compile 'org.springframework:spring-context' - compile 'org.springframework:spring-beans' + implementation 'org.springframework:spring-core' + implementation 'org.springframework:spring-context' + implementation 'org.springframework:spring-beans' // Testing testImplementation 'edu.ucar:cdm-test-utils' // Contains stuff like the JUnit @Category classes. @@ -43,3 +44,7 @@ spotless { targetExclude('src/main/java/thredds/server/catalog/tracker/ConfigCatalogExtProto.java') } } + +tasks.named('sourceJar').configure { + dependsOn('generateProto') +} diff --git a/tdm/build.gradle b/tdm/build.gradle index 324744740e..5fd8fb71f6 100644 --- a/tdm/build.gradle +++ b/tdm/build.gradle @@ -13,29 +13,26 @@ apply plugin: 'com.github.johnrengelman.shadow' dependencies { implementation enforcedPlatform(project(':tds-platform')) - compile project(':tdcommon') - compile 'edu.ucar:httpservices' - compile 'edu.ucar:cdm-core' - compile 'edu.ucar:grib' - - compile 'org.apache.httpcomponents:httpclient' - compile 'org.jdom:jdom2' - compile 'org.springframework:spring-beans' - compile 'org.springframework:spring-core' - compile 'org.springframework:spring-context' - compile 'com.google.protobuf:protobuf-java' - compile 'com.beust:jcommander' - compile 'com.google.guava:guava' - - compile 'org.slf4j:slf4j-api' - runtime 'org.apache.logging.log4j:log4j-slf4j-impl' + implementation project(':tdcommon') + implementation 'edu.ucar:httpservices' + implementation 'edu.ucar:cdm-core' + implementation 'edu.ucar:grib' + + implementation 'org.apache.httpcomponents:httpclient' + implementation 'org.jdom:jdom2' + implementation 'org.springframework:spring-beans' + implementation 'org.springframework:spring-core' + implementation 'org.springframework:spring-context' + implementation 'com.google.protobuf:protobuf-java' + implementation 'com.beust:jcommander' + implementation 'com.google.guava:guava' + implementation 'com.google.re2j:re2j' + + implementation 'org.slf4j:slf4j-api' + implementation 'org.apache.logging.log4j:log4j-slf4j-impl' } shadowJar { - baseName = 'tdmFat' - setArchiveBaseName('tdmFat') - classifier '' - setArchiveClassifier '' doFirst { manifest.attributes jar.manifest.attributes } diff --git a/tds-ugrid/build.gradle b/tds-ugrid/build.gradle index e821434aac..0a4dd6f790 100644 --- a/tds-ugrid/build.gradle +++ b/tds-ugrid/build.gradle @@ -9,18 +9,19 @@ apply from: "$rootDir/gradle/any/java-published.gradle" dependencies { implementation enforcedPlatform (project(':tds-platform')) - testCompile enforcedPlatform (project(':tds-testing-platform')) + testImplementation enforcedPlatform (project(':tds-testing-platform')) - compile 'edu.ucar:cdm-core' - compile 'edu.ucar:cdm-s3' + implementation 'edu.ucar:cdm-core' + implementation 'edu.ucar:cdm-s3' implementation 'colt:colt:1.2.0' + implementation 'com.google.guava:guava' // Testing - testCompile project(':tds-test-utils'); - testCompile 'edu.ucar:cdm-test-utils' // Contains stuff like the JUnit @Category classes. - testCompile 'junit:junit' - testCompile 'com.google.truth:truth' + testImplementation project(':tds-test-utils'); + testImplementation 'edu.ucar:cdm-test-utils' // Contains stuff like the JUnit @Category classes. + testImplementation 'junit:junit' + testImplementation 'com.google.truth:truth' // Logging - compile 'org.slf4j:slf4j-api' + implementation 'org.slf4j:slf4j-api' } diff --git a/tds-ui/build.gradle b/tds-ui/build.gradle index ec26ca56e0..a8aa2577e4 100644 --- a/tds-ui/build.gradle +++ b/tds-ui/build.gradle @@ -9,11 +9,11 @@ apply plugin: 'application' dependencies { implementation enforcedPlatform(project(':tds-platform')) - testCompile enforcedPlatform(project(':tds-testing-platform')) + testImplementation enforcedPlatform(project(':tds-testing-platform')) - runtime 'edu.ucar:uicdm' - runtime 'edu.ucar:cdm-s3' - runtime project(':tds-ugrid') + runtimeOnly 'edu.ucar:uicdm' + runtimeOnly 'edu.ucar:cdm-s3' + runtimeOnly project(':tds-ugrid') } application { diff --git a/tds/build.gradle b/tds/build.gradle index daf3aba123..75f25ce947 100644 --- a/tds/build.gradle +++ b/tds/build.gradle @@ -11,110 +11,114 @@ apply from: "$rootDir/gradle/any/gretty.gradle" dependencies { implementation enforcedPlatform (project(':tds-platform')) - testCompile enforcedPlatform (project(':tds-testing-platform')) - - compile 'edu.ucar:bufr' - compile 'edu.ucar:cdm-core' - compile 'edu.ucar:cdm-radial' - compile 'edu.ucar:cdm-misc' - compile 'edu.ucar:cdm-image' - compile 'edu.ucar:cdm-s3' - compile 'edu.ucar:cdm-zarr' - compile 'edu.ucar:grib' - compile 'edu.ucar:netcdf4' - compile 'edu.ucar:httpservices' - compile 'edu.ucar:opendap' - compile project(':opendap:opendap-servlet') - compile project(':tdcommon') - compile 'edu.ucar:cdm-mcidas' - compile 'edu.ucar:waterml' + testImplementation enforcedPlatform (project(':tds-testing-platform')) + + implementation 'edu.ucar:bufr' + implementation 'edu.ucar:cdm-core' + implementation 'edu.ucar:cdm-radial' + implementation 'edu.ucar:cdm-misc' + implementation 'edu.ucar:cdm-image' + implementation 'edu.ucar:cdm-s3' + implementation 'edu.ucar:cdm-zarr' + implementation 'edu.ucar:grib' + implementation 'edu.ucar:netcdf4' + implementation 'edu.ucar:httpservices' + implementation 'edu.ucar:opendap' + implementation project(':opendap:opendap-servlet') + implementation project(':tdcommon') + implementation 'edu.ucar:cdm-mcidas' + implementation 'edu.ucar:waterml' implementation project(':tds-ugrid') + implementation 'net.openhft:chronicle-map' + implementation 'jakarta.validation:jakarta.validation-api' + // DAP4 Dependencies (technically forward) implementation 'edu.ucar:dap4' implementation project(':dap4:d4servlet') // Server stuff providedCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}" - runtime 'org.apache.taglibs:taglibs-standard-spec' - runtime 'org.apache.taglibs:taglibs-standard-impl' + runtimeOnly 'org.apache.taglibs:taglibs-standard-spec' + runtimeOnly 'org.apache.taglibs:taglibs-standard-impl' // Apache httpclient libraries - compile 'org.apache.httpcomponents:httpclient' - compile 'org.apache.httpcomponents:httpcore' + implementation 'org.apache.httpcomponents:httpclient' + implementation 'org.apache.httpcomponents:httpcore' - compile 'com.coverity.security:coverity-escapers' // todo: replace with google escapers? - compile 'org.jdom:jdom2' - compile 'org.quartz-scheduler:quartz' - compile 'com.google.code.findbugs:jsr305' - compile 'com.google.guava:guava' - compile 'joda-time:joda-time' - compile 'org.apache.commons:commons-lang3' + implementation 'com.coverity.security:coverity-escapers' // todo: replace with google escapers? + implementation 'org.jdom:jdom2' + implementation 'org.quartz-scheduler:quartz' + implementation 'com.google.code.findbugs:jsr305' + implementation 'com.google.guava:guava' + implementation 'joda-time:joda-time' + implementation 'org.apache.commons:commons-lang3' // WaterML - compile 'org.apache.xmlbeans:xmlbeans' - compile 'org.n52.sensorweb:52n-xml-waterML-v20' - compile 'org.n52.sensorweb:52n-xml-om-v20' + implementation 'org.apache.xmlbeans:xmlbeans' + implementation 'org.n52.sensorweb:52n-xml-waterML-v20' + implementation 'org.n52.sensorweb:52n-xml-om-v20' // Spring - compile 'org.springframework:spring-core' - compile 'org.springframework:spring-context' - compile 'org.springframework:spring-beans' - compile 'org.springframework:spring-web' - compile 'org.springframework:spring-webmvc' - runtime 'org.springframework.security:spring-security-web' // Needed for FilterChainProxy in applicationContext.xml. - runtime 'org.springframework.security:spring-security-config' // Needed for "xmlns:security" schema in applicationContext.xml. + implementation 'org.springframework:spring-core' + implementation 'org.springframework:spring-context' + implementation 'org.springframework:spring-beans' + implementation 'org.springframework:spring-web' + implementation 'org.springframework:spring-webmvc' + runtimeOnly 'org.springframework.security:spring-security-web' // Needed for FilterChainProxy in applicationContext.xml. + runtimeOnly 'org.springframework.security:spring-security-config' // Needed for "xmlns:security" schema in applicationContext.xml. // Needed for XPath operations in mock tests - testCompile 'jaxen:jaxen' + testImplementation 'jaxen:jaxen' // Needed for XPaths in WmsDetailedConfig - runtime 'jaxen:jaxen' + runtimeOnly 'jaxen:jaxen' // edal ncwms related libs - compile('uk.ac.rdg.resc:edal-common') - compile ('uk.ac.rdg.resc:edal-cdm') - compile ('uk.ac.rdg.resc:edal-graphics') - compile ('uk.ac.rdg.resc:edal-wms') - compile('uk.ac.rdg.resc:edal-godiva') + implementation('uk.ac.rdg.resc:edal-common') + implementation ('uk.ac.rdg.resc:edal-cdm') + implementation ('uk.ac.rdg.resc:edal-graphics') + implementation ('uk.ac.rdg.resc:edal-wms') + implementation('uk.ac.rdg.resc:edal-godiva') // json writing 'org.json:json' // JSR 303 with Hibernate Validator, which is dragging in jboss logging - runtime 'org.hibernate.validator:hibernate-validator' - runtime 'org.glassfish:javax.el' + runtimeOnly 'org.hibernate.validator:hibernate-validator' + runtimeOnly 'org.glassfish:javax.el' annotationProcessor "org.hibernate.validator:hibernate-validator-annotation-processor:${depVersion.hibernateValidator}" // @Resource annotation (removed post Java 8) - compile 'jakarta.annotation:jakarta.annotation-api' + implementation 'jakarta.annotation:jakarta.annotation-api' - compile 'org.thymeleaf:thymeleaf-spring5' + implementation 'org.thymeleaf:thymeleaf-spring5' // Testing - testCompile "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}" - testCompile 'org.springframework:spring-test' - testCompile 'org.hamcrest:hamcrest-core' - testCompile 'commons-io:commons-io' - testCompile 'pl.pragmatists:JUnitParams' - testCompile 'com.google.truth:truth' - testCompile 'junit:junit' - testCompile project(':tds-test-utils'); - testCompile 'edu.ucar:cdm-test-utils' // Contains stuff like the JUnit @Category classes. - testCompile 'edu.ucar:httpservices' + testImplementation "jakarta.servlet:jakarta.servlet-api:${depVersion.javaxServletApi}" + testImplementation 'org.springframework:spring-test' + testImplementation 'org.hamcrest:hamcrest-core' + testImplementation 'commons-io:commons-io' + testImplementation 'pl.pragmatists:JUnitParams' + testImplementation 'com.google.truth:truth' + testImplementation 'junit:junit' + testImplementation project(':tds-test-utils'); + testImplementation 'edu.ucar:cdm-test-utils' // Contains stuff like the JUnit @Category classes. + testImplementation 'edu.ucar:httpservices' + testImplementation 'com.beust:jcommander' // Logging - compile 'org.slf4j:slf4j-api' - runtime 'org.apache.logging.log4j:log4j-slf4j-impl' - runtime 'org.apache.logging.log4j:log4j-web' - testRuntime 'ch.qos.logback:logback-classic' + implementation 'org.slf4j:slf4j-api' + runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl' + runtimeOnly 'org.apache.logging.log4j:log4j-web' + testRuntimeOnly 'ch.qos.logback:logback-classic' // This is for freshInstallTest - testCompile 'org.xmlunit:xmlunit-core' // For comparing catalog XML. + testImplementation 'org.xmlunit:xmlunit-core' // For comparing catalog XML. } // "testRuntime" extends from "runtime", meaning that "testRuntime" will get the log4j dependencies declared in // "runtime". However, we want logback-classic to be the logger during tests, so exclude all of the log4j stuff. -configurations.testRuntime { +configurations.testRuntimeOnly { exclude group: 'org.apache.logging.log4j' } @@ -268,11 +272,11 @@ def previousTestTaskFinalizer = null testInfomation.forEach { testInfo -> sourceSets.create(testInfo.name) { - resources.srcDir file("src/${testInfo.name}/resources") + resources.srcDirs = [file("src/${testInfo.name}/resources")] // Need 'sourceSets.test.output' because we use TestOnLocalServer in our test. - compileClasspath += sourceSets.test.output + configurations.testCompile - runtimeClasspath += output + sourceSets.test.output + configurations.testRuntime + compileClasspath += sourceSets.test.output + configurations.testCompileClasspath + runtimeClasspath += output + sourceSets.test.output + configurations.testRuntimeClasspath } def thisTestTask = tasks.create("${testInfo.name}", Test) {