-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
115 lines (99 loc) · 3.28 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val kotlinVersion: String by rootProject
val coroutinesVersion: String by rootProject
val junit5Version: String by project
val semVer: String? by project
val GITHUB_USERNAME: String? by rootProject
val GITHUB_TOKEN: String? by rootProject
group = "org.jacodb"
project.version = semVer ?: "1.0-SNAPSHOT"
buildscript {
repositories {
mavenCentral()
maven(url = "https://plugins.gradle.org/m2/")
}
}
repositories {
mavenCentral()
}
plugins {
val kotlinVersion = "1.7.20"
`java-library`
`maven-publish`
`java-test-fixtures`
kotlin("jvm") version kotlinVersion
kotlin("plugin.allopen") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion
}
subprojects {
group = rootProject.group
version = rootProject.version
apply {
plugin("kotlin")
plugin("org.jetbrains.kotlin.plugin.serialization")
plugin("org.jetbrains.kotlin.plugin.allopen")
}
repositories {
mavenCentral()
maven("https://plugins.gradle.org/m2")
maven("https://plugins.gradle.org/m2")
maven {
url = uri("https://maven.pkg.github.com/UnitTestBot/jacodb")
credentials {
username = GITHUB_USERNAME ?: System.getenv("GITHUB_USERNAME")
password = GITHUB_TOKEN ?: System.getenv("GITHUB_TOKEN")
}
}
}
dependencies {
implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = coroutinesVersion)
implementation(group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version = kotlinVersion)
implementation(group = "org.jetbrains.kotlin", name = "kotlin-reflect", version = kotlinVersion)
testImplementation("org.junit.jupiter:junit-jupiter") {
version {
strictly(junit5Version)
}
}
}
tasks {
withType<JavaCompile> {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.encoding = "UTF-8"
options.compilerArgs = options.compilerArgs + "-Xlint:all"
}
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + listOf(
"-Xallow-result-return-type",
"-Xsam-conversions=class",
"-Xcontext-receivers",
"-Xjvm-default=all"
)
allWarningsAsErrors = false
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = freeCompilerArgs + listOf(
"-Xallow-result-return-type",
"-Xsam-conversions=class",
"-Xcontext-receivers"
)
allWarningsAsErrors = false
}
}
withType<Test> {
useJUnitPlatform()
jvmArgs = listOf("-Xmx2g", "-XX:+HeapDumpOnOutOfMemoryError", "-XX:HeapDumpPath=heapdump.hprof")
testLogging {
events("passed", "skipped", "failed")
}
}
}
allOpen {
annotation("org.openjdk.jmh.annotations.State")
}
}