forked from substrait-io/substrait-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
60 lines (48 loc) · 1.71 KB
/
build.gradle.kts
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
import com.diffplug.gradle.spotless.SpotlessExtension
import com.diffplug.gradle.spotless.SpotlessPlugin
import com.github.vlsi.gradle.dsl.configureEach
plugins {
`maven-publish`
id("java")
id("idea")
id("com.github.vlsi.gradle-extensions") version "1.74"
id("com.diffplug.spotless") version "6.5.1"
}
publishing { publications { create<MavenPublication>("maven") { from(components["java"]) } } }
repositories { mavenCentral() }
java { toolchain { languageVersion.set(JavaLanguageVersion.of(17)) } }
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
implementation("org.slf4j:slf4j-jdk14:1.7.30")
annotationProcessor("org.immutables:value:2.8.8")
compileOnly("org.immutables:value-annotations:2.8.8")
}
val submodulesUpdate by
tasks.creating(Exec::class) {
group = "Build Setup"
description = "Updates (and inits) substrait git submodule"
commandLine = listOf("git", "submodule", "update", "--init", "--recursive")
}
allprojects {
repositories { mavenCentral() }
tasks.configureEach<Test> { useJUnitPlatform() }
tasks.withType<JavaCompile> { dependsOn(submodulesUpdate) }
tasks.withType<JavaCompile>().configureEach { options.compilerArgs.add("--enable-preview") }
tasks.withType<Test>().configureEach { jvmArgs("--enable-preview") }
group = "io.substrait"
version = "1.0-SNAPSHOT"
plugins.withType<SpotlessPlugin>().configureEach {
configure<SpotlessExtension> {
kotlinGradle { ktfmt().googleStyle() }
java {
googleJavaFormat()
removeUnusedImports()
trimTrailingWhitespace()
targetExclude(
"**/build*/**",
)
}
}
}
}