JPS: support KotlinResourceSourceRootType

Implementation is similar to KotlinSourceRootProvider.
This workaround is required since ResourcesTarget.computeRootDescriptors
supports only JavaResourceRoots.

#KT-27622 Fixed
This commit is contained in:
Sergey Rostov
2018-11-23 12:02:59 +03:00
parent 1301333e37
commit dcc47fd8ef
8 changed files with 98 additions and 1 deletions
@@ -0,0 +1 @@
test
@@ -0,0 +1,9 @@
kotlinProject/
kotlinProject/
root-package.kjsm
kotlinProject.js
kotlinProject.meta.js
lib/
kotlin.js
kotlin.meta.js
resource.txt
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" type="kotlin-source" />
<sourceFolder url="file://$MODULE_DIR$/assets" type="kotlin-resource" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="KotlinJavaScript" level="project" />
</component>
</module>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
</component>
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/kotlinProject.iml" filepath="$PROJECT_DIR$/kotlinProject.iml" />
</modules>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_3" default="true" project-jdk-name="Kotlin SDK" project-jdk-type="KotlinSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
@@ -0,0 +1,3 @@
fun main(args: Array<String>) {
println("Hello")
}