-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathbuild.gradle
More file actions
70 lines (57 loc) · 2.13 KB
/
build.gradle
File metadata and controls
70 lines (57 loc) · 2.13 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
freeCompilerArgs += ["-Xallow-result-return-type", "-Xsam-conversions=class"]
}
}
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_17
}
configurations {
fetchInstrumentationJar
}
dependencies {
implementation project(':utbot-framework')
implementation project(':utbot-python')
implementation group: 'io.github.microutils', name: 'kotlin-logging', version: kotlinLoggingVersion
implementation group: 'com.github.ajalt.clikt', name: 'clikt', version: cliktVersion
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: log4j2Version
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: log4j2Version
implementation group: 'com.github.UnitTestBot', name: 'PythonTypesAPI', version: pythonTypesAPIHash
}
processResources {
from(configurations.fetchInstrumentationJar) {
into "lib"
}
}
tasks.register('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
}