-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
136 lines (117 loc) · 4.1 KB
/
Copy pathbuild.gradle
File metadata and controls
136 lines (117 loc) · 4.1 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import com.vanniktech.maven.publish.SonatypeHost
plugins {
id "scala"
id "java-library"
id "jacoco"
id "com.vanniktech.maven.publish" version "0.29.0"
id "net.nemerosa.versioning" version "3.1.0"
// Scala support
id "com.github.maiflai.scalatest" version "0.32"
id "cz.augi.gradle.scalafmt" version "1.21.3"
id "io.github.cosmicsilence.scalafix" version "0.2.2"
}
group = "io.github.mtsongithub.doetl"
// TODO: crossbuild for Scala 2.13
archivesBaseName = "spark-dialect-extension_2.12"
version = "0.0.5"
repositories {
mavenCentral()
}
dependencies {
// Scala support
implementation "org.scala-lang:scala-library:2.12.19"
// core Spark dependencies
// TODO: crossbuild for Spark 3.2-3.5
implementation "org.apache.spark:spark-core_2.12:3.5.1"
implementation "org.apache.spark:spark-sql_2.12:3.5.1"
// latest compatible with Java 8
implementation "ch.qos.logback:logback-classic:1.3.14"
// test dependencies
testImplementation "org.scalatest:scalatest_2.12:3.2.19"
testImplementation "com.vladsch.flexmark:flexmark-all:0.64.8"
testImplementation "org.mockito:mockito-scala_2.12:1.17.37"
// latest compatible with Java 8
testImplementation "io.github.cdimascio:dotenv-java:3.1.0"
// Clickhouse dependency
testImplementation ("com.clickhouse:clickhouse-jdbc:${project.properties['clickhouse.jdbc.version']}${project.properties['clickhouse.jdbc.version']?.startsWith('0.9') ? ':all' : ''}") {
exclude group: "org.antlr", module: "antlr4-runtime"
exclude group: "at.yawk.lz4", module: "lz4-java"
}
}
ext {
isReleaseVersion = !version.endsWith("SNAPSHOT")
}
test {
finalizedBy jacocoTestReport
systemProperty("CLICKHOUSE_JDBC_VERSION", project.properties['clickhouse.jdbc.version'])
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
}
tasks.withType(ScalaCompile) {
scalaCompileOptions.additionalParameters = ["-Ywarn-unused"]
}
getTasksByName("test", true).each { task ->
task.dependsOn(jar)
}
task printVersion {
doLast {
println project.version
}
}
task scaladocJar(type: Jar, dependsOn: scaladoc) {
archiveClassifier = "scaladoc"
from scaladoc.destinationDir
}
java {
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
}
jar {
manifest {
attributes(
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Implementation-Vendor": "MTS PJSC",
"Created-By": "Gradle ${gradle.gradleVersion}",
"Built-By": System.properties["user.name"],
"Build-Timestamp": versioning.info.time,
"Build-Revision": versioning.info.commit,
"Build-Jdk": "${System.properties["java.version"]} (${System.properties["java.vendor"]} ${System.properties["java.vm.version"]})",
"Build-OS": "${System.properties["os.name"]} ${System.properties["os.arch"]} ${System.properties["os.version"]}",
)
}
}
mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()
coordinates(project.group, "spark-dialect-extension_2.12", project.version)
pom {
name = "spark-dialect-extension"
description = "Spark dialect extension for enhanced type handling"
url = "https://mws.ru/data/mws-data-bridge/"
inceptionYear = "2024"
licenses {
license {
name = "Apache-2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0"
distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "doetl"
name = "MWS Data Bridge"
email = "onetools@mts.ru"
}
}
scm {
connection = "scm:git:git://github.com/MTSWebServices/spark-dialect-extension.git"
developerConnection = "scm:git:ssh://github.com/MTSWebServices/spark-dialect-extension.git"
url = "https://github.com/MTSWebServices/spark-dialect-extension"
}
}
}