aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle29
-rw-r--r--core/build.gradle22
-rw-r--r--core/src/test/java/com/intellij/rt/execution/junit/FileComparisonFailure.java39
-rw-r--r--core/src/test/java/com/intellij/rt/execution/junit/KnownException.java6
-rw-r--r--runners/gradle-integration-tests/build.gradle1
-rw-r--r--runners/gradle-integration-tests/src/test/java/com/intellij/rt/execution/junit/FileComparisonFailure.java39
-rw-r--r--runners/gradle-integration-tests/src/test/java/com/intellij/rt/execution/junit/KnownException.java6
7 files changed, 32 insertions, 110 deletions
diff --git a/build.gradle b/build.gradle
index f9c2bd70..e64427b7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -69,4 +69,31 @@ task wrapper(type: Wrapper) {
def versions = DependenciesVersionGetter.getVersions(project, kotlin_compiler_version)
-ext.ideaVersion = versions["idea.build.id"] \ No newline at end of file
+ext.ideaVersion = versions["idea.build.id"]
+
+configurations {
+ ideaIC
+ intellijCore
+}
+
+repositories {
+ maven { url 'https://www.jetbrains.com/intellij-repository/snapshots' }
+ maven { url 'https://www.jetbrains.com/intellij-repository/releases' }
+}
+
+dependencies {
+ intellijCore "com.jetbrains.intellij.idea:intellij-core:$ideaVersion"
+ ideaIC "com.jetbrains.intellij.idea:ideaIC:$ideaVersion"
+}
+
+def intellijCoreAnalysis() {
+ return zipTree(configurations.intellijCore.singleFile).matching ({
+ include("intellij-core-analysis.jar")
+ })
+}
+
+def ideaRT() {
+ return zipTree(project.configurations.ideaIC.singleFile).matching ({
+ include("lib/idea_rt.jar")
+ })
+} \ No newline at end of file
diff --git a/core/build.gradle b/core/build.gradle
index 3c602a6b..68d3da89 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -10,15 +10,6 @@ apply plugin: 'kotlin'
sourceCompatibility = 1.6
-repositories {
- maven { url 'https://www.jetbrains.com/intellij-repository/snapshots' }
- maven { url 'https://www.jetbrains.com/intellij-repository/releases' }
-}
-
-configurations {
- intellijCore
-}
-
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_compiler_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_compiler_version"
@@ -32,6 +23,8 @@ dependencies {
compile "teamcity:kotlin-ide-common:$kotlin_compiler_version"
compile "teamcity:markdown:$kotlin_compiler_version"
+ compile intellijCoreAnalysis()
+
//tools.jar
def toolsJar = files(((URLClassLoader) ToolProvider.getSystemToolClassLoader()).getURLs().findAll { it.path.endsWith("jar") })
compileOnly toolsJar
@@ -43,14 +36,5 @@ dependencies {
testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test-junit', version: kotlin_compiler_to_compile_core_version
testCompile "com.nhaarman:mockito-kotlin-kt1.1:1.5.0"
- intellijCore "com.jetbrains.intellij.idea:intellij-core:$ideaVersion"
-}
-
-
-afterEvaluate {
- dependencies {
- compile zipTree(configurations.intellijCore.singleFile).matching ({
- include("intellij-core-analysis.jar")
- })
- }
+ testCompile ideaRT()
} \ No newline at end of file
diff --git a/core/src/test/java/com/intellij/rt/execution/junit/FileComparisonFailure.java b/core/src/test/java/com/intellij/rt/execution/junit/FileComparisonFailure.java
deleted file mode 100644
index cbb1cc3c..00000000
--- a/core/src/test/java/com/intellij/rt/execution/junit/FileComparisonFailure.java
+++ /dev/null
@@ -1,39 +0,0 @@
-
-package com.intellij.rt.execution.junit;
-
-import junit.framework.ComparisonFailure;
-
-public class FileComparisonFailure extends ComparisonFailure implements KnownException {
- private final String myExpected;
- private final String myActual;
- private final String myFilePath;
- private final String myActualFilePath;
-
- public FileComparisonFailure(String message, String expected, String actual, String filePath) {
- this(message, expected, actual, filePath, (String)null);
- }
-
- public FileComparisonFailure(String message, String expected, String actual, String expectedFilePath, String actualFilePath) {
- super(message, expected, actual);
- this.myExpected = expected;
- this.myActual = actual;
- this.myFilePath = expectedFilePath;
- this.myActualFilePath = actualFilePath;
- }
-
- public String getFilePath() {
- return this.myFilePath;
- }
-
- public String getActualFilePath() {
- return this.myActualFilePath;
- }
-
- public String getExpected() {
- return this.myExpected;
- }
-
- public String getActual() {
- return this.myActual;
- }
-}
diff --git a/core/src/test/java/com/intellij/rt/execution/junit/KnownException.java b/core/src/test/java/com/intellij/rt/execution/junit/KnownException.java
deleted file mode 100644
index c24653ea..00000000
--- a/core/src/test/java/com/intellij/rt/execution/junit/KnownException.java
+++ /dev/null
@@ -1,6 +0,0 @@
-
-package com.intellij.rt.execution.junit;
-
-interface KnownException {
-
-}
diff --git a/runners/gradle-integration-tests/build.gradle b/runners/gradle-integration-tests/build.gradle
index 1b4ff5ed..f807c12b 100644
--- a/runners/gradle-integration-tests/build.gradle
+++ b/runners/gradle-integration-tests/build.gradle
@@ -14,6 +14,7 @@ dependencies {
testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-runtime', version: kotlin_for_gradle_version
testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-reflect', version: kotlin_for_gradle_version
testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test', version: kotlin_for_gradle_version
+ testCompile ideaRT()
dokkaPlugin project(path: ':runners:gradle-plugin', configuration: 'shadow')
dokkaAndroidPlugin project(path: ':runners:android-gradle-plugin', configuration: 'shadow')
diff --git a/runners/gradle-integration-tests/src/test/java/com/intellij/rt/execution/junit/FileComparisonFailure.java b/runners/gradle-integration-tests/src/test/java/com/intellij/rt/execution/junit/FileComparisonFailure.java
deleted file mode 100644
index cbb1cc3c..00000000
--- a/runners/gradle-integration-tests/src/test/java/com/intellij/rt/execution/junit/FileComparisonFailure.java
+++ /dev/null
@@ -1,39 +0,0 @@
-
-package com.intellij.rt.execution.junit;
-
-import junit.framework.ComparisonFailure;
-
-public class FileComparisonFailure extends ComparisonFailure implements KnownException {
- private final String myExpected;
- private final String myActual;
- private final String myFilePath;
- private final String myActualFilePath;
-
- public FileComparisonFailure(String message, String expected, String actual, String filePath) {
- this(message, expected, actual, filePath, (String)null);
- }
-
- public FileComparisonFailure(String message, String expected, String actual, String expectedFilePath, String actualFilePath) {
- super(message, expected, actual);
- this.myExpected = expected;
- this.myActual = actual;
- this.myFilePath = expectedFilePath;
- this.myActualFilePath = actualFilePath;
- }
-
- public String getFilePath() {
- return this.myFilePath;
- }
-
- public String getActualFilePath() {
- return this.myActualFilePath;
- }
-
- public String getExpected() {
- return this.myExpected;
- }
-
- public String getActual() {
- return this.myActual;
- }
-}
diff --git a/runners/gradle-integration-tests/src/test/java/com/intellij/rt/execution/junit/KnownException.java b/runners/gradle-integration-tests/src/test/java/com/intellij/rt/execution/junit/KnownException.java
deleted file mode 100644
index c24653ea..00000000
--- a/runners/gradle-integration-tests/src/test/java/com/intellij/rt/execution/junit/KnownException.java
+++ /dev/null
@@ -1,6 +0,0 @@
-
-package com.intellij.rt.execution.junit;
-
-interface KnownException {
-
-}