-
Notifications
You must be signed in to change notification settings - Fork 4.4k
/
Copy pathbuild.gradle
92 lines (79 loc) · 2.96 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
plugins {
id 'application'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.1.0'
}
dependencies {
implementation project(':airbyte-config:init')
implementation project(':airbyte-config:models')
implementation project(':airbyte-config:persistence')
implementation project(':airbyte-db:lib')
implementation project(":airbyte-json-validation")
implementation project(':airbyte-scheduler:persistence')
implementation project(':airbyte-scheduler:models')
implementation 'io.temporal:temporal-sdk:1.8.1'
implementation "org.flywaydb:flyway-core:7.14.0"
testImplementation "org.testcontainers:postgresql:1.15.3"
testImplementation 'uk.org.webcompere:system-stubs-jupiter:1.2.0'
}
application {
applicationName = "airbyte-bootloader"
mainClass = 'io.airbyte.bootloader.BootloaderApp'
applicationDefaultJvmArgs = ['-XX:+ExitOnOutOfMemoryError', '-XX:MaxRAMPercentage=75.0']
}
// Publish this so Airbyte Cloud can consume and extend the classes within this jar.
// This needs to be a shadow jar as none of the other modules are published.
shadowJar {
preserveFileTimestamps = false
reproducibleFileOrder = true
zip64 true
mergeServiceFiles()
exclude 'META-INF/*.RSA'
exclude 'META-INF/*.SF'
exclude 'META-INF/*.DSA'
// Not stubbing this out adds 'all' to the end of the jar's name.
classifier = ''
}
publishing {
publications {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
repositories {
publications {
// This block is present so Gradle knows to publish a Maven jar.
maven(MavenPublication) {
from components.java
// Gradle will by default use the subproject path as the group id and the subproject name as the artifact id.
// e.g. the subproject :airbyte-scheduler:models is imported at io.airbyte.airbyte-config:persistence:<version-number>.
}
}
maven {
credentials {
name 'cloudrepo'
username System.getenv('CLOUDREPO_USER')
password System.getenv('CLOUDREPO_PASSWORD')
}
url 'https://airbyte.mycloudrepo.io/repositories/airbyte-public-jars'
}
mavenLocal()
}
}
task copyGeneratedTar(type: Copy) {
dependsOn copyDocker
dependsOn distTar
from('build/distributions') {
include 'airbyte-bootloader-*.tar'
}
into 'build/docker/bin'
}
Task dockerBuildTask = getDockerBuildTask("bootloader", "$project.projectDir", "$rootProject.ext.version", "$rootProject.ext.image_tag")
dockerBuildTask.dependsOn(copyGeneratedTar)
assemble.dependsOn(dockerBuildTask)
// produce reproducible archives
// (see https://docs.gradle.org/current/userguide/working_with_files.html#sec:reproducible_archives)
tasks.withType(AbstractArchiveTask) {
preserveFileTimestamps = false
reproducibleFileOrder = true
}