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 }