-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
executable file
·53 lines (42 loc) · 1.03 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.3.31"
antlr
`maven-publish`
}
group = "com.suushiemaniac"
version = "2.0"
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib"))
antlr("org.antlr:antlr4:4.7.2")
}
tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}
create<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(sourceSets["main"].allSource)
dependsOn("classes")
}
getByName<AntlrTask>("generateGrammarSource") {
arguments = arguments + listOf("-visitor", "-no-listener", "-package", "com.suushiemaniac.cubing.alglib.antlr")
}
getByName<KotlinCompile>("compileKotlin") {
dependsOn("generateGrammarSource")
}
}
kotlin.sourceSets {
forEach {
it.kotlin.exclude("Main.kt")
}
}
publishing.publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
artifact(tasks["sourcesJar"])
}
}