Skip to content

Commit 6ed18f5

Browse files
committed
Switch to kts
1 parent 1197115 commit 6ed18f5

File tree

29 files changed

+502
-502
lines changed

29 files changed

+502
-502
lines changed

build.gradle

Lines changed: 0 additions & 80 deletions
This file was deleted.

build.gradle.kts

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
import org.gradle.api.JavaVersion.VERSION_11
2+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
3+
4+
group = "org.utbot"
5+
6+
val kotlinVersion: String by project
7+
val semVer: String? by project
8+
val coroutinesVersion: String by project
9+
val collectionsVersion: String by project
10+
val junit5Version: String by project
11+
12+
version = semVer ?: "1.0-SNAPSHOT"
13+
14+
plugins {
15+
`java-library`
16+
kotlin("jvm") version "1.7.10"
17+
`maven-publish`
18+
}
19+
20+
configure<JavaPluginExtension> {
21+
sourceCompatibility = VERSION_11
22+
targetCompatibility = VERSION_11
23+
}
24+
25+
allprojects {
26+
27+
apply {
28+
plugin("maven-publish")
29+
plugin("kotlin")
30+
}
31+
32+
tasks {
33+
withType<JavaCompile> {
34+
sourceCompatibility = "1.8"
35+
targetCompatibility = "1.8"
36+
options.encoding = "UTF-8"
37+
options.compilerArgs = options.compilerArgs + "-Xlint:all"
38+
}
39+
withType<KotlinCompile> {
40+
kotlinOptions {
41+
jvmTarget = "1.8"
42+
freeCompilerArgs = freeCompilerArgs + listOf("-Xallow-result-return-type", "-Xsam-conversions=class")
43+
allWarningsAsErrors = false
44+
}
45+
}
46+
compileTestKotlin {
47+
kotlinOptions {
48+
jvmTarget = "1.8"
49+
freeCompilerArgs = freeCompilerArgs + listOf("-Xallow-result-return-type", "-Xsam-conversions=class")
50+
allWarningsAsErrors = false
51+
}
52+
}
53+
withType<Test> {
54+
// set heap size for the test JVM(s)
55+
minHeapSize = "128m"
56+
maxHeapSize = "3072m"
57+
58+
jvmArgs = listOf("-XX:MaxHeapSize=3072m")
59+
60+
useJUnitPlatform {
61+
excludeTags = setOf("slow", "IntegrationTest")
62+
}
63+
64+
addTestListener(object : TestListener {
65+
override fun beforeSuite(suite: TestDescriptor) {}
66+
override fun beforeTest(testDescriptor: TestDescriptor) {}
67+
override fun afterTest(testDescriptor: TestDescriptor, result: TestResult) {
68+
println("[$testDescriptor.classDisplayName] [$testDescriptor.displayName]: $result.resultType")
69+
}
70+
71+
override fun afterSuite(testDescriptor: TestDescriptor, result: TestResult) {
72+
if (testDescriptor.parent == null) { // will match the outermost suite
73+
println("Test summary: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)")
74+
}
75+
}
76+
})
77+
}
78+
}
79+
80+
repositories {
81+
mavenCentral()
82+
maven("https://jitpack.io")
83+
maven("https://plugins.gradle.org/m2")
84+
maven("https://www.jetbrains.com/intellij-repository/releases")
85+
maven("https://cache-redirector.jetbrains.com/maven-central")
86+
}
87+
88+
dependencies {
89+
implementation(group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = coroutinesVersion)
90+
implementation(
91+
group = "org.jetbrains.kotlinx",
92+
name = "kotlinx-collections-immutable-jvm",
93+
version = collectionsVersion
94+
)
95+
implementation(group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version = kotlinVersion)
96+
implementation(group = "org.jetbrains.kotlin", name = "kotlin-reflect", version = kotlinVersion)
97+
98+
testImplementation("org.junit.jupiter:junit-jupiter") {
99+
version {
100+
strictly(junit5Version)
101+
}
102+
}
103+
}
104+
}
105+
106+
subprojects {
107+
group = rootProject.group
108+
version = rootProject.version
109+
110+
publishing {
111+
publications {
112+
create<MavenPublication>("jar") {
113+
from(components["java"])
114+
groupId = "org.utbot"
115+
artifactId = project.name
116+
}
117+
}
118+
}
119+
}
120+
121+
dependencies {
122+
implementation(group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version = kotlinVersion)
123+
implementation(group = "org.jetbrains.kotlin", name = "kotlin-allopen", version = kotlinVersion)
124+
}
125+
126+
configure(
127+
listOf(
128+
project(":utbot-api"),
129+
project(":utbot-core"),
130+
project(":utbot-framework"),
131+
project(":utbot-framework-api"),
132+
project(":utbot-fuzzers"),
133+
project(":utbot-instrumentation"),
134+
project(":utbot-summary")
135+
)
136+
) {
137+
publishing {
138+
repositories {
139+
maven {
140+
name = "GitHubPackages"
141+
url = uri("https://maven.pkg.github.com/UnitTestBot/UTBotJava")
142+
credentials {
143+
username = System.getenv("GITHUB_ACTOR")
144+
password = System.getenv("GITHUB_TOKEN")
145+
}
146+
}
147+
}
148+
}
149+
}

