Skip to content

Commit

Permalink
download BQMS catalog jar at build time (#32282)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedabu98 authored Aug 22, 2024
1 parent ea882ab commit ebf80f3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/trigger_files/IO_Iceberg_Integration_Tests.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"comment": "Modify this file in a trivial way to cause this test suite to run",
"modification": 6
"modification": 7
}
Binary file not shown.
23 changes: 21 additions & 2 deletions sdks/java/io/iceberg/bigquerymetastore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,38 @@ plugins {
id 'org.apache.beam.module'
}

def bqmsLocation = "$buildDir/libs"

applyJavaNature(
automaticModuleName: 'org.apache.beam.sdk.io.iceberg.bqms',
shadowClosure: {
dependencies {
include(dependency(files("bqms-catalog/iceberg-bigquery-catalog-1.5.2-0.1.0.jar")))
include(dependency(files("$bqmsLocation/iceberg-bigquery-catalog-1.5.2-0.1.0.jar")))
}
relocate 'com.google.guava', getJavaRelocatedPath('iceberg.bqms.com.google.guava')
},
validateShadowJar: false
)

description = "Apache Beam :: SDKs :: Java :: IO :: Iceberg :: BigQuery Metastore"
ext.summary = "A copy of the BQMS catalog with some popular libraries relocated."

task downloadBqmsJar(type: Copy) {
def jarUrl = 'https://storage.googleapis.com/spark-lib/bigquery/iceberg-bigquery-catalog-1.5.2-0.1.0.jar'
def outputDir = file("$bqmsLocation")
outputDir.mkdirs()

ant.get(src: jarUrl, dest: outputDir)
}

repositories {
flatDir {
dirs "$bqmsLocation"
}
}

compileJava.dependsOn downloadBqmsJar

dependencies {
implementation files("bqms-catalog/iceberg-bigquery-catalog-1.5.2-0.1.0.jar")
implementation files("$bqmsLocation/iceberg-bigquery-catalog-1.5.2-0.1.0.jar")
}

0 comments on commit ebf80f3

Please sign in to comment.