forked from manuel-sugawara/smithy-syntax-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
71 lines (57 loc) · 1.62 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
description = "A package used to define an annotation trait"
plugins {
val smithyGradleVersion: String by project
`java-library`
id("com.github.spotbugs").version("4.7.1")
id("software.amazon.smithy").version(smithyGradleVersion)
`maven-publish`
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
// Use Junit5's test runner.
tasks.withType<Test> {
useJUnitPlatform()
}
/*
* CheckStyle
* ====================================================
* https://docs.gradle.org/current/userguide/checkstyle_plugin.html
*/
apply(plugin = "checkstyle")
tasks["checkstyleTest"].enabled = false
/*
* Spotbugs
* ====================================================
*/
apply(plugin = "com.github.spotbugs")
// We don't need to lint tests.
tasks["spotbugsTest"].enabled = false
// Configure the bug filter for spotbugs.
spotbugs {
setEffort("max")
val excludeFile = File("${project.rootDir}/config/spotbugs/filter.xml")
if (excludeFile.exists()) {
excludeFilter.set(excludeFile)
}
}
repositories {
mavenLocal()
mavenCentral()
}
buildscript {
val smithyVersion: String by project
// Set the version of the CLI for the smithy gradle plugin to use when building this project
dependencies {
classpath("software.amazon.smithy:smithy-cli:$smithyVersion")
}
}
dependencies {
val smithyVersion: String by project
implementation("software.amazon.smithy:smithy-model:$smithyVersion")
implementation("mx.sugus.syntax.java:smithy-java-syntax-traits:0.1")
}