forked from UnitTestBot/UTBotJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
76 lines (64 loc) · 2.78 KB
/
build.gradle
File metadata and controls
76 lines (64 loc) · 2.78 KB
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
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
freeCompilerArgs += ["-Xallow-result-return-type", "-Xsam-conversions=class"]
}
}
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_17
}
configurations {
fetchInstrumentationJar
}
dependencies {
implementation project(':utbot-framework')
implementation project(':utbot-cli')
implementation project(':utbot-python')
implementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion
// Without this dependency testng tests do not run.
implementation group: 'com.beust', name: 'jcommander', version: '1.48'
implementation group: 'org.junit.platform', name: 'junit-platform-console-standalone', version: junit4PlatformVersion
implementation group: 'io.github.microutils', name: 'kotlin-logging', version: kotlinLoggingVersion
implementation group: 'com.github.ajalt.clikt', name: 'clikt', version: cliktVersion
implementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: junit5Version
implementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junit5Version
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: log4j2Version
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: log4j2Version
implementation group: 'org.jacoco', name: 'org.jacoco.report', version: jacocoVersion
//noinspection GroovyAssignabilityCheck
fetchInstrumentationJar project(path: ':utbot-instrumentation', configuration:'instrumentationArchive')
}
processResources {
from(configurations.fetchInstrumentationJar) {
into "lib"
}
}
task createProperties(dependsOn: processResources) {
doLast {
new File("$buildDir/resources/main/version.properties").withWriter { w ->
Properties properties = new Properties()
//noinspection GroovyAssignabilityCheck
properties['version'] = project.version.toString()
properties.store w, null
}
}
}
classes {
dependsOn createProperties
}
jar {
manifest {
attributes 'Main-Class': 'org.utbot.cli.language.python.ApplicationKt'
attributes 'Bundle-SymbolicName': 'org.utbot.cli.language.python'
attributes 'Bundle-Version': "${project.version}"
attributes 'Implementation-Title': 'UtBot Python CLI'
attributes 'JAR-Type': 'Fat JAR'
}
archiveVersion.set(project.version as String)
dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}