Skip to content

Commit ac24826

Browse files
committed
Gradle version upgrade
1 parent c09568f commit ac24826

File tree

40 files changed

+304
-192
lines changed

40 files changed

+304
-192
lines changed

Diff for: build.gradle

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
group 'org.utbot'
22

3-
apply plugin: 'java'
3+
apply plugin: 'java-library'
44

55
if (project.hasProperty('semVer')) {
66
project.version = project.semVer
77
} else {
88
project.version = '1.0-SNAPSHOT'
99
}
1010

11+
//noinspection GroovyAssignabilityCheck
1112
buildscript {
13+
//noinspection GroovyAssignabilityCheck
1214
repositories {
1315
mavenCentral()
1416
}
@@ -24,11 +26,12 @@ subprojects {
2426
version = rootProject.version
2527

2628
apply plugin: 'base'
27-
apply plugin: 'java'
29+
apply plugin: 'java-library'
2830
apply plugin: 'maven-publish'
2931

3032
publishing {
3133
publications {
34+
//noinspection GroovyAssignabilityCheck
3235
jar(MavenPublication) {
3336
from components.java
3437
groupId 'org.utbot'
@@ -37,6 +40,7 @@ subprojects {
3740
}
3841
}
3942

43+
//noinspection GroovyAssignabilityCheck
4044
repositories {
4145
mavenCentral()
4246
maven { url 'https://jitpack.io' }
@@ -53,6 +57,7 @@ configure([
5357
project(':utbot-summary')
5458
]) {
5559
publishing {
60+
//noinspection GroovyAssignabilityCheck
5661
repositories {
5762
maven {
5863
name = "GitHubPackages"

Diff for: gradle.properties

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
kotlin.code.style=official
2+
23
org.gradle.caching=false
34
junit5_version=5.8.0-RC1
45
junit4_version=4.4
@@ -7,12 +8,12 @@ mockito_version=3.5.13
78
z3_version=4.8.9.1
89
z3_java_api_version=4.8.9
910
soot_commit_hash=13be158
10-
kotlin_version=1.4.20
11+
kotlin_version=1.7.10
1112
log4j2_version=2.13.3
12-
coroutines_version=1.4.1
13+
coroutines_version=1.6.3
1314
collections_version=0.3.4
14-
intellij_plugin_version=0.6.4
15-
jacoco_version=0.8.5
15+
intellij_plugin_version=1.7.0
16+
jacoco_version=0.8.8
1617
commons_lang_version=3.11
1718
commons_io_version=2.8.0
1819
kotlin_logging_version=1.8.3
@@ -23,9 +24,9 @@ apache_commons_exec_version=1.2
2324
rgxgen_version=1.3
2425
apache_commons_text_version=1.9
2526
antlr_version=4.9.2
26-
kryo_version=5.1.1
27+
kryo_version=5.3.0
2728
kryo_serializers_version=0.45
28-
asm_version=8.0.1
29+
asm_version=7.3.1
2930
testng_version=7.4.0
3031
mockito_inline_version=4.0.0
3132
jackson_version = 2.12.3

Diff for: gradle/include/jvm-project.gradle

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apply plugin: 'java'
1+
apply plugin: 'java-library'
22
apply plugin: 'kotlin'
33

44
dependencies {
@@ -7,30 +7,32 @@ dependencies {
77
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: kotlin_version
88
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_version
99

10-
testImplementation("org.junit.jupiter:junit-jupiter:$junit5_version"){
11-
force = true
10+
testImplementation("org.junit.jupiter:junit-jupiter"){
11+
version {
12+
strictly junit5_version
13+
}
1214
}
1315
}
1416

1517
compileKotlin {
1618
kotlinOptions {
17-
jvmTarget = JavaVersion.VERSION_1_8
18-
freeCompilerArgs += ["-Xallow-result-return-type", "-Xinline-classes"]
19+
jvmTarget = JavaVersion.VERSION_11
20+
freeCompilerArgs += ["-Xallow-result-return-type", "-Xsam-conversions=class"]
1921
allWarningsAsErrors = false
2022
}
2123
}
2224

2325
compileTestKotlin {
2426
kotlinOptions {
25-
jvmTarget = JavaVersion.VERSION_1_8
26-
freeCompilerArgs += ["-Xallow-result-return-type", "-Xinline-classes"]
27+
jvmTarget = JavaVersion.VERSION_11
28+
freeCompilerArgs += ["-Xallow-result-return-type", "-Xsam-conversions=class"]
2729
allWarningsAsErrors = false
2830
}
2931
}
3032

3133
java {
32-
sourceCompatibility = JavaVersion.VERSION_1_8
33-
targetCompatibility = JavaVersion.VERSION_1_8
34+
sourceCompatibility = JavaVersion.VERSION_11
35+
targetCompatibility = JavaVersion.VERSION_11
3436
}
3537

3638
compileJava {

Diff for: gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

Diff for: settings.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ include 'utbot-instrumentation'
1414
include 'utbot-instrumentation-tests'
1515

1616
include 'utbot-summary'
17-
include 'utbot-gradle'
18-
include 'utbot-maven'
17+
//include 'utbot-gradle'
18+
//include 'utbot-maven'
1919
include 'utbot-summary-tests'
2020

Diff for: utbot-analytics/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ compileTestJava.dependsOn tasks.getByPath(':utbot-framework:testClasses')
1313

1414
dependencies {
1515
implementation(project(":utbot-framework"))
16-
compile(project(':utbot-instrumentation'))
16+
implementation(project(':utbot-instrumentation'))
1717
implementation(project(':utbot-summary'))
1818
testImplementation project(':utbot-sample')
1919
testImplementation group: 'junit', name: 'junit', version: junit4_version
@@ -43,7 +43,7 @@ dependencies {
4343
implementation "ai.djl.pytorch:pytorch-engine:$djl_api_version"
4444
implementation "ai.djl.pytorch:pytorch-native-auto:$pytorch_native_version"
4545

46-
testCompile project(':utbot-framework').sourceSets.test.output
46+
testImplementation project(':utbot-framework').sourceSets.test.output
4747
}
4848

4949
test {

Diff for: utbot-cli/build.gradle

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"
22

3+
//noinspection GroovyAssignabilityCheck
34
configurations {
45
fetchInstrumentationJar
56
}
@@ -24,9 +25,10 @@ dependencies {
2425
implementation group: 'com.github.ajalt.clikt', name: 'clikt', version: clikt_version
2526
implementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: junit5_version
2627
implementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: junit5_version
27-
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: log4j2_version
28-
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: log4j2_version
28+
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: log4j2_version
29+
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: log4j2_version
2930
implementation group: 'org.jacoco', name: 'org.jacoco.report', version: jacoco_version
31+
//noinspection GroovyAssignabilityCheck
3032
fetchInstrumentationJar project(path: ':utbot-instrumentation', configuration:'instrumentationArchive')
3133
}
3234

@@ -40,6 +42,7 @@ task createProperties(dependsOn: processResources) {
4042
doLast {
4143
new File("$buildDir/resources/main/version.properties").withWriter { w ->
4244
Properties properties = new Properties()
45+
//noinspection GroovyAssignabilityCheck
4346
properties['version'] = project.version.toString()
4447
properties.store w, null
4548
}
@@ -59,7 +62,7 @@ jar {
5962
attributes 'JAR-Type': 'Fat JAR'
6063
}
6164

62-
version project.version
65+
archiveVersion.set(project.version as String)
6366

6467
from {
6568
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }

Diff for: utbot-framework-api/src/main/kotlin/org/utbot/framework/UtSettings.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ object UtSettings {
290290
*
291291
* False by default (for saving disk space).
292292
*/
293-
var logConcreteExecutionErrors by getBooleanProperty(false)
293+
var logConcreteExecutionErrors by getBooleanProperty(true)
294294

295295
/**
296296
* Number of branch instructions using for clustering executions in the test minimization phase.

Diff for: utbot-framework-api/src/main/kotlin/org/utbot/framework/plugin/api/util/IdUtil.kt

+8-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ import org.utbot.framework.plugin.api.MethodId
1111
import org.utbot.framework.plugin.api.UtModel
1212
import org.utbot.framework.plugin.api.UtNullModel
1313
import org.utbot.framework.plugin.api.UtPrimitiveModel
14-
import java.lang.reflect.Constructor
15-
import java.lang.reflect.Executable
16-
import java.lang.reflect.Field
17-
import java.lang.reflect.Method
14+
import java.lang.reflect.*
1815
import java.util.concurrent.atomic.AtomicInteger
1916
import kotlin.contracts.ExperimentalContracts
2017
import kotlin.contracts.contract
@@ -247,6 +244,13 @@ val Class<*>.id: ClassId
247244
else -> ClassId(name)
248245
}
249246

247+
val Type.id: ClassId
248+
get() = when {
249+
javaClass.isArray -> ClassId(javaClass.name)
250+
javaClass.isPrimitive -> primitiveToId[this]!!
251+
else -> ClassId(javaClass.name)
252+
}
253+
250254
val KClass<*>.id: ClassId
251255
get() = java.id
252256

Diff for: utbot-framework/build.gradle

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"
22

3+
//noinspection GroovyAssignabilityCheck
34
repositories {
45
flatDir {
56
dirs 'dist'
67
}
78
}
89

10+
//noinspection GroovyAssignabilityCheck
911
configurations {
1012
z3native
1113
}
@@ -46,8 +48,8 @@ dependencies {
4648
testImplementation group: 'org.mockito', name: 'mockito-inline', version: mockito_inline_version
4749
testImplementation group: 'com.google.guava', name: 'guava', version: guava_version
4850

49-
testCompile group: 'org.mockito', name: 'mockito-inline', version: mockito_inline_version
50-
testCompile group: 'org.apache.logging.log4j', name: 'log4j-core', version: log4j2_version
51+
testImplementation group: 'org.mockito', name: 'mockito-inline', version: mockito_inline_version
52+
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: log4j2_version
5153

5254
z3native group: 'com.microsoft.z3', name: 'z3-native-win64', version: z3_version, ext: 'zip'
5355
z3native group: 'com.microsoft.z3', name: 'z3-native-linux64', version: z3_version, ext: 'zip'

Diff for: utbot-framework/src/main/java/org/utbot/engine/overrides/Boolean.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
public class Boolean {
77
@SuppressWarnings({"UnnecessaryBoxing", "BooleanConstructorCall", "unused"})
88
public static java.lang.Boolean valueOf(boolean x) {
9-
return new java.lang.Boolean(x);
9+
return java.lang.Boolean.valueOf(x);
1010
}
1111

1212
public static java.lang.Boolean valueOf(String s) {

Diff for: utbot-framework/src/main/java/org/utbot/engine/overrides/Byte.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
public class Byte {
1616
@SuppressWarnings({"UnnecessaryBoxing", "unused"})
1717
public static java.lang.Byte valueOf(byte x) {
18-
return new java.lang.Byte(x);
18+
return java.lang.Byte.valueOf(x);
1919
}
2020

2121
@SuppressWarnings({"unused", "DuplicatedCode", "IfStatementWithIdenticalBranches"})

Diff for: utbot-framework/src/main/java/org/utbot/engine/overrides/Character.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
public class Character {
77
@SuppressWarnings({"UnnecessaryBoxing", "unused"})
88
public static java.lang.Character valueOf(char x) {
9-
return new java.lang.Character(x);
9+
return java.lang.Character.valueOf(x);
1010
}
1111

1212
@SuppressWarnings("unused")

Diff for: utbot-framework/src/main/java/org/utbot/engine/overrides/Integer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
public class Integer {
1515
@SuppressWarnings({"UnnecessaryBoxing", "unused"})
1616
public static java.lang.Integer valueOf(int x) {
17-
return new java.lang.Integer(x);
17+
return java.lang.Integer.valueOf(x);
1818
}
1919

2020
@SuppressWarnings({"unused", "DuplicatedCode", "IfStatementWithIdenticalBranches"})

Diff for: utbot-framework/src/main/java/org/utbot/engine/overrides/Long.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
public class Long {
1515
@SuppressWarnings({"UnnecessaryBoxing", "unused"})
1616
public static java.lang.Long valueOf(long x) {
17-
return new java.lang.Long(x);
17+
return java.lang.Long.valueOf(x);
1818
}
1919

2020
@SuppressWarnings({"unused", "DuplicatedCode", "IfStatementWithIdenticalBranches"})

Diff for: utbot-framework/src/main/java/org/utbot/engine/overrides/Short.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
public class Short {
1515
@SuppressWarnings({"UnnecessaryBoxing", "unused"})
1616
public static java.lang.Short valueOf(short x) {
17-
return new java.lang.Short(x);
17+
return java.lang.Short.valueOf(x);
1818
}
1919

2020
@SuppressWarnings({"unused", "DuplicatedCode", "IfStatementWithIdenticalBranches"})

Diff for: utbot-framework/src/main/kotlin/org/utbot/engine/Extensions.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ import soot.jimple.internal.JStaticInvokeExpr
7171
import soot.jimple.internal.JVirtualInvokeExpr
7272
import soot.jimple.internal.JimpleLocal
7373
import soot.tagkit.ArtificialEntityTag
74-
import sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
74+
import java.lang.reflect.ParameterizedType
7575

7676
val JIdentityStmt.lines: String
7777
get() = tags.joinToString { "$it" }
@@ -403,7 +403,7 @@ val Type.baseType: Type
403403
get() = if (this is ArrayType) this.baseType else this
404404

405405
val java.lang.reflect.Type.rawType: java.lang.reflect.Type
406-
get() = if (this is ParameterizedTypeImpl) rawType else this
406+
get() = if (this is ParameterizedType) rawType else this
407407

408408
/**
409409
* Returns true if the addr belongs to “this” value, false otherwise.

Diff for: utbot-framework/src/main/kotlin/org/utbot/engine/Resolver.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ import soot.SootClass
8787
import soot.SootField
8888
import soot.Type
8989
import soot.VoidType
90-
import sun.java2d.cmm.lcms.LcmsServiceProvider
9190

9291
// hack
9392
const val MAX_LIST_SIZE = 10
@@ -1018,9 +1017,9 @@ val typesOfObjectsToRecreate = listOf(
10181017
"java.lang.CharacterDataLatin1",
10191018
"java.lang.CharacterData00",
10201019
"[Ljava.lang.StackTraceElement",
1020+
"[Lsun.java2d.cmm.lcms.LcmsServiceProvider",
10211021
PrintStream::class.qualifiedName,
10221022
AccessControlContext::class.qualifiedName,
1023-
LcmsServiceProvider::class.qualifiedName,
10241023
ICC_ProfileRGB::class.qualifiedName,
10251024
AtomicInteger::class.qualifiedName
10261025
)

0 commit comments

Comments
 (0)