diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/build.gradle | 30 | ||||
-rw-r--r-- | core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt | 16 |
2 files changed, 39 insertions, 7 deletions
diff --git a/core/build.gradle b/core/build.gradle index 3d3e2317..3420e4e7 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -3,6 +3,7 @@ import javax.tools.ToolProvider buildscript { dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_compiler_to_compile_core_version" + classpath "org.jetbrains.intellij.plugins:gradle-intellij-plugin:$gradle_intellij_plugin_version" } } @@ -17,8 +18,6 @@ dependencies { compile group: 'com.google.inject', name: 'guice', version: '3.0' compile "org.jsoup:jsoup:1.8.3" - compile files("../lib/intellij-core-analysis.jar") - compile "teamcity:kotlin-compiler:$kotlin_compiler_version" compile "teamcity:kotlin-script-runtime:$kotlin_compiler_version" @@ -33,7 +32,32 @@ dependencies { compile project(":integration") testCompile group: 'junit', name: 'junit', version: '4.12' - testCompile group: 'org.jetbrains.kotlin', name: 'kotlin-test-junit', version: kotlin_version + 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" } +apply plugin: 'org.jetbrains.intellij' + +{ -> + intellij { + version = ideaVersion + instrumentCode = false + configureDefaultDependencies = false + extraDependencies 'intellij-core' + } + + ["patchPluginXml", "prepareSandbox", "prepareTestingSandbox", + "verifyPlugin", "runIde", "buildPlugin", "publishPlugin"].each { + tasks.remove(tasks.findByName(it)) + } +}() + +afterEvaluate { + dependencies { + compile intellij { + include("openapi.jar") + } + compile intellijExtra("intellij-core") { include("intellij-core.jar") } + compile project(path: ":strippedIdeaJar", configuration: "proguardOut") + } +} diff --git a/core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt b/core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt index 21f7e2da..2f2f94b3 100644 --- a/core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt +++ b/core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt @@ -32,7 +32,11 @@ import java.io.File * classes from projectModel-{api,impl}. */ class CoreProjectFileIndex(private val project: Project, contentRoots: List<ContentRoot>) : ProjectFileIndex, ModuleFileIndex { - override fun iterateContentUnderDirectory(p0: VirtualFile, p1: ContentIterator, p2: VirtualFileFilter): Boolean { + override fun iterateContent(p0: ContentIterator, p1: VirtualFileFilter?): Boolean { + throw UnsupportedOperationException() + } + + override fun iterateContentUnderDirectory(p0: VirtualFile, p1: ContentIterator, p2: VirtualFileFilter?): Boolean { throw UnsupportedOperationException() } @@ -74,7 +78,7 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List<Cont throw UnsupportedOperationException() } - override fun setOption(p0: String, p1: String) { + override fun setOption(p0: String, p1: String?) { throw UnsupportedOperationException() } @@ -288,11 +292,11 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List<Cont throw UnsupportedOperationException() } - override fun getRootFiles(p0: OrderRootType?): Array<out VirtualFile>? { + override fun getRootFiles(p0: OrderRootType): Array<out VirtualFile> { throw UnsupportedOperationException() } - override fun getRootUrls(p0: OrderRootType?): Array<out String>? { + override fun getRootUrls(p0: OrderRootType): Array<out String> { throw UnsupportedOperationException() } @@ -307,6 +311,10 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List<Cont } inner class MyModuleRootManager : ModuleRootManager() { + override fun getExternalSource(): ProjectModelExternalSource? { + throw UnsupportedOperationException() + } + override fun getExcludeRoots(): Array<out VirtualFile> { throw UnsupportedOperationException() } |