|
| 1 | +import org.apache.tools.ant.filters.ReplaceTokens |
| 2 | + |
| 3 | + |
1 | 4 | buildscript {
|
2 | 5 | ext.jdkVersionDefault = 17
|
3 | 6 | ext.javaClassVersionDefault = 11
|
@@ -60,6 +63,7 @@ buildscript {
|
60 | 63 | ext.googleJavaFormatVersion = '1.18.1'
|
61 | 64 | ext.openLineageVersion = '1.25.0'
|
62 | 65 | ext.logbackClassicJava8 = '1.2.12'
|
| 66 | + ext.awsSdk2Version = '2.30.33' |
63 | 67 |
|
64 | 68 | ext.docker_registry = 'acryldata'
|
65 | 69 |
|
@@ -120,12 +124,12 @@ project.ext.externalDependency = [
|
120 | 124 | 'assertJ': 'org.assertj:assertj-core:3.11.1',
|
121 | 125 | 'avro': 'org.apache.avro:avro:1.11.4',
|
122 | 126 | 'avroCompiler': 'org.apache.avro:avro-compiler:1.11.4',
|
123 |
| - 'awsGlueSchemaRegistrySerde': 'software.amazon.glue:schema-registry-serde:1.1.17', |
124 |
| - 'awsMskIamAuth': 'software.amazon.msk:aws-msk-iam-auth:2.0.3', |
125 |
| - 'awsS3': 'software.amazon.awssdk:s3:2.26.21', |
126 |
| - 'awsSecretsManagerJdbc': 'com.amazonaws.secretsmanager:aws-secretsmanager-jdbc:1.0.13', |
127 |
| - 'awsPostgresIamAuth': 'software.amazon.jdbc:aws-advanced-jdbc-wrapper:1.0.2', |
128 |
| - 'awsRds':'software.amazon.awssdk:rds:2.18.24', |
| 127 | + 'awsGlueSchemaRegistrySerde': 'software.amazon.glue:schema-registry-serde:1.1.23', |
| 128 | + 'awsMskIamAuth': 'software.amazon.msk:aws-msk-iam-auth:2.3.0', |
| 129 | + 'awsS3': "software.amazon.awssdk:s3:$awsSdk2Version", |
| 130 | + 'awsSecretsManagerJdbc': 'com.amazonaws.secretsmanager:aws-secretsmanager-jdbc:1.0.15', |
| 131 | + 'awsPostgresIamAuth': 'software.amazon.jdbc:aws-advanced-jdbc-wrapper:2.5.4', |
| 132 | + 'awsRds':"software.amazon.awssdk:rds:$awsSdk2Version", |
129 | 133 | 'cacheApi': 'javax.cache:cache-api:1.1.0',
|
130 | 134 | 'commonsCli': 'commons-cli:commons-cli:1.5.0',
|
131 | 135 | 'commonsIo': 'commons-io:commons-io:2.17.0',
|
@@ -240,7 +244,7 @@ project.ext.externalDependency = [
|
240 | 244 | 'playFilters': "com.typesafe.play:filters-helpers_$playScalaVersion:$playVersion",
|
241 | 245 | 'pac4j': 'org.pac4j:pac4j-oidc:6.0.6',
|
242 | 246 | 'playPac4j': "org.pac4j:play-pac4j_$playScalaVersion:12.0.0-PLAY2.8",
|
243 |
| - 'postgresql': 'org.postgresql:postgresql:42.7.4', |
| 247 | + 'postgresql': 'org.postgresql:postgresql:42.7.5', |
244 | 248 | 'protobuf': 'com.google.protobuf:protobuf-java:3.25.5',
|
245 | 249 | 'grpcProtobuf': 'io.grpc:grpc-protobuf:1.53.0',
|
246 | 250 | 'rangerCommons': 'org.apache.ranger:ranger-plugins-common:2.3.0',
|
@@ -395,25 +399,56 @@ configure(subprojects.findAll {! it.name.startsWith('spark-lineage')}) {
|
395 | 399 | }
|
396 | 400 | }
|
397 | 401 |
|
| 402 | +apply plugin: 'com.gorylenko.gradle-git-properties' |
| 403 | +gitProperties { |
| 404 | + keys = ['git.commit.id','git.commit.id.describe','git.commit.time'] |
| 405 | + // using any tags (not limited to annotated tags) for "git.commit.id.describe" property |
| 406 | + // see http://ajoberstar.org/grgit/grgit-describe.html for more info about the describe method and available parameters |
| 407 | + // 'it' is an instance of org.ajoberstar.grgit.Grgit |
| 408 | + customProperty 'git.commit.id.describe', { it.describe(tags: true) } |
| 409 | + gitPropertiesResourceDir = rootProject.buildDir |
| 410 | + failOnNoGitDirectory = false |
| 411 | +} |
| 412 | + |
| 413 | +def gitPropertiesGenerated = false |
| 414 | + |
| 415 | +apply from: 'gradle/versioning/versioning-global.gradle' |
| 416 | + |
| 417 | +tasks.register("generateGitPropertiesGlobal", com.gorylenko.GenerateGitPropertiesTask) { |
| 418 | + doFirst { |
| 419 | + if (!gitPropertiesGenerated) { |
| 420 | + println "Generating git.properties" |
| 421 | + gitPropertiesGenerated = true |
| 422 | + } else { |
| 423 | + // Skip actual execution if already run |
| 424 | + onlyIf { false } |
| 425 | + } |
| 426 | + } |
| 427 | +} |
| 428 | + |
398 | 429 | subprojects {
|
399 | 430 |
|
400 | 431 | apply plugin: 'maven-publish'
|
401 |
| - apply plugin: 'com.gorylenko.gradle-git-properties' |
402 | 432 | apply plugin: 'com.diffplug.spotless'
|
403 | 433 |
|
404 |
| - gitProperties { |
405 |
| - keys = ['git.commit.id','git.commit.id.describe','git.commit.time'] |
406 |
| - // using any tags (not limited to annotated tags) for "git.commit.id.describe" property |
407 |
| - // see http://ajoberstar.org/grgit/grgit-describe.html for more info about the describe method and available parameters |
408 |
| - // 'it' is an instance of org.ajoberstar.grgit.Grgit |
409 |
| - customProperty 'git.commit.id.describe', { it.describe(tags: true) } |
410 |
| - failOnNoGitDirectory = false |
| 434 | + def gitPropertiesTask = tasks.register("copyGitProperties", Copy) { |
| 435 | + dependsOn rootProject.tasks.named("generateGitPropertiesGlobal") |
| 436 | + def sourceFile = file("${rootProject.buildDir}/git.properties") |
| 437 | + from sourceFile |
| 438 | + into "$project.buildDir/resources/main" |
411 | 439 | }
|
412 | 440 |
|
413 | 441 | plugins.withType(JavaPlugin).configureEach {
|
| 442 | + project.tasks.named(JavaPlugin.CLASSES_TASK_NAME).configure{ |
| 443 | + dependsOn gitPropertiesTask |
| 444 | + } |
414 | 445 | if (project.name == 'datahub-web-react') {
|
415 | 446 | return
|
416 | 447 | }
|
| 448 | + /* TODO: evaluate ignoring jar timestamps for increased caching (compares checksum instead) |
| 449 | + jar { |
| 450 | + preserveFileTimestamps = false |
| 451 | + }*/ |
417 | 452 |
|
418 | 453 | dependencies {
|
419 | 454 | implementation externalDependency.annotationApi
|
|
0 commit comments