-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
128 lines (108 loc) · 3.79 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
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
plugins {
java
application
id("io.freefair.lombok") version "6.6.1"
id("maven-publish")
id("org.springframework.boot") version "2.7.10"
id("io.spring.dependency-management") version "1.1.0"
}
group = "ru.alkoleft.bsl.doc"
version = "0.1.0-SNAPSHOT"
val JUINT_VERSION = "5.8.2"
repositories {
mavenLocal()
mavenCentral()
maven(url = "https://jitpack.io")
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
java.sourceSets["main"].java {
srcDir("src/main/java")
}
dependencies {
// spring
implementation("org.springframework.boot:spring-boot-starter")
implementation("org.springframework.boot:spring-boot-starter-websocket")
implementation("info.picocli:picocli-spring-boot-starter:4.7.1")
implementation("com.github.1c-syntax", "bsl-language-server", "0.20.0")
implementation("com.github.1c-syntax", "mdclasses", "0.10.3")
implementation("io.github.1c-syntax", "bsl-common-library", "f6714e4e")
implementation("io.github.1c-syntax", "supportconf", "0.1.1") {
exclude("io.github.1c-syntax", "bsl-common-library")
}
implementation("com.github.1c-syntax", "bsl-parser", "167aaad827322e09ccde4658a71152dad234de4b") {
exclude("com.tunnelvisionlabs", "antlr4-annotations")
exclude("com.ibm.icu", "*")
exclude("org.antlr", "ST4")
exclude("org.abego.treelayout", "org.abego.treelayout.core")
exclude("org.antlr", "antlr-runtime")
exclude("org.glassfish", "javax.json")
}
// template engine
implementation("com.github.jknack:handlebars:4.3.1")
implementation("org.apache.velocity:velocity-engine-core:2.3")
implementation("org.apache.velocity:velocity-tools:2.0")
testImplementation("org.junit.jupiter:junit-jupiter:$JUINT_VERSION")
testImplementation("org.junit.jupiter:junit-jupiter-api:$JUINT_VERSION")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$JUINT_VERSION")
}
tasks.test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed", "standard_error")
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.compilerArgs.add("-Xlint:unchecked")
options.compilerArgs.add("-Xlint:deprecation")
}
tasks.jar {
// manifest {
// attributes["Main-Class"] = "ru.alkoleft.bsl.doc.Main"
// }
enabled = true
archiveClassifier.set("")
}
tasks.bootJar {
// manifest {
// attributes["Main-Class"] = "ru.alkoleft.bsl.doc.Main"
// }
archiveClassifier.set("exec")
}
tasks {
val fatJar = register<Jar>("fatJar") {
dependsOn.addAll(listOf("compileJava", "processResources")) // We need this for Gradle optimization to work
archiveClassifier.set("standalone") // Naming the jar
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest { attributes(mapOf("Main-Class" to application.mainClass)) } // Provided we set it up in the application plugin configuration
val sourcesMain = sourceSets.main.get()
val contents = configurations.runtimeClasspath.get()
.map { if (it.isDirectory) it else zipTree(it) } +
sourcesMain.output
from(contents)
}
build {
dependsOn(fatJar) // Trigger fat jar creation during build
}
group = "build"
}
publishing {
repositories {
maven {
name = "bsldoc"
url = uri("https://maven.pkg.github.com/alkoleft/bsldoc")
credentials {
username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
}
}
}
publications {
register<MavenPublication>("gpr") {
from(components["java"])
}
}
}