-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathbuild.gradle.kts
74 lines (58 loc) · 2.12 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
// === PLUGINS =====================================================================================
plugins {
java
idea
}
// === MAIN BUILD DETAILS ==========================================================================
group = "com.norswap"
version = "1.0.3-ALPHA"
description = "Language implementation demo"
java.sourceCompatibility = JavaVersion.VERSION_1_8
java.targetCompatibility = JavaVersion.VERSION_1_8
val website = "https://github.com/norswap/${project.name}"
val vcs = "https://github.com/norswap/${project.name}.git"
sourceSets.main.get().java.srcDir("src")
sourceSets.test.get().java.srcDir("test")
java {
withSourcesJar()
withJavadocJar()
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.test.get().useTestNG()
tasks.javadoc.get().options {
// https://github.com/gradle/gradle/issues/7038
this as StandardJavadocDocletOptions
addStringOption("Xdoclint:none", "-quiet")
if (JavaVersion.current().isJava9Compatible)
addBooleanOption("html5", true) // nice future proofing
}
tasks.withType(JavaCompile::class) {
// Give unsafe casts details instead of passive agressively hinting that they exist.
options.compilerArgs.plusAssign("-Xlint:unchecked")
options.isDeprecation = true
}
// === IDE =========================================================================================
idea.module {
// Download javadoc & sources for dependencies.
isDownloadJavadoc = true
isDownloadSources = true
}
// === DEPENDENCIES ================================================================================
repositories {
mavenCentral()
maven {
url = uri("https://autumn.jfrog.io/artifactory/gradle")
}
mavenLocal()
}
dependencies {
implementation("com.norswap:utils:2.1.12")
implementation("com.norswap:autumn:1.2.0")
implementation("com.norswap:uranium:1.0.12-ALPHA")
implementation("org.ow2.asm:asm-all:5.2")
testImplementation("org.testng:testng:7.5")
testImplementation("org.slf4j:slf4j-simple:1.7.36")
}
// =================================================================================================