1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16+
17+ plugins {
18+ id ' de.undercouch.download' version ' 4.1.2'
19+ }
20+
1621apply plugin : ' java'
1722apply plugin : ' java-test-fixtures'
1823apply plugin : ' idea'
1924apply plugin : ' groovy'
2025
26+
2127sourceSets {
2228 main. java. srcDirs = []
2329 main. groovy. srcDirs = [' src/main' ]
@@ -36,17 +42,42 @@ dependencies {
3642 compileOnly project(' :nextflow' )
3743 compileOnly ' org.slf4j:slf4j-api:1.7.10'
3844 compileOnly ' org.pf4j:pf4j:3.4.1'
45+ compileOnly " org.slf4j:log4j-over-slf4j:1.7.32"
3946 api(" org.codehaus.groovy:groovy-sql:3.0.9" ) { transitive = false }
4047 api ' com.h2database:h2:1.4.200'
4148 api ' mysql:mysql-connector-java:8.0.22'
4249 api ' org.mariadb.jdbc:mariadb-java-client:2.7.0'
4350 api ' org.postgresql:postgresql:42.2.23'
4451 api ' org.xerial:sqlite-jdbc:3.36.0.3'
4552 api ' org.duckdb:duckdb_jdbc:0.3.0'
53+ api files(' downloads/unzip/AthenaJDBC42_2.0.25.1001.jar' )
4654
4755 testImplementation(testFixtures(project(" :nextflow" )))
4856 testImplementation project(' :nextflow' )
4957 testImplementation " org.codehaus.groovy:groovy:3.0.9"
5058 testImplementation " org.codehaus.groovy:groovy-nio:3.0.9"
5159}
5260
61+
62+ /**
63+ * The following tasks download and confirm the MD5 checksum of the ZIP archive
64+ * for Simba Athena JDBC driver and extract its contents to the build directory
65+ */
66+ task downloadAthenDep (type : Download ) {
67+ src ' https://s3.amazonaws.com/athena-downloads/drivers/JDBC/SimbaAthenaJDBC-2.0.25.1001/SimbaAthenaJDBC-2.0.25.1001.zip'
68+ dest new File (buildDir, ' downloads/SimbaAthenaJDBC-2.0.25.1001.zip' )
69+ overwrite false
70+ }
71+
72+ task verifyAthenDep (type : Verify , dependsOn : downloadAthenDep) {
73+ src new File (buildDir, ' downloads/SimbaAthenaJDBC-2.0.25.1001.zip' )
74+ algorithm ' MD5'
75+ checksum ' 71504d0317656d790978363358d0c068'
76+ }
77+
78+ task unzipAthenDep (dependsOn : verifyAthenDep, type : Copy ) {
79+ from zipTree(new File (buildDir, ' downloads/SimbaAthenaJDBC-2.0.25.1001.zip' ))
80+ into " ${ buildDir} /downloads/unzip"
81+ }
82+
83+ project. compileGroovy. dependsOn(' unzipAthenDep' )
0 commit comments