-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
72 lines (60 loc) · 1.9 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
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
group = 'io.github.sorieux'
version = '1.0'
repositories {
mavenCentral()
maven {
url "https://repository.apache.org/content/groups/public/"
}
}
dependencies {
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
implementation 'org.apache.calcite:calcite-piglet:1.35.0'
implementation 'org.apache.hadoop:hadoop-mapreduce-client-core:3.3.1'
implementation 'org.apache.hadoop:hadoop-common:3.3.1'
implementation 'info.picocli:picocli:4.7.5'
implementation 'org.slf4j:slf4j-api:2.0.9'
implementation 'ch.qos.logback:logback-classic:1.4.11'
implementation 'org.apache.pig:piggybank:0.16.0'
implementation 'org.apache.datafu:datafu-pig:1.6.1'
implementation 'org.apache.commons:commons-math:2.2'
}
task copyDependencies(type: Copy) {
from configurations.runtimeClasspath
into 'libs'
include '**/datafu-*.jar'
include '**/piggybank-*.jar'
onlyIf {
// Check if JARs exist
!file('libs/datafu-*.jar').exists() || !file('libs/piggybank-*.jar').exists()
}
}
// Run copyDependencies before Java compilation if needed
compileJava.dependsOn(copyDependencies)
jar {
manifest {
attributes 'Main-Class': 'io.github.sorieux.cli.Commands'
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
exclude 'META-INF/*.RSA', 'META-INF/*.DSA', 'META-INF/*.SF'
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
shadowJar {
archiveBaseName.set('convertPigToSql')
archiveVersion.set('1.0')
archiveClassifier.set('')
mergeServiceFiles()
}
tasks.withType(JavaExec) {
jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED'
}
test {
useJUnitPlatform()
jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED'
}