Skip to content

Updated gradle configuration #764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions gradle/include/jvm-project.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ dependencies {

compileKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
jvmTarget = JavaVersion.VERSION_1_8
freeCompilerArgs += ["-Xallow-result-return-type", "-Xsam-conversions=class"]
allWarningsAsErrors = false
}
}

compileTestKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
jvmTarget = JavaVersion.VERSION_1_8
freeCompilerArgs += ["-Xallow-result-return-type", "-Xsam-conversions=class"]
allWarningsAsErrors = false
}
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

compileJava {
options.compilerArgs << '-Werror' << '-Xlint:all'
options.compilerArgs << '-Xlint:all'
options.encoding = 'UTF-8'
}

Expand Down
1 change: 0 additions & 1 deletion utbot-analytics/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ if (osName == "mac") osName = "macosx"
String classifier = osName + "-x86_64"

evaluationDependsOn(':utbot-framework')
compileKotlin.dependsOn project(':utbot-instrumentation').tasks.jar
compileTestJava.dependsOn tasks.getByPath(':utbot-framework:testClasses')

dependencies {
Expand Down
7 changes: 0 additions & 7 deletions utbot-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ configurations {
fetchInstrumentationJar
}

compileKotlin {
dependsOn project(':utbot-instrumentation').tasks.jar
kotlinOptions {
allWarningsAsErrors = false
}
}

dependencies {
api project(':utbot-framework-api')
implementation project(':utbot-framework')
Expand Down
13 changes: 0 additions & 13 deletions utbot-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@ dependencies {
testImplementation group: 'junit', name: 'junit', version: junit4_version
}

compileKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
freeCompilerArgs += ["-Xallow-result-return-type", "-Xsam-conversions=class"]
allWarningsAsErrors = false
}
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

shadowJar {
configurations = [project.configurations.compileClasspath]
archiveClassifier.set('')
Expand Down
14 changes: 0 additions & 14 deletions utbot-framework-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@ plugins {

apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"

compileKotlin {
dependsOn project(':utbot-api').tasks.jar
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
freeCompilerArgs += ["-Xallow-result-return-type", "-Xsam-conversions=class"]
allWarningsAsErrors = false
}
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

dependencies {
api project(':utbot-core')
api project(':utbot-api')
Expand Down
14 changes: 0 additions & 14 deletions utbot-framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@ configurations {
z3native
}

compileKotlin {
dependsOn project(':utbot-fuzzers').tasks.jar
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
freeCompilerArgs += ["-Xallow-result-return-type", "-Xsam-conversions=class"]
allWarningsAsErrors = false
}
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

dependencies {

api project(':utbot-core')
Expand Down
2 changes: 0 additions & 2 deletions utbot-instrumentation-tests/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"

compileTestJava.dependsOn project(':utbot-instrumentation').tasks.jar

//noinspection GroovyAssignabilityCheck
configurations {
fetchInstrumentationJar
Expand Down
14 changes: 0 additions & 14 deletions utbot-instrumentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,6 @@ dependencies {
implementation group: 'org.mockito', name: 'mockito-inline', version: '4.2.0'
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

compileKotlin {
dependsOn project(':utbot-api').tasks.jar
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
freeCompilerArgs += ["-Xallow-result-return-type", "-Xsam-conversions=class"]
allWarningsAsErrors = false
}
}

jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE

Expand Down
7 changes: 7 additions & 0 deletions utbot-intellij/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"

compileKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11
freeCompilerArgs += ["-Xallow-result-return-type", "-Xsam-conversions=class"]
allWarningsAsErrors = false
}
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_11
}

buildscript {
repositories {
maven {
Expand Down
11 changes: 2 additions & 9 deletions utbot-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ plugins {
id 'java-library'
}

apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"

dependencies {
implementation group: 'org.jetbrains', name: 'annotations', version: '16.0.2'
implementation group: 'com.github.stephenc.findbugs', name: 'findbugs-annotations', version: '1.3.9-1'
Expand All @@ -24,15 +26,6 @@ dependencies {
testImplementation "org.mockito:mockito-inline:+"
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

compileJava {
dependsOn project(':utbot-api').tasks.jar
}

test {
minHeapSize = "128m"
maxHeapSize = "3072m"
Expand Down
18 changes: 0 additions & 18 deletions utbot-summary/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
apply from: "${parent.projectDir}/gradle/include/jvm-project.gradle"

compileKotlin {
dependsOn project(':utbot-api').tasks.jar
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
freeCompilerArgs += ["-Xallow-result-return-type", "-Xsam-conversions=class"]
allWarningsAsErrors = false
}
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

dependencies {
implementation "com.github.UnitTestBot:soot:${soot_commit_hash}"
api project(':utbot-framework-api')
Expand All @@ -23,10 +9,6 @@ dependencies {
implementation group: 'com.github.haifengl', name: 'smile-core', version: '2.6.0'
api project(':utbot-fuzzers')
implementation(project(':utbot-instrumentation'))
api(project(':utbot-instrumentation'))

implementation group: 'com.github.haifengl', name: 'smile-kotlin', version: '2.6.0'
implementation group: 'com.github.haifengl', name: 'smile-core', version: '2.6.0'

implementation group: 'io.github.microutils', name: 'kotlin-logging', version: kotlin_logging_version

Expand Down