From 862b42301e2428340df64bb3381a51d562433322 Mon Sep 17 00:00:00 2001 From: Peter Trifanov Date: Tue, 16 Feb 2021 18:19:43 +0300 Subject: [PATCH] Enable JVM IR (#757) ### What's done: * Enabled JVM IR * Upload gradle reports if tests have failed * Increased heap size for gradle tests --- .github/workflows/build_and_test.yml | 7 +++++++ diktat-gradle-plugin/build.gradle.kts | 2 ++ pom.xml | 3 +++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 5f3983c7f5..48ff9cf0dc 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -118,3 +118,10 @@ jobs: run: | mvn -B clean install shell: cmd + + - name: Upload gradle reports + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: gradle-test-report-${{ matrix.os }} + path: 'diktat-gradle-plugin/build/reports/' diff --git a/diktat-gradle-plugin/build.gradle.kts b/diktat-gradle-plugin/build.gradle.kts index daa17dcf97..aa67374040 100644 --- a/diktat-gradle-plugin/build.gradle.kts +++ b/diktat-gradle-plugin/build.gradle.kts @@ -61,6 +61,7 @@ tasks.withType { languageVersion = "1.3" apiVersion = "1.3" jvmTarget = "1.8" + useIR = true } dependsOn.add(generateVersionsFile) @@ -98,6 +99,7 @@ tasks.getByName("functionalTest") { testClassesDirs = functionalTest.output.classesDirs classpath = functionalTest.runtimeClasspath maxParallelForks = Runtime.getRuntime().availableProcessors() + maxHeapSize = "1024m" doLast { if (getCurrentOperatingSystem().isWindows) { // workaround for https://github.com/koral--/jacoco-gradle-testkit-plugin/issues/9 diff --git a/pom.xml b/pom.xml index d91794194c..29e546b0bf 100644 --- a/pom.xml +++ b/pom.xml @@ -229,6 +229,9 @@ src/main/kotlin src/main/resources + + -Xuse-ir + true