flutter create: enable Java support in IDEA (#9335)

Generates an android.iml file and a package-level library for flutter.jar.

Does not set up an Android SDK in IDEA; this isn't possible with a
template-based approach. But IDEA shows a clear warning, so the
user can fix this by setting the SDK.

(When creating a Flutter project from within IDEA, we can fix this up
afterwards in the plugin.)
This commit is contained in:
Brian Slesinsky
2017-04-14 10:12:48 -07:00
committed by GitHub
parent 9455fb64d9
commit 5cb9097965
5 changed files with 56 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
<component name="libraryTable">
<library name="Dart SDK">
<CLASSES>
<root url="file://{{dartSdk}}/lib/async" />
<root url="file://{{dartSdk}}/lib/collection" />
<root url="file://{{dartSdk}}/lib/convert" />
<root url="file://{{dartSdk}}/lib/core" />
<root url="file://{{dartSdk}}/lib/developer" />
<root url="file://{{dartSdk}}/lib/html" />
<root url="file://{{dartSdk}}/lib/indexed_db" />
<root url="file://{{dartSdk}}/lib/io" />
<root url="file://{{dartSdk}}/lib/isolate" />
<root url="file://{{dartSdk}}/lib/js" />
<root url="file://{{dartSdk}}/lib/js_util" />
<root url="file://{{dartSdk}}/lib/math" />
<root url="file://{{dartSdk}}/lib/mirrors" />
<root url="file://{{dartSdk}}/lib/svg" />
<root url="file://{{dartSdk}}/lib/typed_data" />
<root url="file://{{dartSdk}}/lib/web_audio" />
<root url="file://{{dartSdk}}/lib/web_gl" />
<root url="file://{{dartSdk}}/lib/web_sql" />
</CLASSES>
<SOURCES />
</library>
</component>

View File

@@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="Flutter for Android">
<CLASSES>
<root url="jar://{{androidFlutterJar}}!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@@ -3,6 +3,7 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/{{projectName}}.iml" filepath="$PROJECT_DIR$/{{projectName}}.iml" />
<module fileurl="file://$PROJECT_DIR$/android.iml" filepath="$PROJECT_DIR$/android.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,12 @@
<?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$/android">
<sourceFolder url="file://$MODULE_DIR$/android/app/src/main/java" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="Android API {{androidSdkVersion}} Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Flutter for Android" level="project" />
</component>
</module>