gradle.properties

Lines changed: 55 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,61 @@
11
kotlin.code.style=official
22

3-
org.gradle.caching=false
4-
junit5_version=5.8.0-RC1
5-
junit4_version=4.13.2
6-
junit4_platform_version=1.9.0
7-
mockito_version=3.5.13
8-
z3_version=4.8.9.1
9-
z3_java_api_version=4.8.9
10-
soot_commit_hash=1f34746
11-
# previous soot_commit_hash=c6c78d9
12-
kotlin_version=1.7.10
13-
log4j2_version=2.13.3
14-
coroutines_version=1.6.3
15-
collections_version=0.3.4
16-
intellij_plugin_version=1.7.0
17-
jacoco_version=0.8.8
18-
commons_lang_version=3.11
19-
commons_io_version=2.8.0
20-
kotlin_logging_version=1.8.3
21-
ktor_version=1.4.1
22-
clikt_version=3.2.0
23-
guava_version=30.0-jre
24-
apache_commons_exec_version=1.2
25-
rgxgen_version=1.3
26-
apache_commons_text_version=1.9
27-
antlr_version=4.9.2
28-
kryo_version=5.3.0
29-
kryo_serializers_version=0.45
30-
asm_version=9.2
31-
testng_version=7.6.0
32-
mockito_inline_version=4.0.0
33-
jackson_version = 2.12.3
34-
javasmt_solver_z3_version=4.8.9-sosy1
35-
slf4j_version=1.7.36
36-
eclipse_aether_version=1.1.0
37-
maven_wagon_version=3.5.1
38-
maven_plugin_api_version=3.8.5
39-
maven_plugin_tools_version=3.6.4
40-
maven_plugin_testing_version=3.3.0
41-
maven_resolver_api_version=1.8.0
42-
sisu_plexus_version=0.3.5
43-
javacpp_version=1.5.3
44-
jsoup_version=1.7.2
45-
djl_api_version=0.17.0
46-
pytorch_native_version=1.9.1
47-
shadow_jar_version=7.1.2
48-
openblas_version=0.3.10-1.5.4
49-
arpack_ng_version=3.7.0-1.5.4
50-
# soot also depends on asm, so there could be two different versions
3+
# IU, IC, PC, PY, WS...
4+
ideType=IC
5+
6+
pythonCommunityPluginVersion=212.5457.59
7+
#Version numbers: https://plugins.jetbrains.com/plugin/631-python/versions
8+
pythonUltimatePluginVersion=212.5457.59
9+
10+
junit5Version=5.8.0-RC1
11+
junit4Version=4.13.2
12+
junit4PlatformVersion=1.9.0
13+
mockitoVersion=3.5.13
14+
z3Version=4.8.9.1
15+
z3JavaApiVersion=4.8.9
16+
sootCommitHash=1f34746
17+
kotlinVersion=1.7.10
18+
log4j2Version=2.13.3
19+
coroutinesVersion=1.6.3
20+
collectionsVersion=0.3.4
21+
intellijPluginVersion=1.7.0
22+
jacocoVersion=0.8.8
23+
commonsLangVersion=3.11
24+
commonsIoVersion=2.8.0
25+
kotlinLoggingVersion=1.8.3
26+
ktorVersion=1.4.1
27+
cliktVersion=3.2.0
28+
guavaVersion=30.0-jre
29+
apacheCommonsExecVersion=1.2
30+
apacheCommonsTextVersion=1.9
31+
rgxgenVersion=1.3
32+
antlrVersion=4.9.2
33+
kryoVersion=5.3.0
34+
kryoSerializersVersion=0.45
35+
asmVersion=9.2
36+
testNgVersion=7.6.0
37+
mockitoInlineVersion=4.0.0
38+
jacksonVersion = 2.12.3
39+
javasmtSolverZ3Version=4.8.9-sosy1
40+
slf4jVersion=1.7.36
41+
eclipseAetherVersion=1.1.0
42+
mavenWagonVersion=3.5.1
43+
mavenPluginApiVersion=3.8.5
44+
mavenPluginToolsVersion=3.6.4
45+
mavenPluginTestingVersion=3.3.0
46+
mavenResolverApiVersion=1.8.0
47+
sisuPlexusVersion=0.3.5
48+
javaCppVersion=1.5.3
49+
jsoupVersion=1.7.2
50+
djlApiVersion=0.17.0
51+
pytorchNativeVersion=1.9.1
52+
shadowJarVersion=7.1.2
53+
openblasVersion=0.3.10-1.5.4
54+
arpackNgVersion=3.7.0-1.5.4
5155

5256
org.gradle.daemon=false
5357
org.gradle.parallel=false
5458
org.gradle.jvmargs="-XX:MaxHeapSize=6144m"
55-
kotlin.compiler.execution.strategy=in-process
59+
kotlin.compiler.execution.strategy=in-process
60+
61+
org.gradle.caching=false

0 commit comments

Comments
 (0)