Compare commits

..

143 Commits

Author SHA1 Message Date
Nikolay Krasko
fe4400c768 Consider only pinned builds for bootstrapping 2016-03-04 20:52:36 +03:00
Nikolay Krasko
3cbd0b3496 Do not depend on MOVE_SEARCH_FOR_REFERENCES_FOR_FILE global setting
Always search for references if something is under source root and disable search otherwise.

 #KT-11277 Fixed
2016-03-04 19:51:12 +03:00
Nikolay Krasko
e3beb060f7 Don't intercept move when there're no kotlin files
#KT-11277 Fixed
2016-03-04 19:50:35 +03:00
nik
360e1ed0d6 until-build set to 146.9999 to make Kotlin plugin compatible with new IDEA builds
(cherry picked from commit c69d332)
2016-02-18 10:21:00 +03:00
Dmitry Jemerov
63771c6368 trim -release- from plugin version number when checking whether the runtime is outdated
(cherry picked from commit 2a8e1af)
2016-02-14 15:38:15 +01:00
Dmitry Jemerov
8549ec7645 K 2016-02-12 20:39:08 +01:00
Pavel V. Talanov
4b3970ec58 Fix stub/ast mismatch for old binaries (rc-1036) in newer versions of plugin 2016-02-12 19:11:23 +03:00
Ilya Gorbunov
bded4842ee Change default buffer size to be 8K (same default as in java BufferedReader).
Rename internal constants.
(cherry picked from commit 17a9538)
2016-02-12 15:13:11 +03:00
Ilya Gorbunov
1d00a58922 Use HALF_EVEN rounding mode by default for BigDecimal division operator.
#KT-10462 Fixed
(cherry picked from commit 6c7cefa)
2016-02-11 18:43:59 +03:00
Nikolay Krasko
d332f0f236 Fix forgotten test data for 10648f44ac (KT-10212) 2016-02-11 16:43:01 +03:00
Alexey Sedunov
b40afdbe19 Change Signature: Temporarily disable type resolution checks in Change Signature Dialog 2016-02-10 16:23:37 +03:00
Alexey Sedunov
90e158f54c Change Signature: Fix reference substitution when default value is a single simple name reference
#KT-10954 Fixed
(cherry picked from commit bb2a5b0)
2016-02-09 19:42:43 +03:00
Alexey Sedunov
05b880f9a3 Introduce Variable: Skip type in template if no resolvable/non-error types are available in the current context
#KT-10808 Fixed
(cherry picked from commit 792d9c1)
2016-02-09 19:42:35 +03:00
Alexey Sedunov
9d53f5f7d7 Go to Test Action: Make available in the entire class text range
#KT-10757 Fixed
(cherry picked from commit e386a6b)
2016-02-09 19:42:20 +03:00
Zalim Bashorov
966b1dbb7f FIx possible NPEs when try to use TestModuleProperties in IDEA 144.x
#EA-78931 Fixed

(cherry picked from commit eacd50c)
2016-02-09 15:57:30 +03:00
Ilya Gorbunov
59c24718c2 J2K, expected errors: for each argument of removed overloads
(cherry picked from commit 78b7fb1)
2016-02-09 15:20:38 +03:00
Ilya Gorbunov
a406a897d7 Drop previously deprecated API.
(cherry picked from commit b4ebaad)
2016-02-09 15:20:04 +03:00
Ilya Gorbunov
dde3b3a245 Make Throwable properties message and cause open.
#KT-5587 Fixed
(cherry picked from commit 5361f6e)
2016-02-09 15:19:24 +03:00
Michael Bogdanov
9915356c1f Removed absent test 2016-02-09 10:13:43 +03:00
Stanislav Erokhin
075ff1a92c Correcting rewrite type info after compete call.
#KT-10934 Fixed
#KT-10896 Fixed
(cherry picked from commit 434bd07)
2016-02-08 21:27:36 +03:00
Michael Bogdanov
2a26b1bc01 Rollback "Fix for KT-10659: Debugger: Evaluate Expression and Watches fail for inline function parameter passed by reference"
(cherry picked from commit 848549dd5d)

Conflicts:
	idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinEvaluateExpressionTestGenerated.java
2016-02-08 16:47:09 +03:00
Zalim Bashorov
15e73d1260 Allow to use internal declarations from special modules in compiler (JPS)
(e.g. IDEA 16 gradle tests loaded in separate module)

 #KT-10595 Fixed
(cherry picked from commit 3c4cb54)
2016-02-08 16:06:54 +03:00
Zalim Bashorov
219afa4f9f J2K KotlinBuilderModuleScriptGenerator: cleanup
(cherry picked from commit e328c24)
2016-02-08 16:06:50 +03:00
Zalim Bashorov
b82f04053f J2K KotlinBuilderModuleScriptGenerator: convert
(cherry picked from commit 21e69a0)
2016-02-08 16:06:46 +03:00
Zalim Bashorov
8a6b2dbbfc J2K KotlinBuilderModuleScriptGenerator: .java -> .kt
(cherry picked from commit d503033)
2016-02-08 16:06:40 +03:00
Zalim Bashorov
21d2548073 Allow to use internal declarations from special modules in IDEA
(e.g. IDEA 16 gradle tests loaded in separate module)

 #KT-10595 Fixed
(cherry picked from commit 2c1d1e8)
2016-02-08 16:05:02 +03:00
Nikolay Krasko
bf23dd3aaa SOE on setEnabled(). setEnabled() changes were propagated back to action group with the request to update state (EA-71014) 2016-02-08 15:37:08 +03:00
Nikolay Krasko
5beb4bd340 Allow to process return statements without parent KtDeclaration (EA-70883) 2016-02-08 15:36:56 +03:00
Nikolay Krasko
0121860b64 Can't get file when event is invalid (EA-77748) 2016-02-08 15:36:47 +03:00
Dmitry Petrov
a42c8d811a KT-10939 CANNOT_COMPLETE_RESOLVE for inherited generic interface method
'original' for value parameters of fake override is not a value parameter of unsubstituted fake override.
Match value parameters by index.
(cherry picked from commit 5968ce9)
2016-02-08 10:17:23 +03:00
Alexander Udalov
b986297a90 Fix test data after removing old annotation classes 2016-02-07 10:08:33 +05:30
Alexander Udalov
a86e1d18c9 Delete old metadata annotation classes 2016-02-06 15:54:48 +05:30
Alexander Udalov
7cdf677368 Move constants from JvmAnnotationNames closer to usages 2016-02-06 15:54:44 +05:30
Alexander Udalov
8200c0ff21 Minor, add extra constant to JvmAnnotationNames, drop unneeded utility 2016-02-06 15:54:41 +05:30
Alexander Udalov
7ae324657d Do not write old metadata annotations to bytecode 2016-02-06 15:54:39 +05:30
Alexander Udalov
082f7709b5 Use kotlin.Metadata instead of old annotations in IDE, reflection and tests 2016-02-06 15:54:37 +05:30
Denis Zharkov
eae19c52b9 Generate multi-files facade even if it's empty
It still contains useful information about it's parts,
that may be used while building stubs for multi-file group
containing only InlineOnly functions
2016-02-05 17:29:24 +03:00
Denis Zharkov
29759e0712 Refine multi-file facades generation
Do not generate delegation from multi-file facade to inline-only functions
because they are effectively private in bytecode

 #KT-10858 Fixed
2016-02-05 17:29:24 +03:00
Valentin Kipyatkov
f168c401b3 Better diagnostic for EA-70945
(cherry picked from commit affbefd)
2016-02-05 16:32:22 +03:00
Valentin Kipyatkov
43232f4167 Added better diagnostic for EA-75805
(cherry picked from commit ce8e2d7)
2016-02-05 16:32:15 +03:00
Valentin Kipyatkov
e0533892a7 More correct convertation to string template when number literals involved
(cherry picked from commit 3fe6f9c)
2016-02-05 16:32:09 +03:00
Valentin Kipyatkov
eff6863d11 Fixed EA-75114
(cherry picked from commit 9c426e7)
2016-02-05 16:32:03 +03:00
Valentin Kipyatkov
b0292cc3a7 Fixed EA-75251
(cherry picked from commit c914ca0)
2016-02-05 16:31:56 +03:00
Valentin Kipyatkov
de72511c04 Fixed EA-75979
(cherry picked from commit eca581e)
2016-02-05 16:31:47 +03:00
Valentin Kipyatkov
28a84b7370 Fixed EA-76497
(cherry picked from commit 8b6338c)
2016-02-05 16:31:39 +03:00
Yan Zhulanow
e89819047b Pack actual Kotlin Android compiler plugin sources into kotlin-android-extensions-ver-sources.jar 2016-02-04 17:26:21 +03:00
Andrey Breslav
5995f73662 Adding sources jar to kotlin-android-extensions 2016-02-04 14:26:44 +03:00
Dmitry Jemerov
9ff208d840 ensure Kotlin's move handlers run before Java's
#KT-10703 Fixed
(cherry picked from commit 0a46033)
2016-02-03 17:47:34 +01:00
Pavel V. Talanov
21392e6b21 Prevent recursion when computing parameter list of KtLightMethod (part 2)
Use ClsWrapperStubPsiFactory when building light classes for decompiled kotlin classes
2016-02-03 19:44:57 +03:00
Ilya Gorbunov
3ebf25fe5c Inline-only Lazy.getValue extension 2016-02-03 18:29:38 +03:00
Michael Bogdanov
67f4f8fde2 More wise lambda search during inlining
(cherry picked from commit 6c45cf8)
2016-02-03 18:30:12 +03:00
Dmitry Jemerov
4d349c8623 don't veto rename of constructors
#KT-9693 Fixed
(cherry picked from commit 187694d)
2016-02-03 16:01:00 +01:00
Ilya Gorbunov
eabe9b5ae8 J2K: Remove special conversion for String.format.
(cherry picked from commit 805410bb19)
2016-02-03 17:22:17 +03:00
Ilya Gorbunov
0d3a2e7c54 In addition to extension String.format introduce String.Companion.format(format, args) to be used like in java.
(cherry picked from commit c243a2bdd5)
2016-02-03 17:22:16 +03:00
Ilya Gorbunov
8ae57107c4 Documentation stubs for new packages.
(cherry picked from commit 7105c7c182)
2016-02-03 17:22:15 +03:00
Mikhail Glukhikh
b7c4c23da1 Type comparison: first check for star projections, then obtain constructor parameters #KT-10893 Fixed
Also #EA-78405 Fixed
(cherry picked from commit 0c32fab)
2016-02-03 17:03:18 +03:00
Pavel V. Talanov
6c51df9fec Prevent recursion when computing parameter list of KtLightMethod
#KT-10890 Fixed
 #KT-10851 Fixed
2016-02-03 16:11:30 +03:00
Dmitry Jemerov
981523ce03 better place for J2K options
#KT-10513 Fixed
(cherry picked from commit db51910)
2016-02-03 13:23:26 +01:00
Dmitry Jemerov
981bb30707 don't show two "Rename variables" checkboxes for a Kotlin class
#KT-8509 Fixed
(cherry picked from commit 45a3876)
2016-02-03 13:23:17 +01:00
Dmitry Jemerov
9914f0ee65 use new API for excluding Kotlin plugin from update checks
(cherry picked from commit c881cd1)
2016-02-03 13:23:07 +01:00
Dmitry Jemerov
6fb246a352 use more deterministic check to determine that "Configure Kotlin in project" notification should be displayed
#KT-10898 Fixed
(cherry picked from commit e227f6f)
2016-02-03 13:22:52 +01:00
Michael Bogdanov
32a1e7dc82 Updated test data
(cherry picked from commit 3ec96f1)
2016-02-03 10:31:13 +03:00
Ilya Gorbunov
ad2d1ea15b SAM-constructors for Iterable and Sequence interfaces.
(cherry picked from commit f19ef6e3d5)
2016-02-03 03:06:11 +03:00
Ilya Gorbunov
ce0f22d299 Minor: reorder primitive specializations in generated code (according to the order they defined in java).
(cherry picked from commit 947fd84f1e)

# Conflicts:
#	libraries/stdlib/src/generated/_Arrays.kt
2016-02-03 03:06:08 +03:00
Ilya Gorbunov
0fb369f6ae Minor: reorder families in generated code.
(cherry picked from commit 7a50562a4e)
2016-02-03 03:05:20 +03:00
Ilya Gorbunov
7ad2732d3e Rearrange stdlib, part 2: rename files to better represent their content.
(cherry picked from commit 477b57cdfd)
2016-02-03 03:05:18 +03:00
Ilya Gorbunov
ba67067629 Rearrange stdlib between files and folders, rename files to better represent their content.
Fix package part name in testData

(cherry picked from commit 57cfa54957)
2016-02-03 03:05:16 +03:00
Ilya Gorbunov
601b18a4d8 IDEA version for bootstrapping (use IDEA built with kotlin rc branch) 2016-02-02 19:21:52 +03:00
Michael Bogdanov
25351185d4 Fix for crashed build
(cherry picked from commit 062f037)
2016-02-02 17:29:20 +03:00
Mikhail Glukhikh
5e4b94a3ca Delegated properties now cannot be used before initialization #KT-10869 Fixed
(cherry picked from commit 45298e0)
2016-02-02 17:10:43 +03:00
Michael Bogdanov
e3a16098e4 INVISIBLE_MEMBER_FROM_INLINE renamed to NON_PUBLIC_CALL_FROM_PUBLIC_INLINE
(cherry picked from commit 956c3b9)
2016-02-02 16:40:30 +03:00
Michael Bogdanov
056def876e Error diagnostic for private classes in inline functions; Fix for KT-7545: IllegalAccessError when accessing private nested class through inlined function from different package
#KT-7545 Fixed

(cherry picked from commit f0392643e632cbe1cf6a5a0b575ff41f7ee2d834)

Conflicts:
	compiler/frontend/src/org/jetbrains/kotlin/diagnostics/Errors.java
2016-02-02 16:40:24 +03:00
Michael Bogdanov
05437aed3d Generate package private visibility in bytecode for private classes
(cherry picked from commit c49ef8a)
2016-02-02 16:35:33 +03:00
Dmitry Jemerov
18461f067b don't try to parse empty text as XML
(cherry picked from commit 4a1d282)
2016-02-02 13:41:00 +01:00
Nikolay Krasko
c04f3bfbf1 Failed build is good enough for version increment 2016-02-02 15:36:10 +03:00
Denis Zharkov
ab3268957c Refine 'isMoreSpecific' calculation
Choose member with better visibility, it's needed for proper calculation
of types intersection member scope

 #KT-10481 Fixed
2016-02-02 15:28:45 +03:00
Ilya Gorbunov
bf2449876a Add UTF_32 charsets to Charsets object as lazy initialized properties.
#KT-10379 Fixed

(cherry picked from commit 148b53fc62)
2016-02-02 15:27:27 +03:00
Dmitry Petrov
07b2cff0aa Fix for KT-10881 Declaring constant in a mutlifile class causes an IllegalAccessError on its usage.
Generate fields for 'const' properties in facade class.

NB reading annotations for 'const' vals in multifile class doesn't work, KT-10892.
2016-02-02 15:13:40 +03:00
Yan Zhulanow
aec9bd7d52 Check annotations on default property getter/setter 2016-02-02 13:16:29 +03:00
Ilya Gorbunov
1523c95379 Make DEFAULT_BUFFER_SIZE a constant.
(cherry picked from commit 0519254)
2016-02-01 22:28:06 +03:00
Ilya Gorbunov
7c9efb1f4f Fix testData
(cherry picked from commit 801a26a)
2016-02-01 22:28:00 +03:00
Ilya Gorbunov
1360d75849 Do not inline Regex.replace
(cherry picked from commit a192915)
2016-02-01 22:27:54 +03:00
Ilya Gorbunov
5028859097 Introduce annotation InlineExposed to indicate internal members effectively public due to usage in inlined functions.
Currently, doesn't affect anything.

Make collectionSizeOrDefault and collectionSizeOrNull internal, but expose them via inlining together with mapCapacity.

Make Regex(Pattern) constructor exposed by inlined Pattern.toRegex
(cherry picked from commit dccae6c)
2016-02-01 22:27:47 +03:00
Ilya Gorbunov
1b03ba305a Make all assert inline. Field _Assertions.ENABLED instead of property ASSERTIONS_ENABLED
(cherry picked from commit dacf25f)
2016-02-01 22:27:35 +03:00
Ilya Gorbunov
def8d30322 IDEA version for bootstrapping
Build markdown every time (again).
(cherry picked from commit c763b59)
2016-02-01 22:27:21 +03:00
Ilya Gorbunov
500cc0c33c Throw assertion when inline-only is applied without inline
(cherry picked from commit 1cef327)
2016-02-01 22:27:11 +03:00
Ilya Gorbunov
ed09405d2e Do not use inline-only in java
(cherry picked from commit a12fe2c)
2016-02-01 22:27:05 +03:00
Ilya Gorbunov
8c6a32cd0b Include internal annotatations in mock runtime
(cherry picked from commit 8a00db5)
2016-02-01 22:26:59 +03:00
Ilya Gorbunov
fefa08bfc9 Deprecate currentThread property
(cherry picked from commit fc3f98d)
2016-02-01 22:26:49 +03:00
Ilya Gorbunov
53564770f2 Drop CharSequence.get extension
(cherry picked from commit 42bd8df)
2016-02-01 22:26:42 +03:00
Ilya Gorbunov
d89a3024ac Swap parameters in File.forEachBlock
(cherry picked from commit 1eee1fa)
2016-02-01 22:26:33 +03:00
Ilya Gorbunov
23105b1c7e Inline-only in kotlin.comparisons
(cherry picked from commit abe9270)
2016-02-01 22:26:30 +03:00
Ilya Gorbunov
80034fce1b Inline-only in kotlin.io
(cherry picked from commit 54977ee)
2016-02-01 22:26:05 +03:00
Ilya Gorbunov
933b4b2645 Inline-only in kotlin.text
(cherry picked from commit 47d580c)
2016-02-01 22:25:47 +03:00
Ilya Gorbunov
ebe9b23dcc Inline-only in kotlin and kotlin.system packages, split Float/Double extension implementations for JVM and JS to make them inline-only in JVM.
(cherry picked from commit 56c5758)
2016-02-01 22:25:36 +03:00
Ilya Gorbunov
dd81988a58 Inline-only in kotlin.concurrent, make all timer utilities inline.
(cherry picked from commit 40fae04)
2016-02-01 22:25:22 +03:00
Ilya Gorbunov
1800869ed5 Inline-only in kotlin.collections
(cherry picked from commit ce5fd3e)
2016-02-01 22:25:15 +03:00
Ilya Gorbunov
c8c36d7d56 Inline-only in generated code
(cherry picked from commit c7bd707)
2016-02-01 22:25:08 +03:00
Ilya Gorbunov
25cdcd6dd9 StdLib Generators: support three flavors of inline
(cherry picked from commit 8c0008a)
2016-02-01 22:25:01 +03:00
Dmitry Jemerov
d9a81aa8fc don't apply StandardScriptDefinition in REPL
(cherry picked from commit 38b58db)
2016-02-01 19:23:28 +01:00
Dmitry Jemerov
a93ce4aa80 correctly separate stdout and stderr when parsing REPL output
(cherry picked from commit 84f9cb9)
2016-02-01 19:23:20 +01:00
Ilya Gorbunov
7e31c16983 Wrap exceptions thrown by class builders and add details about class file being generated.
(cherry picked from commit 3ae4c03)
2016-02-01 21:02:31 +03:00
Ilya Gorbunov
92e1fd6cfb Verify index expectations for reduceIndexed/reduceRightIndexed
(cherry picked from commit 4f1418b)
2016-02-01 21:02:25 +03:00
Ilya Gorbunov
ee29f8294e Minor: verify exception type of failed fold/reduce
(cherry picked from commit 1357c77)
2016-02-01 21:02:20 +03:00
Gabriel Borges
d76f55396a Add foldIndexed and reduceIndexed groups of functions
- foldIndexed, foldRightIndexed, reduceIndexed and reduceRightIndexed have been added, in line with filterIndexed etc.;
- Test cases added appropriately for the new functions.
(cherry picked from commit d58efff)
2016-02-01 21:02:13 +03:00
Ilya Gorbunov
a1bed57179 InlineOnly annotation suppresses NOTHING_TO_INLINE diagnostics.
(cherry picked from commit 911940d)
2016-02-01 21:01:52 +03:00
Dmitry Jemerov
fa7eac71f1 remove old API usage inspection
(cherry picked from commit 95683bb)
2016-02-01 18:46:36 +01:00
Mikhail Glukhikh
ef5b692f9b Annotations on object literals are now correctly resolved #KT-9320 Fixed
(cherry picked from commit 84100ab)
2016-02-01 20:05:07 +03:00
Michael Bogdanov
b9a4890a14 Fix for KT-10729: Accessing private const field in companion object from a function in the same companion generates run-time error
(cherry picked from commit 5f38c1d)
2016-02-01 18:43:13 +03:00
Michael Bogdanov
d3c612a035 Idea dependency updated to 143.2072
(cherry picked from commit 9790afb)
2016-02-01 18:38:05 +03:00
Michael Bogdanov
9ba7338a9c Removed old default generation
(cherry picked from commit 328b9bf)
2016-02-01 18:38:02 +03:00
Michael Bogdanov
30a1a95a3a Added assertion for super call with default arguments in function default impl body
(cherry picked from commit c9cc9c5)
2016-02-01 18:37:49 +03:00
Michael Bogdanov
525bce6cc5 KT-10670: Debugger: Evaluate Expression/Watches fail for inline function parameter initialized with default value
#KT-10670 Fixed
(cherry picked from commit dc2cb40)
2016-02-01 18:37:47 +03:00
Michael Bogdanov
2e0412679c Fix for KT-10659: Debugger: Evaluate Expression and Watches fail for inline function parameter passed by reference
#KT-10659 Fixed
(cherry picked from commit d4df7aa)
2016-02-01 18:37:44 +03:00
Pavel V. Talanov
85d4cf8fc5 Fix NPE on trying to compile script files
(There is still no design)
2016-02-01 17:42:31 +03:00
Mikhail Glukhikh
de853b8961 Correct report of NO_VALUE_FOR_PARAMETER when function call contains no brackets and lambda at the end #KT-7813 Fixed
(cherry picked from commit d194af5)
2016-02-01 17:14:02 +03:00
Yan Zhulanow
19685e9974 Kapt: compile kotlinAfterJava without Jdk as well in Android projects (KT-10854) 2016-02-01 14:34:13 +03:00
Denis Zharkov
4e46b0ca90 Temporary disable warning about unchecked reified argument
#KT-10847 Fixed
 #KT-6484 Reopened
2016-02-01 13:40:30 +03:00
Mikhail Glukhikh
47b2adbb78 Take into account data flow info changes for special call (if/when/elvis/!!) arguments #KT-10824 Fixed
Smart casts on complex expressions look as no more possible
(cherry picked from commit ed8ccdc)
2016-01-29 17:45:18 +03:00
Mikhail Glukhikh
d19e59576c Fix for unprocessed lambda under not-null assertion #KT-10843 Fixed
Also #EA-76890 Fixed
(cherry picked from commit 4691351)
2016-01-29 17:32:14 +03:00
Mikhail Glukhikh
4095c54028 Additional catch for ReenteringLazyValueComputationException #KT-8448 Fixed
Also #EA-76264 Fixed
(cherry picked from commit 7fd1f50)
2016-01-29 17:30:48 +03:00
Mikhail Glukhikh
ec3ef1bb03 One non-processed branch is now allowed for if statement #KT-10805 Fixed
Also #EA-64033 Fixed
(cherry picked from commit 7e26fa6)
2016-01-29 17:29:47 +03:00
Evgeny Gerashchenko
a497b1fbf7 Minor. Syntax error cosmetics.
(cherry picked from commit c242ad9)
2016-01-29 15:09:49 +03:00
Evgeny Gerashchenko
27a013de2a KT-8275 Unterminated multi-line comment should be compilation error
#KT-8275 fixed
(cherry picked from commit 0d79c65)
2016-01-29 15:09:43 +03:00
Dmitry Jemerov
f36a68dcd4 remove logic to filter perf output from compiler output
(cherry picked from commit 6d7e1c6)
2016-01-28 16:13:46 +01:00
Dmitry Jemerov
8a68bc4061 report perf only if enabled in command line
(cherry picked from commit 6f7aed2)
2016-01-28 16:13:38 +01:00
Mikhail Glukhikh
d6a7780971 Regression: correct smart cast from Type? to Type!
(cherry picked from commit 5062ce2)
2016-01-28 17:51:38 +03:00
Ilya Gorbunov
1ac8602bc8 Move IndexedValue to kotlin.collections. 2016-01-28 12:38:09 +03:00
Nikolay Krasko
503053dfb2 Parametrize maven deploy to allow pushing to bintray 2016-01-28 11:58:14 +03:00
Alexander Udalov
6b62d18da0 Mark array constructors with 'inline'
To allow non-local returns from lambdas passed to them
2016-01-28 03:15:37 +03:00
Alexander Udalov
b181e3095d Reimplement generation of intrinsic array constructors
Instead of relying on a class from the runtime (which thus cannot be deleted
from the runtime ever), rely on a class from the compiler instead. This has a
minor downside: that class is compiled by the bootstrap compiler, so if codegen
of 'for'-loops or something else used in that class changes, it won't
immediately have an effect on a local working copy (on the build server
everything will be fine because of a 2-step building process).

In the future it may make sense to just manually create all the bytecode
instructions and dump them into a MethodNode. Currently the amount of work
needed for that seems rather significant
2016-01-28 03:15:35 +03:00
Alexander Udalov
d2108f5dea Minor, prettify Kotlin code in source maps 2016-01-28 03:15:34 +03:00
Alexander Udalov
0989a202b4 Optimize getFqName calls in KotlinBuiltIns
Check the simple name first, and only then construct the full FqName, in all
'is*' methods
2016-01-28 03:15:31 +03:00
Alexander Udalov
6f7091291e Make Array<T>(size, init) a constructor of Array
It's not marked as inline, this is why 'crossinline' was added in
jaggedArray.kt/jaggedDeep.kt. Will be fixed in the following commits
2016-01-28 03:15:29 +03:00
Alexander Udalov
f08f917160 Minor, drop DescriptorRendererOptions#prettyFunctionTypes 2016-01-28 03:15:27 +03:00
Alexander Udalov
eab81dab2d Make primitive array factory functions constructors 2016-01-28 03:15:26 +03:00
Alexander Udalov
02aa1246b8 Minor, improve AbstractLazyType#toString for debug 2016-01-28 03:15:24 +03:00
Alexander Udalov
18a17249c7 Minor, fix Array kdoc 2016-01-28 03:15:22 +03:00
Ilya Gorbunov
f96265b06f Allow call assertFailsWith<T> with default message. 2016-01-28 00:17:50 +03:00
Dmitry Jemerov
23152df154 back to correct bootstrap for RC branch 2016-01-27 19:52:15 +03:00
Dmitry Jemerov
c36275787e temp revert bootstrap changes 2016-01-27 19:52:14 +03:00
Dmitry Jemerov
d729c8ce7d don't use bootstrap tag for fetching bootstrap build, use latest build 2016-01-27 19:52:13 +03:00
Dmitry Jemerov
3a19f77408 update_dependencies set up for RC branch 2016-01-27 19:52:13 +03:00
29252 changed files with 250899 additions and 845157 deletions

8
.gitignore vendored
View File

@@ -13,11 +13,3 @@ workspace.xml
*.versionsBackup
/idea/testData/debugger/tinyApp/classes*
/jps-plugin/testData/kannotator
ultimate/.DS_Store
ultimate/.idea/shelf
ultimate/dependencies
ultimate/ideaSDK
ultimate/out
ultimate/tmp
ultimate/workspace.xml
ultimate/*.versionsBackup

1
.idea/ant.xml generated
View File

@@ -18,6 +18,5 @@
</properties>
</buildFile>
<buildFile url="file://$PROJECT_DIR$/TeamCityRelay.xml" />
<buildFile url="file://$PROJECT_DIR$/node_utils.xml" />
</component>
</project>

27
.idea/artifacts/KotlinBarePlugin.xml generated Normal file
View File

@@ -0,0 +1,27 @@
<component name="ArtifactManager">
<artifact name="KotlinBarePlugin">
<output-path>$PROJECT_DIR$/out/artifacts/BareKotlin</output-path>
<properties id="ant-postprocessing">
<options enabled="true">
<file>file://$PROJECT_DIR$/idea-runner/runner.xml</file>
<target>copy-runtime-for-idea-plugin</target>
</options>
</properties>
<root id="root">
<element id="directory" name="kotlinc">
<element id="dir-copy" path="$PROJECT_DIR$/dist/kotlinc" />
</element>
<element id="directory" name="lib">
<element id="archive" name="kotlin-bare-plugin.jar">
<element id="module-output" name="bare-plugin" />
<element id="module-output" name="descriptor.loader.java" />
<element id="module-output" name="frontend.java" />
<element id="module-output" name="descriptors" />
</element>
<element id="directory" name="jps">
<element id="artifact" artifact-name="KotlinJpsPlugin" />
</element>
</element>
</root>
</artifact>
</component>

View File

@@ -1,9 +0,0 @@
<component name="ArtifactManager">
<artifact type="jar" name="KotlinFormatter">
<output-path>$PROJECT_DIR$/out/artifacts/internal</output-path>
<root id="archive" name="kotlin-formatter.jar">
<element id="module-output" name="formatter" />
<element id="dir-copy" path="$PROJECT_DIR$/idea/formatter" />
</root>
</artifact>
</component>

View File

@@ -11,7 +11,7 @@
<element id="directory" name="META-INF">
<element id="dir-copy" path="$PROJECT_DIR$/jps-plugin/src/META-INF" />
</element>
<element id="extracted-dir" path="$PROJECT_DIR$/dependencies/cli-parser-1.1.2.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/dependencies/cli-parser-1.1.1.jar" path-in-jar="/" />
<element id="module-output" name="cli-common" />
<element id="module-output" name="idea-jps-common" />
<element id="module-output" name="jps-plugin" />
@@ -23,9 +23,8 @@
<element id="module-output" name="daemon-common" />
<element id="module-output" name="deserialization" />
<element id="extracted-dir" path="$PROJECT_DIR$/dependencies/native-platform-uberjar.jar" path-in-jar="/" />
<element id="module-output" name="android-extensions-jps" />
<element id="module-output" name="android-jps-plugin" />
<element id="module-output" name="build-common" />
<element id="module-output" name="compiler-runner" />
</root>
</artifact>
</component>

View File

@@ -10,7 +10,6 @@
<root id="root">
<element id="directory" name="lib">
<element id="archive" name="kotlin-plugin.jar">
<element id="extracted-dir" path="$PROJECT_DIR$/dependencies/cli-parser-1.1.2.jar" path-in-jar="/" />
<element id="module-output" name="backend" />
<element id="module-output" name="frontend" />
<element id="module-output" name="descriptors" />
@@ -25,12 +24,11 @@
<element id="module-output" name="js.parser" />
<element id="module-output" name="cli-common" />
<element id="module-output" name="idea-jps-common" />
<element id="module-output" name="build-common" />
<element id="module-output" name="preloader" />
<element id="module-output" name="deserialization" />
<element id="module-output" name="backend-common" />
<element id="library" level="project" name="builtins" />
<element id="module-output" name="js.ast" />
<element id="module-output" name="js.dart-ast" />
<element id="directory" name="kotlin">
<element id="dir-copy" path="$PROJECT_DIR$/core/builtins/native/kotlin" />
<element id="dir-copy" path="$PROJECT_DIR$/core/builtins/src/kotlin" />
@@ -39,8 +37,7 @@
<element id="module-output" name="idea-analysis" />
<element id="module-output" name="ide-common" />
<element id="file-copy" path="$PROJECT_DIR$/resources/kotlinManifest.properties" />
<element id="module-output" name="idea-android" />
<element id="module-output" name="idea-android-output-parser" />
<element id="module-output" name="kotlin-android-plugin" />
<element id="module-output" name="js.serializer" />
<element id="module-output" name="serialization" />
<element id="module-output" name="idea-completion" />
@@ -49,17 +46,6 @@
<element id="module-output" name="daemon-common" />
<element id="module-output" name="idea-repl" />
<element id="module-output" name="idea-live-templates" />
<element id="module-output" name="resolution" />
<element id="module-output" name="plugin-api" />
<element id="module-output" name="idea-ultimate" />
<element id="module-output" name="formatter" />
<element id="module-output" name="idea-maven" />
<element id="extracted-dir" path="$PROJECT_DIR$/dependencies/protobuf-2.6.1.jar" path-in-jar="/" />
<element id="module-output" name="backend.common" />
<element id="module-output" name="ir.tree" />
<element id="module-output" name="backend.jvm" />
<element id="module-output" name="ir.psi2ir" />
<element id="module-output" name="annotation-based-compiler-plugins-ide-support" />
</element>
<element id="library" level="project" name="javax.inject" />
<element id="directory" name="jps">
@@ -67,42 +53,11 @@
</element>
<element id="library" level="project" name="markdown" />
<element id="archive" name="kotlin-android-extensions-plugin.jar">
<element id="module-output" name="android-extensions-idea" />
<element id="module-output" name="android-idea-plugin" />
</element>
<element id="archive" name="kotlin-android-extensions-compiler-plugin.jar">
<element id="module-output" name="android-extensions-compiler" />
<element id="module-output" name="android-compiler-plugin" />
</element>
<element id="archive" name="android-lint.jar">
<element id="module-output" name="uast-kotlin" />
<element id="module-output" name="lint-idea" />
<element id="module-output" name="lint-checks" />
<element id="module-output" name="lint-api" />
<element id="module-output" name="uast-kotlin-idea" />
</element>
<element id="archive" name="allopen-ide-plugin.jar">
<element id="module-output" name="allopen-ide" />
</element>
<element id="archive" name="allopen-compiler-plugin.jar">
<element id="module-output" name="allopen-cli" />
</element>
<element id="archive" name="noarg-compiler-plugin.jar">
<element id="module-output" name="noarg-cli" />
</element>
<element id="archive" name="noarg-ide-plugin.jar">
<element id="module-output" name="noarg-ide" />
</element>
<element id="file-copy" path="$PROJECT_DIR$/dist/kotlinc/lib/kotlin-daemon-client.jar" />
<element id="file-copy" path="$PROJECT_DIR$/dist/kotlinc/lib/kotlin-script-runtime.jar" />
<element id="archive" name="sam-with-receiver-compiler-plugin.jar">
<element id="module-output" name="sam-with-receiver-cli" />
</element>
<element id="archive" name="sam-with-receiver-ide-plugin.jar">
<element id="module-output" name="sam-with-receiver-ide" />
</element>
<element id="archive" name="kotlin-gradle-tooling.jar">
<element id="module-output" name="kotlin-gradle-tooling" />
</element>
<element id="library" level="project" name="uast-java" />
</element>
<element id="directory" name="kotlinc">
<element id="dir-copy" path="$PROJECT_DIR$/dist/kotlinc" />

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaProjectCodeInsightSettings">
<excluded-names>
<name>kotlin.reflect.jvm.internal.impl</name>
</excluded-names>
</component>
</project>

View File

@@ -60,9 +60,6 @@
<option name="WHILE_BRACE_FORCE" value="1" />
<option name="FOR_BRACE_FORCE" value="1" />
<option name="FIELD_ANNOTATION_WRAP" value="0" />
<MarkdownNavigatorCodeStyleSettings>
<option name="RIGHT_MARGIN" value="72" />
</MarkdownNavigatorCodeStyleSettings>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
@@ -145,6 +142,10 @@
<option name="FOR_BRACE_FORCE" value="1" />
<option name="FIELD_ANNOTATION_WRAP" value="0" />
<option name="PARENT_SETTINGS_INSTALLED" value="true" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="HTML">
<indentOptions>

25
.idea/compiler.xml generated
View File

@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<option name="BUILD_PROCESS_HEAP_SIZE" value="2000" />
<excludeFromCompile>
<directory url="file://$PROJECT_DIR$/core/reflection.jvm" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/core/runtime.jvm" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/core/builtins" includeSubdirectories="true" />
<directory url="file://$PROJECT_DIR$/core/script.runtime" includeSubdirectories="true" />
</excludeFromCompile>
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
@@ -18,18 +18,13 @@
<entry name="!?*.kt" />
<entry name="!?*.clj" />
</wildcardResourcePatterns>
<bytecodeTargetLevel>
<module name="android-studio" target="1.8" />
<module name="idea" target="1.8" />
<module name="idea-analysis" target="1.8" />
<module name="idea-completion" target="1.8" />
<module name="idea-core" target="1.8" />
<module name="idea-live-templates" target="1.8" />
<module name="idea-repl" target="1.8" />
<module name="idea-runner" target="1.8" />
<module name="idea-test-framework" target="1.8" />
<module name="j2k" target="1.8" />
<module name="kannotator-jps-plugin-test" target="1.8" />
</bytecodeTargetLevel>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_STRING" value="-target 1.6" />
</component>
</project>

View File

@@ -1,8 +0,0 @@
<component name="ProjectDictionaryState">
<dictionary name="Alexey.Sedunov">
<words>
<w>inplace</w>
<w>renamer</w>
</words>
</dictionary>
</component>

View File

@@ -2,7 +2,6 @@
<dictionary name="Nikolay.Krasko">
<words>
<w>accessors</w>
<w>crossinline</w>
<w>fqname</w>
<w>goto</w>
<w>gradle</w>
@@ -17,7 +16,6 @@
<w>preloading</w>
<w>preprocess</w>
<w>redeclarations</w>
<w>smap</w>
<w>subclassed</w>
<w>subgraph</w>
<w>substep</w>

View File

@@ -3,7 +3,6 @@
<words>
<w>ctor</w>
<w>interner</w>
<w>kclass</w>
<w>lookups</w>
<w>unescape</w>
</words>

View File

@@ -2,9 +2,7 @@
<dictionary name="dzharkov">
<words>
<w>checkcast</w>
<w>coroutine</w>
<w>insn</w>
<w>liveness</w>
</words>
</dictionary>
</component>

View File

@@ -3,7 +3,6 @@
<words>
<w>decapitalize</w>
<w>delegator</w>
<w>elipsis</w>
<w>funs</w>
<w>immediates</w>
<w>initializers</w>
@@ -18,8 +17,6 @@
<w>renderers</w>
<w>rparenth</w>
<w>selectioner</w>
<w>smartcast</w>
<w>summand</w>
<w>unpluralize</w>
<w>weighers</w>
</words>

View File

@@ -1,9 +0,0 @@
<component name="ProjectDictionaryState">
<dictionary name="yan">
<words>
<w>impls</w>
<w>kapt</w>
<w>uast</w>
</words>
</dictionary>
</component>

BIN
.idea/icon.png generated

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -236,11 +236,6 @@
<scope name="idea openapi" level="WARNING" enabled="true" />
<scope name="runtime.classes" level="ERROR" enabled="true" />
</inspection_tool>
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
</inspection_tool>
<inspection_tool class="LoopToCallChain" enabled="false" level="INFO" enabled_by_default="false" />
<inspection_tool class="MethodMayBeStatic" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_onlyPrivateOrFinal" value="false" />
<option name="m_ignoreEmptyMethods" value="true" />
@@ -278,9 +273,6 @@
<inspection_tool class="ObsoleteCollection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreRequiredObsoleteCollectionTypes" value="false" />
</inspection_tool>
<inspection_tool class="PackageDirectoryMismatch" enabled="true" level="WARNING" enabled_by_default="false">
<scope name="all except testData" level="WARNING" enabled="true" />
</inspection_tool>
<inspection_tool class="ProtectedMemberInFinalClass" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="PublicFieldAccessedInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="ERROR" enabled_by_default="true">
@@ -416,7 +408,6 @@
<inspection_tool class="UnnecessaryUnboxing" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="UseOfPropertiesAsHashtable" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="UtilityClassWithPublicConstructor" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="VolatileLongOrDoubleField" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="WaitNotInLoop" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="WaitNotInSynchronizedContext" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="WaitWhileHoldingTwoLocks" enabled="true" level="WARNING" enabled_by_default="true" />

4
.idea/kotlinc.xml generated
View File

@@ -1,9 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinCommonCompilerArguments">
<option name="languageVersion" value="1.1" />
<option name="apiVersion" value="1.1" />
</component>
<component name="KotlinCompilerSettings">
<option name="additionalArguments" value="-version -Xallow-kotlin-package -Xskip-metadata-version-check" />
</component>

View File

@@ -6,7 +6,6 @@
<CLASSES>
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/android/lib" />
<root url="file://$PROJECT_DIR$/ideaSDK/plugins/android/lib/jps" />
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/android-common.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>

View File

@@ -1,11 +1,11 @@
<component name="libraryTable">
<library name="cli-parser">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/cli-parser-1.1.2.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/cli-parser-1.1.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/cli-parser-1.1.2-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/cli-parser-1.1.1-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -2,16 +2,343 @@
<library name="idea-full">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/lib" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins" />
</ANNOTATIONS>
<CLASSES>
<root url="file://$PROJECT_DIR$/ideaSDK/lib" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/antLayout/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/jps-builders/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/jps-builders/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/standalone-builder/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-serialization/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-serialization/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/impl/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/tests/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/relaxng/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/relaxng/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/dom-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/dom-tests/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/dom-openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-psi-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-psi-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/idea-ui/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/jsp-spi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/javac2/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/forms-compiler/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/forms-compiler/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/instrumentation-util/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/debugger/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/debugger/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/manifest/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/manifest/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/execution/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/execution/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-tests/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/jsp-openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-psi-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-runtime/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-psi-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/testFramework/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/remote-servers/api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/remote-servers/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/jsp-base-openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-analysis-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-indexing-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-analysis-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-indexing-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/build/cucumber-test-runner/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/lexer/jflex-1.4/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/lexer/jflex-1.4/examples/cup" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/lexer/jflex-1.4/examples/java" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/lexer/jflex-1.4/examples/binary" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/lexer/jflex-1.4/examples/simple" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/lexer/jflex-1.4/examples/interpreter" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/launcher-generator/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/images/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ant/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ant/tests/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ant/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ant/jps-plugin/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cvs/cvs-core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cvs/cvs-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cvs/javacvs-src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cvs/smartcvs-src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cvs/trilead-ssh2-build213/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cvs/trilead-ssh2-build213/examples" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/junit/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/src/main/java" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/src/test/java" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/jps-plugin/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/maven-server-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/maven2-server-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/maven2-server-impl/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/artifact-resolver-m2/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/artifact-resolver-m3/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/tasks/tasks-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/tasks/tasks-core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/tasks/tasks-java/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/tasks/tasks-tests/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xpath/xslt-rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xpath/xpath-lang/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xpath/xpath-lang/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xpath/xpath-view/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/devkit/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/devkit/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/devkit/jps-plugin/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/github/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/github/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/gradle/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/gradle/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/hotswap/agentSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/rt-constants/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/javaFX/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/javaFX/javaFX-CE/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/javaFX/javaFX-jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/javaFX/common-javaFX-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/testng/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/testng/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/eclipse/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/eclipse/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/eclipse/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/eclipse/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/hg4idea/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/hg4idea/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/git4idea/rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/git4idea/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/git4idea/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/git4idea/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/git4idea/test-stepdefs" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/junit_rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/svn4idea/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/svn4idea/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/svn4idea/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/terminal/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/terminal/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/commander/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/copyright/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/java-i18n/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/java-i18n/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/testng_rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/properties/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/properties/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntelliLang/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntelliLang/xml-support" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntelliLang/java-support" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntelliLang/IntelliLang-tests/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntelliLang/intellilang-jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ui-designer/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ui-designer/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ui-designer/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ui-designer/jps-plugin/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xslt-debugger/rt/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xslt-debugger/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xslt-debugger/engine/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xslt-debugger/engine/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ByteCodeViewer/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ui-designer-core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/InspectionGadgets/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/InspectionGadgets/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/InspectionGadgets/testsrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntentionPowerPak/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntentionPowerPak/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntentionPowerPak/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/generate-tostring/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/generate-tostring/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/runtime/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/jps-plugin/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cucumber-jvm-formatter/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/samples/comparingReferences/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/samples/comparingReferences/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/samples/conditionalOperatorConvertor/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/samples/conditionalOperatorConvertor/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/updater/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/boot/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/util/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/util/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/util-rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/core-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/forms_rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lang-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lang-api/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lvcs-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/smRunner/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/smRunner/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/bootstrap/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/core-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/funcTests/project1/module1/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lang-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lang-impl/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lvcs-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/usageView/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/extensions/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/extensions/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/testRunner/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/analysis-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/indexing-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/platform-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/analysis-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/editor-ui-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/editor-ui-ex/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/indexing-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/platform-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/platform-main/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/testFramework/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/testFramework/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/testFramework/bootstrap/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/xdebugger-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/platform-tests/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/remote-servers/api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/remote-servers/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/xdebugger-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/xdebugger-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/projectModel-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/projectModel-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/external-system-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/external-system-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/external-system-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/spellchecker/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/spellchecker/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/RegExpSupport/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/RegExpSupport/test" />
<root url="jar://$PROJECT_DIR$/dependencies/guava-17.0-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/asm5-src.zip!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/cli-parser-1.1.1-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/build/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-impl/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-psi-impl/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-structure-view/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/structuralsearch-java/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/typeMigration/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/typeMigration/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/jps-launcher/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/plugin-system/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/json/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/json/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/json/tests/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/annotations/common/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/annotations/java5/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/annotations/java8/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/built-in-server-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/built-in-server/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/configuration-store-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/diff-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/diff-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/duplicates-analysis/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/dvcs-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/dvcs-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lang-impl/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/remote-servers/agent-rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/script-debugger/backend/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/script-debugger/debugger-ui/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/script-debugger/debugger-ui/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/script-debugger/protocol/protocol-reader-runtime/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/structuralsearch/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/structuralsearch/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/structure-view-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/structure-view-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-api/vcs-api-core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/graph-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/graph/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/graph/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/impl/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/impl/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ShortcutPromoter/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/coverage-common/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/coverage/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/coverage/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/devkit/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/eclipse/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/editorconfig/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/git4idea/remote-servers-git/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/gradle/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/gradle/tooling-extension-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/gradle/tooling-extension-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/gradle/tooling-extension-impl/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/groovy-psi/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/groovy-psi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/structuralsearch-groovy/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/structuralsearch-groovy/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/java-decompiler/engine/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/java-decompiler/engine/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/java-decompiler/plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/java-decompiler/plugin/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/javaFX/FxBuilderEmbedder/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/junit/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/artifact-resolver-m31/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/artifact-resolver/common/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/maven3-server-common/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/maven30-server-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/maven32-server-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/properties/properties-psi-api/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/properties/properties-psi-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/properties/properties-psi-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/settings-repository/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/tasks/tasks-core/jira/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/tasks/tasks-core/jira/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/IntelliLang-python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/course-creator-intellij-py/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/course-creator-python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/course-creator-python/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/interactive-learning-intellij-py/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/interactive-learning-python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/educational/course-creator/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/educational/interactive-learning-intellij/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/educational/interactive-learning/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/educational/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/ide/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/ipnb/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/ipnb/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/pluginSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/pluginTestSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/psi-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/pydevSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/python-rest/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/python-rest/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/rest/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/rest/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/updater/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-analysis-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-analysis-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-psi-impl/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-structure-view-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-structure-view-impl/src" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/lib" recursive="false" />
</library>

View File

@@ -2,7 +2,9 @@
<library name="intellij-core">
<ANNOTATIONS>
<root url="file://$PROJECT_DIR$/annotations" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/lib" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins" />
</ANNOTATIONS>
<CLASSES>
<root url="file://$PROJECT_DIR$/ideaSDK/core" />
@@ -11,7 +13,325 @@
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/guava-17.0-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/asm5-src.zip!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/RegExpSupport/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/build/cucumber-test-runner/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/build/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/images/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/forms-compiler/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/forms-compiler/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/instrumentation-util/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/javac2/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/compiler/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/debugger/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/debugger/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/execution/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/execution/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/idea-ui/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-analysis-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-analysis-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-impl/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-indexing-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-indexing-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-psi-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-psi-impl/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-psi-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-runtime/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-structure-view/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/java-tests/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/jsp-base-openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/jsp-openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/jsp-spi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/manifest/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/manifest/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/remote-servers/api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/remote-servers/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/structuralsearch-java/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/testFramework/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/typeMigration/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/java/typeMigration/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/antLayout/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/jps-builders/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/jps-builders/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/jps-launcher/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-serialization/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-serialization/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/plugin-system/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/standalone-builder/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/json/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/json/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/json/tests/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/analysis-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/analysis-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/annotations/common/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/annotations/java5/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/annotations/java8/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/boot/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/bootstrap/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/built-in-server-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/built-in-server/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/configuration-store-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/core-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/core-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/diff-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/diff-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/duplicates-analysis/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/dvcs-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/dvcs-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/editor-ui-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/editor-ui-ex/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/extensions/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/extensions/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/external-system-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/external-system-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/external-system-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/forms_rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/funcTests/project1/module1/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/indexing-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/indexing-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lang-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lang-api/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lang-impl/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lang-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lang-impl/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lvcs-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/lvcs-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/platform-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/platform-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/platform-main/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/platform-tests/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/projectModel-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/projectModel-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/remote-servers/agent-rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/remote-servers/api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/remote-servers/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/script-debugger/backend/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/script-debugger/debugger-ui/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/script-debugger/debugger-ui/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/script-debugger/protocol/protocol-reader-runtime/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/smRunner/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/smRunner/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/structuralsearch/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/structuralsearch/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/structure-view-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/structure-view-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/testFramework/bootstrap/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/testFramework/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/testFramework/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/testRunner/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/usageView/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/util-rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/util/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/util/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-api/vcs-api-core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/graph-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/graph/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/graph/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/impl/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/vcs-log/impl/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/xdebugger-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/xdebugger-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/platform/xdebugger-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ByteCodeViewer/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/InspectionGadgets/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/InspectionGadgets/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/InspectionGadgets/testsrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntelliLang/IntelliLang-tests/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntelliLang/intellilang-jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntelliLang/java-support" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntelliLang/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntelliLang/xml-support" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntentionPowerPak/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntentionPowerPak/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/IntentionPowerPak/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ShortcutPromoter/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ant/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ant/jps-plugin/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ant/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ant/tests/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/commander/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/copyright/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/coverage-common/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/coverage/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/coverage/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cucumber-jvm-formatter/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cvs/cvs-core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cvs/cvs-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cvs/javacvs-src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cvs/smartcvs-src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cvs/trilead-ssh2-build213/examples" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/cvs/trilead-ssh2-build213/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/devkit/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/devkit/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/devkit/jps-plugin/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/eclipse/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/eclipse/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/eclipse/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/eclipse/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/editorconfig/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/generate-tostring/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/generate-tostring/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/git4idea/remote-servers-git/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/git4idea/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/git4idea/rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/git4idea/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/git4idea/test-stepdefs" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/git4idea/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/github/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/github/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/jps-plugin/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/runtime/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/google-app-engine/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/gradle/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/gradle/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/gradle/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/gradle/tooling-extension-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/gradle/tooling-extension-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/gradle/tooling-extension-impl/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/groovy-psi/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/groovy-psi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/hotswap/agentSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/rt-constants/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/structuralsearch-groovy/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/structuralsearch-groovy/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/groovy/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/hg4idea/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/hg4idea/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/java-decompiler/engine/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/java-decompiler/engine/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/java-decompiler/plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/java-decompiler/plugin/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/java-i18n/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/java-i18n/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/javaFX/FxBuilderEmbedder/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/javaFX/common-javaFX-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/javaFX/javaFX-CE/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/javaFX/javaFX-jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/javaFX/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/junit/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/junit/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/junit_rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/artifact-resolver-m2/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/artifact-resolver-m31/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/artifact-resolver-m3/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/artifact-resolver/common/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/jps-plugin/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/maven-server-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/maven2-server-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/maven2-server-impl/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/maven3-server-common/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/maven30-server-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/maven32-server-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/src/main/java" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/maven/src/test/java" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/properties/properties-psi-api/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/properties/properties-psi-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/properties/properties-psi-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/properties/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/properties/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/settings-repository/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/svn4idea/resources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/svn4idea/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/svn4idea/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/tasks/tasks-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/tasks/tasks-core/jira/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/tasks/tasks-core/jira/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/tasks/tasks-core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/tasks/tasks-java/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/tasks/tasks-tests/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/terminal/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/testng/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/testng/testSources" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/testng_rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ui-designer-core/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ui-designer/jps-plugin/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ui-designer/jps-plugin/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ui-designer/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/ui-designer/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xpath/xpath-lang/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xpath/xpath-lang/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xpath/xpath-view/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xpath/xslt-rt/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xslt-debugger/engine/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xslt-debugger/engine/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xslt-debugger/rt/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/plugins/xslt-debugger/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/IntelliLang-python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/course-creator-intellij-py/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/course-creator-python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/course-creator-python/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/interactive-learning-intellij-py/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/interactive-learning-python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/edu/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/educational/course-creator/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/educational/interactive-learning-intellij/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/educational/interactive-learning/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/educational/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/ide/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/ipnb/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/ipnb/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/pluginSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/pluginTestSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/psi-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/pydevSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/python-rest/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/python-rest/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/rest/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/rest/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/python/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/samples/comparingReferences/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/samples/comparingReferences/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/samples/conditionalOperatorConvertor/source" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/samples/conditionalOperatorConvertor/testSource" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/spellchecker/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/spellchecker/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/launcher-generator/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/lexer/jflex-1.4/examples/binary" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/lexer/jflex-1.4/examples/cup" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/lexer/jflex-1.4/examples/interpreter" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/lexer/jflex-1.4/examples/java" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/lexer/jflex-1.4/examples/simple" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/tools/lexer/jflex-1.4/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/updater/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/updater/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/dom-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/dom-openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/dom-tests/tests" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/openapi/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/relaxng/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/relaxng/test" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/tests/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-analysis-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-analysis-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-psi-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-psi-impl/gen" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-psi-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-structure-view-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/xml/xml-structure-view-impl/src" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/core" recursive="false" />
</library>

View File

@@ -1,11 +0,0 @@
<component name="libraryTable">
<library name="java-decompiler-plugin">
<CLASSES>
<root url="jar://$PROJECT_DIR$/ideaSDK/plugins/java-decompiler/lib/java-decompiler.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -8,18 +8,8 @@
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/protobuf-java-2.5.0-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/antLayout/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/jps-builders/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/jps-builders/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/jps-launcher/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-api/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-impl/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-impl/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-serialization/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/model-serialization/testSrc" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/plugin-system/src" />
<root url="jar://$PROJECT_DIR$/ideaSDK/sources/sources.jar!/jps/standalone-builder/src" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/ideaSDK/jps" recursive="false" />
</library>

View File

@@ -1,9 +0,0 @@
<component name="libraryTable">
<library name="kotlin-script-runtime">
<CLASSES>
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-script-runtime.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@@ -1,7 +1,7 @@
<component name="libraryTable">
<library name="kotlin-test">
<CLASSES>
<root url="jar://$KOTLIN_BUNDLED$/lib/kotlin-test.jar!/"/>
<root url="jar://$PROJECT_DIR$/dependencies/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-test.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>

View File

@@ -4,11 +4,11 @@
<root url="file://$PROJECT_DIR$/annotations" />
</ANNOTATIONS>
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/protobuf-2.6.1.jar!/" />
<root url="jar://$PROJECT_DIR$/ideaSDK/lib/protobuf-2.5.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/protobuf-2.6.1-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/protobuf-java-2.5.0-sources.jar!/" />
</SOURCES>
</library>
</component>

View File

@@ -1,15 +0,0 @@
<component name="libraryTable">
<library name="uast-java">
<CLASSES>
<root url="jar://$PROJECT_DIR$/dependencies/uast-common.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/uast-java.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/uast-tests.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/dependencies/uast-common-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/uast-java-sources.jar!/" />
<root url="jar://$PROJECT_DIR$/dependencies/uast-tests-sources.jar!/" />
</SOURCES>
</library>
</component>

2
.idea/misc.xml generated
View File

@@ -49,7 +49,7 @@
<component name="ProjectResources">
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="false" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
<component name="SuppressABINotification">

50
.idea/modules.xml generated
View File

@@ -3,31 +3,23 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Kotlin.iml" filepath="$PROJECT_DIR$/Kotlin.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/allopen/allopen-cli/allopen-cli.iml" filepath="$PROJECT_DIR$/plugins/allopen/allopen-cli/allopen-cli.iml" group="plugins/allopen" />
<module fileurl="file://$PROJECT_DIR$/plugins/allopen/allopen-ide/allopen-ide.iml" filepath="$PROJECT_DIR$/plugins/allopen/allopen-ide/allopen-ide.iml" group="plugins/allopen" />
<module fileurl="file://$PROJECT_DIR$/plugins/lint/android-annotations/android-annotations.iml" filepath="$PROJECT_DIR$/plugins/lint/android-annotations/android-annotations.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-compiler/android-extensions-compiler.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-compiler/android-extensions-compiler.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-idea/android-extensions-idea.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-idea/android-extensions-idea.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-extensions/android-extensions-jps/android-extensions-jps.iml" filepath="$PROJECT_DIR$/plugins/android-extensions/android-extensions-jps/android-extensions-jps.iml" group="plugins/android-extensions" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-compiler-plugin/android-compiler-plugin.iml" filepath="$PROJECT_DIR$/plugins/android-compiler-plugin/android-compiler-plugin.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-idea-plugin/android-idea-plugin.iml" filepath="$PROJECT_DIR$/plugins/android-idea-plugin/android-idea-plugin.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/android-jps-plugin/android-jps-plugin.iml" filepath="$PROJECT_DIR$/plugins/android-jps-plugin/android-jps-plugin.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/android-studio/android-studio.iml" filepath="$PROJECT_DIR$/android-studio/android-studio.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/android-tests/android-tests.iml" filepath="$PROJECT_DIR$/compiler/android-tests/android-tests.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/plugins/annotation-based-compiler-plugins-ide-support/annotation-based-compiler-plugins-ide-support.iml" filepath="$PROJECT_DIR$/plugins/annotation-based-compiler-plugins-ide-support/annotation-based-compiler-plugins-ide-support.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/annotation-collector/annotation-collector.iml" filepath="$PROJECT_DIR$/plugins/annotation-collector/annotation-collector.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/plugins/annotation-processing/annotation-processing.iml" filepath="$PROJECT_DIR$/plugins/annotation-processing/annotation-processing.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/ant/ant.iml" filepath="$PROJECT_DIR$/ant/ant.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/backend/backend.iml" filepath="$PROJECT_DIR$/compiler/backend/backend.iml" group="compiler/java" />
<module fileurl="file://$PROJECT_DIR$/compiler/backend-common/backend-common.iml" filepath="$PROJECT_DIR$/compiler/backend-common/backend-common.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/ir/backend.common/backend.common.iml" filepath="$PROJECT_DIR$/compiler/ir/backend.common/backend.common.iml" group="compiler/ir" />
<module fileurl="file://$PROJECT_DIR$/compiler/ir/backend.jvm/backend.jvm.iml" filepath="$PROJECT_DIR$/compiler/ir/backend.jvm/backend.jvm.iml" group="compiler/ir" />
<module fileurl="file://$PROJECT_DIR$/jps-plugin/bare-plugin/bare-plugin.iml" filepath="$PROJECT_DIR$/jps-plugin/bare-plugin/bare-plugin.iml" group="ide/jps" />
<module fileurl="file://$PROJECT_DIR$/build-common/build-common.iml" filepath="$PROJECT_DIR$/build-common/build-common.iml" />
<module fileurl="file://$PROJECT_DIR$/core/builtins/builtins.iml" filepath="$PROJECT_DIR$/core/builtins/builtins.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/compiler/builtins-serializer/builtins-serializer.iml" filepath="$PROJECT_DIR$/compiler/builtins-serializer/builtins-serializer.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/cli/cli.iml" filepath="$PROJECT_DIR$/compiler/cli/cli.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/cli/cli-common/cli-common.iml" filepath="$PROJECT_DIR$/compiler/cli/cli-common/cli-common.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/cli/cli-runner/cli-runner.iml" filepath="$PROJECT_DIR$/compiler/cli/cli-runner/cli-runner.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/compiler-runner/compiler-runner.iml" filepath="$PROJECT_DIR$/compiler/compiler-runner/compiler-runner.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/tests/compiler-tests.iml" filepath="$PROJECT_DIR$/compiler/tests/compiler-tests.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/tests-java8/compiler-tests-java8.iml" filepath="$PROJECT_DIR$/compiler/tests-java8/compiler-tests-java8.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/conditional-preprocessor/conditional-preprocessor.iml" filepath="$PROJECT_DIR$/compiler/conditional-preprocessor/conditional-preprocessor.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/container/container.iml" filepath="$PROJECT_DIR$/compiler/container/container.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/daemon/daemon.iml" filepath="$PROJECT_DIR$/compiler/daemon/daemon.iml" group="compiler/daemon" />
@@ -38,7 +30,6 @@
<module fileurl="file://$PROJECT_DIR$/core/descriptors.runtime/descriptors.runtime.iml" filepath="$PROJECT_DIR$/core/descriptors.runtime/descriptors.runtime.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/core/deserialization/deserialization.iml" filepath="$PROJECT_DIR$/core/deserialization/deserialization.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/eval4j/eval4j.iml" filepath="$PROJECT_DIR$/eval4j/eval4j.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/formatter/formatter.iml" filepath="$PROJECT_DIR$/idea/formatter/formatter.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/frontend/frontend.iml" filepath="$PROJECT_DIR$/compiler/frontend/frontend.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/frontend.java/frontend.java.iml" filepath="$PROJECT_DIR$/compiler/frontend.java/frontend.java.iml" group="compiler/java" />
<module fileurl="file://$PROJECT_DIR$/generators/generators.iml" filepath="$PROJECT_DIR$/generators/generators.iml" group="infrastructure" />
@@ -46,26 +37,18 @@
<module fileurl="file://$PROJECT_DIR$/idea/ide-common/ide-common.iml" filepath="$PROJECT_DIR$/idea/ide-common/ide-common.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea.iml" filepath="$PROJECT_DIR$/idea/idea.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-analysis/idea-analysis.iml" filepath="$PROJECT_DIR$/idea/idea-analysis/idea-analysis.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-android/idea-android.iml" filepath="$PROJECT_DIR$/idea/idea-android/idea-android.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-android/idea-android-output-parser/idea-android-output-parser.iml" filepath="$PROJECT_DIR$/idea/idea-android/idea-android-output-parser/idea-android-output-parser.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-completion/idea-completion.iml" filepath="$PROJECT_DIR$/idea/idea-completion/idea-completion.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-core/idea-core.iml" filepath="$PROJECT_DIR$/idea/idea-core/idea-core.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-jps-common/idea-jps-common.iml" filepath="$PROJECT_DIR$/idea/idea-jps-common/idea-jps-common.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-live-templates/idea-live-templates.iml" filepath="$PROJECT_DIR$/idea/idea-live-templates/idea-live-templates.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-maven/idea-maven.iml" filepath="$PROJECT_DIR$/idea/idea-maven/idea-maven.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-repl/idea-repl.iml" filepath="$PROJECT_DIR$/idea/idea-repl/idea-repl.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea-runner/idea-runner.iml" filepath="$PROJECT_DIR$/idea-runner/idea-runner.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/idea/idea-test-framework/idea-test-framework.iml" filepath="$PROJECT_DIR$/idea/idea-test-framework/idea-test-framework.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/incremental-compilation-impl/incremental-compilation-impl.iml" filepath="$PROJECT_DIR$/compiler/incremental-compilation-impl/incremental-compilation-impl.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/preloader/instrumentation/instrumentation.iml" filepath="$PROJECT_DIR$/compiler/preloader/instrumentation/instrumentation.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/compiler/ir/ir.ir2cfg/ir.ir2cfg.iml" filepath="$PROJECT_DIR$/compiler/ir/ir.ir2cfg/ir.ir2cfg.iml" group="compiler/ir" />
<module fileurl="file://$PROJECT_DIR$/compiler/ir/ir.psi2ir/ir.psi2ir.iml" filepath="$PROJECT_DIR$/compiler/ir/ir.psi2ir/ir.psi2ir.iml" group="compiler/ir" />
<module fileurl="file://$PROJECT_DIR$/compiler/ir/ir.tree/ir.tree.iml" filepath="$PROJECT_DIR$/compiler/ir/ir.tree/ir.tree.iml" group="compiler/ir" />
<module fileurl="file://$PROJECT_DIR$/j2k/j2k.iml" filepath="$PROJECT_DIR$/j2k/j2k.iml" group="j2k" />
<module fileurl="file://$PROJECT_DIR$/plugins/java-model-wrappers/java-model-wrappers.iml" filepath="$PROJECT_DIR$/plugins/java-model-wrappers/java-model-wrappers.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/compiler/java8-tests/java8-tests.iml" filepath="$PROJECT_DIR$/compiler/java8-tests/java8-tests.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/jps-plugin/jps-plugin.iml" filepath="$PROJECT_DIR$/jps-plugin/jps-plugin.iml" group="ide/jps" />
<module fileurl="file://$PROJECT_DIR$/jps-plugin/jps-tests/jps-tests.iml" filepath="$PROJECT_DIR$/jps-plugin/jps-tests/jps-tests.iml" group="ide/jps" />
<module fileurl="file://$PROJECT_DIR$/js/js.ast/js.ast.iml" filepath="$PROJECT_DIR$/js/js.ast/js.ast.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.dart-ast/js.dart-ast.iml" filepath="$PROJECT_DIR$/js/js.dart-ast/js.dart-ast.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.frontend/js.frontend.iml" filepath="$PROJECT_DIR$/js/js.frontend/js.frontend.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.inliner/js.inliner.iml" filepath="$PROJECT_DIR$/js/js.inliner/js.inliner.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.parser/js.parser.iml" filepath="$PROJECT_DIR$/js/js.parser/js.parser.iml" group="compiler/js" />
@@ -73,31 +56,16 @@
<module fileurl="file://$PROJECT_DIR$/js/js.tests/js.tests.iml" filepath="$PROJECT_DIR$/js/js.tests/js.tests.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/js/js.translator/js.translator.iml" filepath="$PROJECT_DIR$/js/js.translator/js.translator.iml" group="compiler/js" />
<module fileurl="file://$PROJECT_DIR$/jps-plugin/kannotator-jps-plugin-test/kannotator-jps-plugin-test.iml" filepath="$PROJECT_DIR$/jps-plugin/kannotator-jps-plugin-test/kannotator-jps-plugin-test.iml" group="ide/jps" />
<module fileurl="file://$PROJECT_DIR$/plugins/kapt3/kapt3.iml" filepath="$PROJECT_DIR$/plugins/kapt3/kapt3.iml" />
<module fileurl="file://$PROJECT_DIR$/idea/kotlin-gradle-tooling/kotlin-gradle-tooling.iml" filepath="$PROJECT_DIR$/idea/kotlin-gradle-tooling/kotlin-gradle-tooling.iml" />
<module fileurl="file://$PROJECT_DIR$/idea/kotlin-android-plugin/kotlin-android-plugin.iml" filepath="$PROJECT_DIR$/idea/kotlin-android-plugin/kotlin-android-plugin.iml" group="ide" />
<module fileurl="file://$PROJECT_DIR$/compiler/light-classes/light-classes.iml" filepath="$PROJECT_DIR$/compiler/light-classes/light-classes.iml" group="compiler/java" />
<module fileurl="file://$PROJECT_DIR$/plugins/lint/lint-api/lint-api.iml" filepath="$PROJECT_DIR$/plugins/lint/lint-api/lint-api.iml" group="plugins/lint" />
<module fileurl="file://$PROJECT_DIR$/plugins/lint/lint-checks/lint-checks.iml" filepath="$PROJECT_DIR$/plugins/lint/lint-checks/lint-checks.iml" group="plugins/lint" />
<module fileurl="file://$PROJECT_DIR$/plugins/lint/lint-idea/lint-idea.iml" filepath="$PROJECT_DIR$/plugins/lint/lint-idea/lint-idea.iml" group="plugins/lint" />
<module fileurl="file://$PROJECT_DIR$/plugins/noarg/noarg-cli/noarg-cli.iml" filepath="$PROJECT_DIR$/plugins/noarg/noarg-cli/noarg-cli.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/noarg/noarg-ide/noarg-ide.iml" filepath="$PROJECT_DIR$/plugins/noarg/noarg-ide/noarg-ide.iml" />
<module fileurl="file://$PROJECT_DIR$/non-compiler-tests/non-compiler-tests.iml" filepath="$PROJECT_DIR$/non-compiler-tests/non-compiler-tests.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/plugin-api/plugin-api.iml" filepath="$PROJECT_DIR$/compiler/plugin-api/plugin-api.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/plugins/plugins-tests/plugins-tests.iml" filepath="$PROJECT_DIR$/plugins/plugins-tests/plugins-tests.iml" group="plugins" />
<module fileurl="file://$PROJECT_DIR$/compiler/preloader/preloader.iml" filepath="$PROJECT_DIR$/compiler/preloader/preloader.iml" group="compiler/cli" />
<module fileurl="file://$PROJECT_DIR$/core/reflection.jvm/reflection.jvm.iml" filepath="$PROJECT_DIR$/core/reflection.jvm/reflection.jvm.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/compiler/resolution/resolution.iml" filepath="$PROJECT_DIR$/compiler/resolution/resolution.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/core/runtime.jvm/runtime.jvm.iml" filepath="$PROJECT_DIR$/core/runtime.jvm/runtime.jvm.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/plugins/sam-with-receiver/sam-with-receiver-cli/sam-with-receiver-cli.iml" filepath="$PROJECT_DIR$/plugins/sam-with-receiver/sam-with-receiver-cli/sam-with-receiver-cli.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/sam-with-receiver/sam-with-receiver-ide/sam-with-receiver-ide.iml" filepath="$PROJECT_DIR$/plugins/sam-with-receiver/sam-with-receiver-ide/sam-with-receiver-ide.iml" />
<module fileurl="file://$PROJECT_DIR$/core/script.runtime/script.runtime.iml" filepath="$PROJECT_DIR$/core/script.runtime/script.runtime.iml" group="core" />
<module fileurl="file://$PROJECT_DIR$/compiler/serialization/serialization.iml" filepath="$PROJECT_DIR$/compiler/serialization/serialization.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/tests-common/tests-common.iml" filepath="$PROJECT_DIR$/compiler/tests-common/tests-common.iml" group="compiler" />
<module fileurl="file://$PROJECT_DIR$/compiler/tests-ir-jvm/tests-ir-jvm.iml" filepath="$PROJECT_DIR$/compiler/tests-ir-jvm/tests-ir-jvm.iml" group="compiler/ir" />
<module fileurl="file://$PROJECT_DIR$/plugins/uast-kotlin/uast-kotlin.iml" filepath="$PROJECT_DIR$/plugins/uast-kotlin/uast-kotlin.iml" group="plugins/lint" />
<module fileurl="file://$PROJECT_DIR$/plugins/uast-kotlin-idea/uast-kotlin-idea.iml" filepath="$PROJECT_DIR$/plugins/uast-kotlin-idea/uast-kotlin-idea.iml" />
<module fileurl="file://$PROJECT_DIR$/temp-jdk8/temp-jdk8.iml" filepath="$PROJECT_DIR$/temp-jdk8/temp-jdk8.iml" />
<module fileurl="file://$PROJECT_DIR$/compiler/util/util.iml" filepath="$PROJECT_DIR$/compiler/util/util.iml" />
<module fileurl="file://$PROJECT_DIR$/core/util.runtime/util.runtime.iml" filepath="$PROJECT_DIR$/core/util.runtime/util.runtime.iml" group="core" />
</modules>
</component>
</project>
</project>

View File

@@ -1,8 +1,37 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="All Compiler Tests" type="CompoundRunConfigurationType" factoryName="Compound Run Configuration">
<toRun type="JUnit" name="Compiler Tests" />
<toRun type="JUnit" name="Java 8 Tests" />
<toRun type="JUnit" name="Js-backend tests" />
<configuration default="false" name="All Compiler Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx900m -XX:MaxPermSize=320m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -8,12 +8,12 @@
</extension>
<module name="idea" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx1250m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m -Djna.nosys=true" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx900m -XX:MaxPermSize=320m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />

View File

@@ -8,12 +8,12 @@
</extension>
<module name="compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.codegen" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx900m -XX:MaxPermSize=320m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m -Djna.nosys=true" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx900m -XX:MaxPermSize=320m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />

View File

@@ -1,39 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="All Non Compiler Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="non-compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx1100m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs>
<env name="NO_FS_ROOTS_ACCESS_CHECK" value="true" />
</envs>
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="53032" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -1,7 +1,39 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="All Tests" type="CompoundRunConfigurationType" factoryName="Compound Run Configuration">
<toRun type="CompoundRunConfigurationType" name="All Compiler Tests" />
<toRun type="JUnit" name="All Non Compiler Tests" />
<configuration default="false" name="All Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="generators" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx900m -XX:MaxPermSize=400m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=128m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs>
<env name="NO_FS_ROOTS_ACCESS_CHECK" value="true" />
</envs>
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="53032" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -1,26 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="All in jps-tests" type="JUnit" factoryName="JUnit" nameIsGenerated="true">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="jps-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-Xmx1250m -XX:ReservedCodeCacheSize=64m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Profile ">
<option name="myExternalizedOptions" />
</RunnerSettings>
<method />
</configuration>
</component>

View File

@@ -2,11 +2,11 @@
<configuration default="false" name="Android Studio" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Didea.paths.selector=AndroidStudioPreview -Didea.platform.prefix=AndroidStudio -Xmx1250m -XX:ReservedCodeCacheSize=64m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin,$PROJECT_DIR$/out/artifacts/KotlinAndroidExtensions" />
<option name="VM_PARAMETERS" value="-Didea.paths.selector=AndroidStudioPreview -Didea.platform.prefix=AndroidStudio -Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=450m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin,$PROJECT_DIR$/out/artifacts/KotlinAndroidExtensions" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/android-studio/sdk/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />

View File

@@ -2,13 +2,13 @@
<configuration default="false" name="Codegen Tests on Android" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="android-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="1.6" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.android.tests" />
<option name="MAIN_CLASS_NAME" value="org.jetbrains.kotlin.android.tests.AndroidRunner" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx850m -XX:+UseCodeCacheFlushing -Djna.nosys=true" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx512m -XX:MaxPermSize=320m -XX:+UseCodeCacheFlushing" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />

View File

@@ -1,37 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Compiler Tests" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx700m -XX:MaxPermSize=300m -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m -Djna.nosys=true" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs />
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Profile " />
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method />
</configuration>
</component>

View File

@@ -3,12 +3,12 @@
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="eval4j" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.eval4j.test" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -Djna.nosys=true" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />

View File

@@ -11,7 +11,7 @@
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
@@ -26,9 +26,6 @@
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="Make" enabled="false" />
<option name="MakeNoErrorCheck" enabled="true" />
</method>
<method />
</configuration>
</component>

View File

@@ -2,7 +2,7 @@
<configuration default="false" name="IDEA" type="Application" factoryName="Application" singleton="true">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Xmx1250m -XX:ReservedCodeCacheSize=64m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
<option name="VM_PARAMETERS" value="-Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=450m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -43,6 +43,7 @@
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
</option>
<option name="BuildArtifacts" enabled="true" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea-runner/runner.xml" target="force-enable-kotlin-plugin" />
</method>
</configuration>

View File

@@ -2,11 +2,11 @@
<configuration default="false" name="IDEA (No ProcessCanceledException)" type="Application" factoryName="Application" singleton="true">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Xmx1250m -XX:ReservedCodeCacheSize=64m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Didea.ProcessCanceledException=disabled -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
<option name="VM_PARAMETERS" value="-Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=250m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Didea.ProcessCanceledException=disabled -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />

23
.idea/runConfigurations/IDEA__win_.xml generated Normal file
View File

@@ -0,0 +1,23 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="IDEA (win)" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=450m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=${JAVA_HOME}\lib\tools.jar,../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="1.7" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="idea-runner" />
<envs />
<method>
<option name="BuildArtifacts" enabled="true">
<artifact name="KotlinPlugin" />
</option>
<option name="BuildArtifacts" enabled="true" />
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/idea-runner/runner.xml" target="force-enable-kotlin-plugin" />
</method>
</configuration>
</component>

View File

@@ -8,24 +8,21 @@
</extension>
<module name="j2k" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="pattern" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx700m -Djna.nosys=true" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx350m -XX:MaxPermSize=320m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
<value defaultName="singleModule" />
</option>
<envs />
<patterns>
<pattern testClass="org.jetbrains.kotlin.idea.conversion.copy.*" />
<pattern testClass="org.jetbrains.kotlin.j2k.*" />
</patterns>
<patterns />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="" />
<option name="TRANSPORT" value="0" />

View File

@@ -6,14 +6,14 @@
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests-java8" />
<module name="java8-tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="1.8" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m -Djna.nosys=true" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />

View File

@@ -1,28 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Java 8 Tests on JDK 9" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
<pattern>
<option name="PATTERN" value="org.jetbrains.kotlin.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<module name="compiler-tests-java8" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
<option name="ALTERNATIVE_JRE_PATH" value="9-ea" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -XX:+UseCodeCacheFlushing -XX:ReservedCodeCacheSize=64m -Djna.nosys=true --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.desktop/javax.swing=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<method />
</configuration>
</component>

View File

@@ -3,12 +3,12 @@
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="js.tests" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.js.test" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx1250m -XX:+UseCodeCacheFlushing -Djna.nosys=true" />
<option name="VM_PARAMETERS" value="-ea -XX:+HeapDumpOnOutOfMemoryError -Xmx900m -XX:MaxPermSize=320m -XX:+UseCodeCacheFlushing" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />

View File

@@ -3,12 +3,12 @@
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="kannotator-jps-plugin-test" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.jps.build.kannotator" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="package" />
<option name="VM_PARAMETERS" value="-ea -Djna.nosys=true" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />

View File

@@ -8,12 +8,12 @@
</extension>
<module name="idea" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="org.jetbrains.kotlin.completion.handlers" />
<option name="MAIN_CLASS_NAME" value="" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="pattern" />
<option name="VM_PARAMETERS" value="-ea -Xmx850m -Djna.nosys=true" />
<option name="VM_PARAMETERS" value="-ea -Xmx512m -XX:MaxPermSize=320m" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />

View File

@@ -2,11 +2,11 @@
<configuration default="false" name="Update-Dist-Run" type="Application" factoryName="Application" singleton="true">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" value="com.intellij.idea.Main" />
<option name="VM_PARAMETERS" value="-Xmx1250m -XX:ReservedCodeCacheSize=64m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
<option name="VM_PARAMETERS" value="-Xmx800m -XX:ReservedCodeCacheSize=64m -XX:MaxPermSize=450m -XX:+HeapDumpOnOutOfMemoryError -ea -Didea.is.internal=true -Didea.debug.mode=true -Didea.system.path=../system-idea -Didea.config.path=../config-idea -Dapple.laf.useScreenMenuBar=true -Dapple.awt.graphics.UseQuartz=true -Dsun.io.useCanonCaches=false -Dplugin.path=$PROJECT_DIR$/out/artifacts/Kotlin -Dkotlin.internal.mode.enabled=true -Didea.additional.classpath=../idea-kotlin-runtime/kotlin-runtime.jar,../idea-kotlin-runtime/kotlin-reflect.jar" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/ideaSDK/bin" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />

2
.idea/scopes/IDE.xml generated
View File

@@ -1,3 +1,3 @@
<component name="DependencyValidationManager">
<scope name="IDE" pattern="file[idea]:src/*/||file[idea]:testData/*/||file[ide-common]:src/*/||file[idea-analysis]:src/*/||file[idea-android]:src/*/||file[idea-completion]:src/*/||file[idea-completion]:testData/*/||file[idea-core]:src/*/||file[idea-jps-common]:/*/||file[idea-live-templates]:/*/||file[idea-live-templates]:testData/*/||file[idea-repl]:/*/||src[idea-android-output-parser]:*..*" />
<scope name="IDE" pattern="file[idea]:*/||file[idea-analysis]:*/||file[ide-lazy-resolve]:*/" />
</component>

File diff suppressed because it is too large Load Diff

View File

@@ -1,45 +1,32 @@
<a href="https://kotlinslackin.herokuapp.com"><img src="https://kotlinslackin.herokuapp.com/badge.svg" height="20"></a>
<a href="http://kotlinslackin.herokuapp.com"><img src="https://kotlinslackin.herokuapp.com/badge.svg" height="20"></a>
[![TeamCity (simple build status)](https://img.shields.io/teamcity/http/teamcity.jetbrains.com/s/bt345.svg)](https://teamcity.jetbrains.com/viewType.html?buildTypeId=bt345&branch_Kotlin=%3Cdefault%3E&tab=buildTypeStatusDiv)
[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlin/kotlin-maven-plugin.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.jetbrains.kotlin%22)
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)
# Kotlin Programming Language
Welcome to [Kotlin](https://kotlinlang.org/)! Some handy links:
Welcome to [Kotlin](http://kotlinlang.org/)! Some handy links:
* [Kotlin Site](https://kotlinlang.org/)
* [Getting Started Guide](https://kotlinlang.org/docs/tutorials/getting-started.html)
* [Kotlin Site](http://kotlinlang.org/)
* [Getting Started Guide](http://kotlinlang.org/docs/tutorials/getting-started.html)
* [Try Kotlin](http://try.kotlinlang.org/)
* [Kotlin Standard Library](https://kotlinlang.org/api/latest/jvm/stdlib/index.html)
* [Issue Tracker](https://youtrack.jetbrains.com/issues/KT)
* [Forum](https://discuss.kotlinlang.org/)
* [Kotlin Blog](https://blog.jetbrains.com/kotlin/)
* [Kotlin Standard Library](http://kotlinlang.org/api/latest/jvm/stdlib/index.html)
* [Issue Tracker](http://youtrack.jetbrains.com/issues/KT)
* [Forum](http://devnet.jetbrains.net/community/kotlin?view=discussions)
* [Kotlin Blog](http://blog.jetbrains.com/kotlin/)
* [Follow Kotlin on Twitter](https://twitter.com/kotlin)
* [Public Slack channel](https://kotlinslackin.herokuapp.com/)
* [Public Slack channel](http://kotlinslackin.herokuapp.com/)
* [TeamCity CI build](https://teamcity.jetbrains.com/project.html?tab=projectOverview&projectId=Kotlin)
## Editing Kotlin
* [Kotlin IntelliJ IDEA Plugin](https://kotlinlang.org/docs/tutorials/getting-started.html)
* [Kotlin Eclipse Plugin](https://kotlinlang.org/docs/tutorials/getting-started-eclipse.html)
* [Kotlin TextMate Bundle](https://github.com/vkostyukov/kotlin-sublime-package)
## Build environment requirements
In order to build Kotlin distribution you need to have:
- Apache Ant 1.9.4 and higher
- JDK 1.6, 1.7 and 1.8
- Setup environment variables as following:
JAVA_HOME="path to JDK 1.6"
JDK_16="path to JDK 1.6"
JDK_17="path to JDK 1.7"
JDK_18="path to JDK 1.8"
* [Kotlin IntelliJ IDEA Plugin](http://hadihariri.com/2012/02/17/the-kotlin-journey-part-i-getting-things-set-up/)
* [Kotlin Eclipse Plugin](http://kotlinlang.org/docs/tutorials/getting-started-eclipse.html)
* [Kotlin TextMate Bundle](https://github.com/k33g/kotlin-textmate-bundle#readme)
## Building
To build this project, first time you try to build you need to run this:
To build this project, first time you try to build you need to run this (requires Apache **Ant 1.8** or higher and **JDK 1.6**):
ant -f update_dependencies.xml
@@ -53,13 +40,13 @@ Then, you need to run
ant -f build.xml
which will build the binaries of the compiler and put them into the 'dist' directory. You may need to increase the **heap size** for Ant using
[ANT_OPTS](https://web.liferay.com/community/wiki/-/wiki/Main/Ant+opts).
[ANT_OPTS](http://www.liferay.com/community/wiki/-/wiki/Main/Ant+opts).
**OPTIONAL:** Maven distribution is built separately, run
mvn package
from 'libraries' directory after building the compiler. Refer to [libraries/ReadMe.md](libraries/ReadMe.md) for details.
from 'libraries' directory after building the compiler. Refer to `libraries/ReadMe.md` for details.
## Working with the project in IntelliJ IDEA
@@ -76,7 +63,7 @@ To keep the plugin version in sync with the rest of the team and our [Continuous
you should install the according to the [instructions below](#plugin-for-contributors).
If you want to have an IntelliJ IDEA installation without the Kotlin plugin which is separate to your default IntelliJ IDEA installation which has the Kotlin
plugin [see this document](https://devnet.jetbrains.com/docs/DOC-181) which describes how to have multiple IntelliJ IDEA installations using different configurations and plugin directories.
plugin [see this document](http://devnet.jetbrains.net/docs/DOC-181) which describes how to have multiple IntelliJ IDEA installations using different configurations and plugin directories.
From this root project there are Run/Debug Configurations for running IDEA or the Compiler Tests for example; so if you want to try out the latest and greatest IDEA plugin
@@ -115,22 +102,22 @@ Then update the list of plugins in "Browse Repositories", you'll see two version
# Contributing
We love contributions! There's [lots to do on Kotlin](https://youtrack.jetbrains.com/issues/KT) and on the
We love contributions! There's [lots to do on Kotlin](http://youtrack.jetbrains.com/issues/KT) and on the
[standard library](https://youtrack.jetbrains.com/issues/KT?q=Subtask+of%3A+KT-2554+%23Unresolved) so why not chat with us
about what you're interested in doing? Please join the #kontributors channel in [our Slack chat](http://kotlinslackin.herokuapp.com/)
and let us know about your plans.
If you want to find some issues to start off with, try [this query](https://youtrack.jetbrains.com/issues/KT?q=tag:%20%7BUp%20For%20Grabs%7D%20%23Unresolved) which should find all Kotlin issues that marked as "up-for-grabs".
If you want to find some issues to start off with, try [this query](https://youtrack.jetbrains.com/issues?q=tag%3A+%7BUp+For+Grabs%7D+%23Unresolved) which should find all issues that marked as "up-for-grabs".
Currently only committers can assign issues to themselves so just add a comment if you're starting work on it.
A nice gentle way to contribute would be to review the [standard library docs](https://kotlinlang.org/api/latest/jvm/stdlib/index.html)
A nice gentle way to contribute would be to review the [standard library docs](http://kotlinlang.org/api/latest/jvm/stdlib/index.html)
and find classes or functions which are not documented very well and submit a patch.
In particular it'd be great if all functions included a nice example of how to use it such as for the
[`hashMapOf()`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/hash-map-of.html) function.
This is implemented using the [`@sample`](https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/collections/Maps.kt#L64)
macro to include code from a test function. The benefits of this approach are twofold; First, the API's documentation is improved via beneficial examples that help new users and second, the code coverage is increased.
<a href="http://kotlinlang.org/api/latest/jvm/stdlib/kotlin/hash-map-of.html">hashMapOf()</a> function.
This is implemented using the <a href=https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/collections/Maps.kt#L53">@sample</a>
macro to include code from a test function. This serves as a double win; the API gets better documented with nice examples to help new users and the code gets more test coverage.
Also the [JavaScript translation](https://github.com/JetBrains/kotlin/blob/master/js/ReadMe.md) could really use your help. See the [JavaScript contribution section](https://github.com/JetBrains/kotlin/blob/master/js/ReadMe.md) for more details.
@@ -165,8 +152,8 @@ Some of the code in the standard library is created by generating code from temp
## Submitting patches
The best way to submit a patch is to [fork the project on github](https://help.github.com/articles/fork-a-repo/) then send us a
[pull request](https://help.github.com/articles/creating-a-pull-request/) via [github](https://github.com).
The best way to submit a patch is to [fork the project on github](http://help.github.com/fork-a-repo/) then send us a
[pull request](http://help.github.com/send-pull-requests/) via [github](http://github.com).
If you create your own fork, it might help to enable rebase by default
when you pull by executing `git config --global pull.rebase
@@ -175,6 +162,6 @@ which will help keep your pull request simple and easy to apply.
## Commit comments
If you include in your comment this text (where KT-1234 is the Issue ID in the [Issue Tracker](https://youtrack.jetbrains.com/issues/KT), the issue will get automatically marked as fixed.
If you include in your comment this text (where KT-1234 is the Issue ID in the [Issue Tracker](http://youtrack.jetbrains.com/issues/KT), the issue will get automatically marked as fixed.
#KT-1234 Fixed

View File

@@ -11,14 +11,16 @@
<property name="plugin.xml" value="idea/src/META-INF/plugin.xml"/>
<property name="plugin.xml.bk" value="${version_substitute_dir}/plugin.xml.bk"/>
<property name="plugin.xml.versioned" value="${plugin.xml}.versioned"/>
<property name="plugin.xml.version.number" value="${build.number}"/>
<property name="compiler.version.java" value="core/util.runtime/src/org/jetbrains/kotlin/config/KotlinCompilerVersion.java"/>
<property name="compiler.version.java.bk" value="${version_substitute_dir}/KotlinCompilerVersion.java.bk"/>
<property name="compiler.version.java" value="compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/KotlinVersion.java"/>
<property name="compiler.version.java.bk" value="${version_substitute_dir}/KotlinVersion.java.bk"/>
<property name="compiler.version.java.versioned" value="${compiler.version.java}.versioned"/>
<property name="compiler.version.number" value="${build.number}"/>
<property name="plugin.zip" value="${artifact.output.path}/kotlin-plugin-${build.number}.zip"/>
<property name="bare.plugin.zip" value="${artifact.output.path}/kotlin-bare-plugin-${build.number}.zip"/>
<property name="kotlin.bare.plugin.xml" value="jps-plugin/bare-plugin/src/META-INF/plugin.xml"/>
<property name="kotlin.bare.plugin.xml.bk" value="${version_substitute_dir}/kotlin.bare.plugin.xml.bk"/>
<macrodef name="echoprop">
<attribute name="prop"/>
@@ -73,36 +75,37 @@
</sequential>
</macrodef>
<target name="writeCompilerVersionToTemplateFile">
<target name="writeVersionToTemplateFiles">
<mkdir dir="${version_substitute_dir}"/>
<substituteVersionInFile
target.file="${compiler.version.java}"
target.file.bk="${compiler.version.java.bk}"
target.file.versioned="${compiler.version.java.versioned}"
test.string="public static final String VERSION = &quot;@snapshot@&quot;;"
version="${compiler.version.number}"/>
</target>
<target name="writePluginVersionToTemplateFile">
<mkdir dir="${version_substitute_dir}"/>
target.file="${plugin.xml}"
target.file.bk="${plugin.xml.bk}"
target.file.versioned="${plugin.xml.versioned}"
test.string="&lt;version&gt;@snapshot@&lt;/version&gt;"/>
<substituteVersionInFile
target.file="${plugin.xml}"
target.file.bk="${plugin.xml.bk}"
target.file.versioned="${plugin.xml.versioned}"
test.string="&lt;version&gt;@snapshot@&lt;/version&gt;"
version="${plugin.xml.version.number}"/>
</target>
target.file="${compiler.version.java}"
target.file.bk="${compiler.version.java.bk}"
target.file.versioned="${compiler.version.java.versioned}"
test.string="public static final String VERSION = &quot;@snapshot@&quot;;"/>
<substituteVersionInFile
target.file="${kotlin.bare.plugin.xml}"
target.file.bk="${kotlin.bare.plugin.xml.bk}"
test.string="&lt;version&gt;@snapshot@&lt;/version&gt;"/>
</target>
<target name="revertTemplateFiles">
<copy file="${plugin.xml.bk}" tofile="${plugin.xml}" overwrite="true"/>
<copy file="${compiler.version.java.bk}" tofile="${compiler.version.java}" overwrite="true"/>
<copy file="${kotlin.bare.plugin.xml.bk}" tofile="${kotlin.bare.plugin.xml}" overwrite="true"/>
<delete dir="${version_substitute_dir}" quiet="true"/>
</target>
<target name="pre_build" depends="writeCompilerVersionToTemplateFile, writePluginVersionToTemplateFile, cleanupArtifacts"/>
<target name="pre_build" depends="writeVersionToTemplateFiles, cleanupArtifacts"/>
<target name="zipArtifacts">
<macrodef name="zipPlugin">
@@ -122,6 +125,7 @@
</macrodef>
<zipPlugin filename="${plugin.zip}" dir="Kotlin"/>
<zipPlugin filename="${bare.plugin.zip}" dir="BareKotlin"/>
</target>
<macrodef name="print-statistic">
@@ -145,13 +149,15 @@
</macrodef>
<target name="printStatistics">
<print-file-size-statistic path="${kotlin-home}/lib" file-name="kotlin-stdlib.jar"/>
<print-file-size-statistic path="${kotlin-home}/lib" file-name="kotlin-runtime.jar"/>
<print-file-size-statistic path="${kotlin-home}/lib" file-name="kotlin-reflect.jar"/>
<print-file-size-statistic path="${kotlin-home}/lib" file-name="kotlin-stdlib-js.jar"/>
<print-file-size-statistic path="${kotlin-home}/lib" file-name="kotlin-jslib.jar"/>
<print-file-size-statistic path="${js.stdlib.output.dir}" file-name="kotlin.js"/>
<print-file-size-statistic path="${js.stdlib.output.dir}" file-name="${compiled.stdlib.meta.js}"/>
<print-file-size-statistic path="${js.stdlib.output.dir}" file-name="${compiled.stdlib.js}"/>
<print-file-size-statistic path="${js.stdlib.output.dir}" file-name="builtins.js"/>
<print-file-size-statistic path="${js.stdlib.output.dir}" file-name="builtins.meta.js"/>
<print-file-size-statistic path="${js.stdlib.output.dir}" file-name="stdlib.js"/>
<print-file-size-statistic path="${js.stdlib.output.dir}" file-name="stdlib.meta.js"/>
</target>
<target name="post_build" depends="zipArtifacts, revertTemplateFiles, printStatistics, remove_internal_artifacts, dont_remove_internal_artifacts"/>
@@ -164,16 +170,14 @@
<condition property="need.remove.artifacts" value="true">
<and>
<matches pattern="rri?/.*" string="${teamcity.build.branch}"/>
<matches pattern="rr/.*" string="${teamcity.build.branch}"/>
<not>
<matches pattern="rri?/internal/.*" string="${teamcity.build.branch}"/>
<matches pattern="rr/internal/.*" string="${teamcity.build.branch}"/>
</not>
</and>
</condition>
<target name="remove_internal_artifacts"
description="Remove internal artifacts for rri?/* branches, but store them for rri?/internal/*"
if="need.remove.artifacts">
<target name="remove_internal_artifacts" description="Remove internal artifacts for rr/* branches, but store them for rr/internal/*" if="need.remove.artifacts">
<echo message="Remove internal artifacts" />
<delete failonerror="false" verbose="true">

View File

@@ -82,6 +82,13 @@
plugin.subdir="Kotlin"
substituted.version="${relay.substitute.version}"/>
<substitudeVersionInPlugin
plugin.jar.name="kotlin-bare-plugin"
plugin.path="${relay.plugins.dir}/kotlin-bare-plugin-${relay.origin.version}.zip"
origin.version="${relay.origin.version}"
plugin.subdir="BareKotlin"
substituted.version="${relay.substitute.version}"/>
<substitudeVersionInPlugin
plugin.jar.name="kotlin-android-extensions"
plugin.path="${relay.plugins.dir}/kotlin-android-extensions-plugin-${relay.origin.version}.zip"

View File

@@ -3,9 +3,10 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="RUNTIME" name="android-studio" level="project" />
<orderEntry type="module" module-name="idea" scope="PROVIDED" />
</component>
</module>
</module>

View File

@@ -22,12 +22,11 @@ import java.io.File
class Kotlin2JsTask : KotlinCompilerBaseTask() {
override val compilerFqName = "org.jetbrains.kotlin.cli.js.K2JSCompiler"
var libraries: Path? = null
var library: Path? = null
var outputPrefix: File? = null
var outputPostfix: File? = null
var sourceMap: Boolean = false
var metaInfo: Boolean = false
var moduleKind: String = "plain"
/**
* {@link K2JsArgumentConstants.CALL} (default) if need generate a main function call (main function will be auto detected)
@@ -35,9 +34,15 @@ class Kotlin2JsTask : KotlinCompilerBaseTask() {
*/
var main: String? = null
fun createLibraries(): Path {
val libraryPaths = libraries ?: return Path(getProject()).also { libraries = it }
return libraryPaths.createPath()
fun createLibrary(): Path {
val libraryPath = library
if (libraryPath == null) {
val t = Path(getProject())
library = t
return t
}
return libraryPath.createPath()
}
override fun fillSpecificArguments() {
@@ -45,9 +50,9 @@ class Kotlin2JsTask : KotlinCompilerBaseTask() {
args.add(output!!.canonicalPath)
// TODO: write test
libraries?.let {
args.add("-libraries")
args.add(it.list().joinToString(File.pathSeparator) { File(it).canonicalPath })
library?.let {
args.add("-library-files")
args.add(it.list().joinToString(separator = ",") { File(it).canonicalPath })
}
outputPrefix?.let {
@@ -68,7 +73,5 @@ class Kotlin2JsTask : KotlinCompilerBaseTask() {
if (noStdlib) args.add("-no-stdlib")
if (sourceMap) args.add("-source-map")
if (metaInfo) args.add("-meta-info")
args += listOf("-module-kind", moduleKind)
}
}

View File

@@ -26,8 +26,6 @@ class Kotlin2JvmTask : KotlinCompilerBaseTask() {
var includeRuntime: Boolean = true
var moduleName: String? = null
var noReflect: Boolean = false
private var compileClasspath: Path? = null
fun setClasspath(classpath: Path) {
@@ -70,7 +68,6 @@ class Kotlin2JvmTask : KotlinCompilerBaseTask() {
}
if (noStdlib) args.add("-no-stdlib")
if (noReflect) args.add("-no-reflect")
if (includeRuntime) args.add("-include-runtime")
}
}

View File

@@ -24,7 +24,7 @@ import java.io.File
import java.lang.ref.SoftReference
import java.net.JarURLConnection
internal object KotlinAntTaskUtil {
object KotlinAntTaskUtil {
private var classLoaderRef = SoftReference<ClassLoader?>(null)
private val libPath: File by lazy {
@@ -37,16 +37,19 @@ internal object KotlinAntTaskUtil {
antTaskJarPath.parentFile
}
val compilerJar: File by jar("kotlin-compiler.jar")
val runtimeJar: File by jar("kotlin-runtime.jar")
val reflectJar: File by jar("kotlin-reflect.jar")
val compilerJar: File by lazy {
File(libPath, "kotlin-compiler.jar").assertExists()
}
private fun jar(name: String) = lazy {
File(libPath, name).apply {
if (!exists()) {
throw IllegalStateException("File is not found in the directory of Kotlin Ant task: $name")
}
val runtimeJar: File by lazy {
File(libPath, "kotlin-runtime.jar").assertExists()
}
private fun File.assertExists(): File {
if (!this.exists()) {
throw IllegalStateException("${name} is not found in the directory of Kotlin Ant task")
}
return this
}
@Synchronized
@@ -62,7 +65,8 @@ internal object KotlinAntTaskUtil {
return classLoader
}
}
internal val Task.defaultModuleName: String?
get() = owningTarget?.name ?: project?.name
val Task.defaultModuleName: String?
get() = owningTarget?.name ?: project?.name

View File

@@ -31,7 +31,6 @@ class KotlinCompilerAdapter : Javac13() {
var additionalArguments: MutableList<Commandline.Argument> = ArrayList(0)
@Suppress("unused") // Used via reflection by Ant
fun createCompilerArg(): Commandline.Argument {
val argument = Commandline.Argument()
additionalArguments.add(argument)
@@ -95,22 +94,15 @@ class KotlinCompilerAdapter : Javac13() {
}
private fun addRuntimeToJavacClasspath(kotlinc: Kotlin2JvmTask) {
// If "-no-stdlib" (or "-no-reflect") was specified explicitly, probably the user also wanted the javac classpath to not have it
val addStdlib = "-no-stdlib" !in kotlinc.args
val addReflect = "-no-reflect" !in kotlinc.args
if (!addStdlib && !addReflect) return
for (arg in kotlinc.args) {
// If "-no-stdlib" was specified explicitly, probably the user also wanted the javac classpath to not have it
if ("-no-stdlib" == arg) return
}
if (compileClasspath == null) {
compileClasspath = Path(getProject())
}
if (addStdlib) {
compileClasspath.add(Path(getProject(), KotlinAntTaskUtil.runtimeJar.absolutePath))
}
// "-no-stdlib" implies "-no-reflect", see K2JVMCompiler.Companion.getClasspath
if (addReflect && addStdlib) {
compileClasspath.add(Path(getProject(), KotlinAntTaskUtil.reflectJar.absolutePath))
}
compileClasspath.add(Path(getProject(), KotlinAntTaskUtil.runtimeJar.absolutePath))
}
private fun checkAntVersion() {

View File

@@ -87,7 +87,7 @@ abstract class KotlinCompilerBaseTask : Task() {
val compiler = compilerClass.newInstance()
val exec = compilerClass.getMethod("execFullPathsInMessages", PrintStream::class.java, Array<String>::class.java)
log("Compiling ${src!!.list().toList()} => [${output!!.canonicalPath}]")
log("Compiling ${src!!.list().toList()} => [${output!!.canonicalPath}]");
val result = exec(compiler, System.err, args.toTypedArray())
exitCode = (result as Enum<*>).ordinal

View File

@@ -4,7 +4,6 @@
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
@@ -12,7 +11,7 @@
<orderEntry type="module" module-name="util.runtime" />
<orderEntry type="module" module-name="cli-common" />
<orderEntry type="module" module-name="util" />
<orderEntry type="module" module-name="tests-common" scope="TEST" />
<orderEntry type="module" module-name="compiler-tests" scope="TEST" />
<orderEntry type="library" scope="TEST" name="idea-full" level="project" />
</component>
</module>
</module>

View File

@@ -1,75 +0,0 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.build
import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments
import org.jetbrains.kotlin.config.ApiVersion
import org.jetbrains.kotlin.config.KotlinCompilerVersion
import org.jetbrains.kotlin.config.LanguageVersion
import org.jetbrains.kotlin.load.java.JvmBytecodeBinaryVersion
import org.jetbrains.kotlin.load.kotlin.JvmMetadataVersion
/**
* If you want to add a new field, check its type is supported by [serializeToPlainText], [deserializeFromPlainText]
*/
data class JvmBuildMetaInfo(
val isEAP: Boolean,
val compilerBuildVersion: String,
val languageVersionString: String,
val apiVersionString: String,
val coroutinesEnable: Boolean,
val coroutinesWarn: Boolean,
val coroutinesError: Boolean,
val multiplatformEnable: Boolean,
val metadataVersionMajor: Int,
val metadataVersionMinor: Int,
val metadataVersionPatch: Int,
val bytecodeVersionMajor: Int,
val bytecodeVersionMinor: Int,
val bytecodeVersionPatch: Int,
val ownVersion: Int = JvmBuildMetaInfo.OWN_VERSION,
val coroutinesVersion: Int = JvmBuildMetaInfo.COROUTINES_VERSION,
val multiplatformVersion: Int = JvmBuildMetaInfo.MULTIPLATFORM_VERSION
) {
companion object {
const val OWN_VERSION: Int = 0
const val COROUTINES_VERSION: Int = 0
const val MULTIPLATFORM_VERSION: Int = 0
fun serializeToString(info: JvmBuildMetaInfo): String =
serializeToPlainText(info)
fun deserializeFromString(str: String): JvmBuildMetaInfo? =
deserializeFromPlainText(str)
}
}
fun JvmBuildMetaInfo(args: CommonCompilerArguments): JvmBuildMetaInfo =
JvmBuildMetaInfo(isEAP = KotlinCompilerVersion.isPreRelease(),
compilerBuildVersion = KotlinCompilerVersion.VERSION,
languageVersionString = args.languageVersion ?: LanguageVersion.LATEST.versionString,
apiVersionString = args.apiVersion ?: ApiVersion.LATEST.versionString,
coroutinesEnable = args.coroutinesEnable,
coroutinesWarn = args.coroutinesWarn,
coroutinesError = args.coroutinesError,
multiplatformEnable = args.multiPlatform,
metadataVersionMajor = JvmMetadataVersion.INSTANCE.major,
metadataVersionMinor = JvmMetadataVersion.INSTANCE.minor,
metadataVersionPatch = JvmMetadataVersion.INSTANCE.patch,
bytecodeVersionMajor = JvmBytecodeBinaryVersion.INSTANCE.major,
bytecodeVersionMinor = JvmBytecodeBinaryVersion.INSTANCE.minor,
bytecodeVersionPatch = JvmBytecodeBinaryVersion.INSTANCE.patch)

View File

@@ -1,71 +0,0 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.build
import kotlin.reflect.KClass
import kotlin.reflect.full.memberProperties
import kotlin.reflect.full.primaryConstructor
inline fun <reified T : Any> serializeToPlainText(instance: T): String = serializeToPlainText(instance, T::class)
fun <T : Any> serializeToPlainText(instance: T, klass: KClass<T>): String {
val lines = ArrayList<String>()
for (property in klass.memberProperties) {
val value = property.get(instance)
if (value != null) {
lines.add("${property.name}=$value")
}
}
return lines.joinToString("\n")
}
inline fun <reified T : Any> deserializeFromPlainText(str: String): T? = deserializeFromPlainText(str, T::class)
fun <T : Any> deserializeFromPlainText(str: String, klass: KClass<T>): T? {
val args = ArrayList<Any?>()
val properties = str
.split("\n")
.filter(String::isNotBlank)
.associate { it.substringBefore("=") to it.substringAfter("=") }
val primaryConstructor = klass.primaryConstructor
?: throw IllegalStateException("${klass.java} does not have primary constructor")
for (param in primaryConstructor.parameters.sortedBy { it.index }) {
val argumentString = properties[param.name]
if (argumentString == null) {
if (param.type.isMarkedNullable) {
args.add(null)
continue
}
else {
return null
}
}
val argument: Any? = when (param.type.classifier) {
Int::class -> argumentString.toInt()
Boolean::class -> argumentString.toBoolean()
String::class -> argumentString
else -> throw IllegalStateException("Unexpected property type: ${param.type}")
}
args.add(argument)
}
return primaryConstructor.call(*args.toTypedArray())
}

View File

@@ -23,8 +23,8 @@ import org.jetbrains.kotlin.load.kotlin.JvmMetadataVersion
import java.io.File
private val NORMAL_VERSION = 8
private val EXPERIMENTAL_VERSION = 4
private val DATA_CONTAINER_VERSION = 2
private val EXPERIMENTAL_VERSION = 3
private val DATA_CONTAINER_VERSION = 1
private val NORMAL_VERSION_FILE_NAME = "format-version.txt"
private val EXPERIMENTAL_VERSION_FILE_NAME = "experimental-format-version.txt"
@@ -112,3 +112,15 @@ fun dataContainerCacheVersion(dataRoot: File): CacheVersion =
whenTurnedOn = CacheVersion.Action.REBUILD_ALL_KOTLIN,
whenTurnedOff = CacheVersion.Action.CLEAN_DATA_CONTAINER,
isEnabled = { IncrementalCompilation.isExperimental() })
fun allCachesVersions(containerDataRoot: File, dataRoots: Iterable<File>): Iterable<CacheVersion> {
val versions = arrayListOf<CacheVersion>()
versions.add(dataContainerCacheVersion(containerDataRoot))
for (dataRoot in dataRoots) {
versions.add(normalCacheVersion(dataRoot))
versions.add(experimentalCacheVersion(dataRoot))
}
return versions
}

View File

@@ -1,34 +0,0 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental
import org.jetbrains.kotlin.cli.common.ExitCode
import java.io.File
interface ICReporter {
fun report(message: ()->String)
// used in Gradle plugin
@Suppress("unused")
fun reportCompileIteration(sourceFiles: Collection<File>, exitCode: ExitCode) {}
fun pathsAsString(files: Iterable<File>): String =
files.map { it.canonicalPath }.joinToString()
fun pathsAsString(vararg files: File): String =
pathsAsString(files.toList())
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,17 +16,14 @@
package org.jetbrains.kotlin.incremental
import com.intellij.openapi.util.io.FileUtil
import com.google.protobuf.MessageLite
import com.intellij.openapi.util.io.FileUtil.toSystemIndependentName
import com.intellij.util.SmartList
import com.intellij.util.io.BooleanDataDescriptor
import com.intellij.util.io.EnumeratorStringDescriptor
import gnu.trove.THashSet
import org.jetbrains.annotations.TestOnly
import org.jetbrains.kotlin.build.GeneratedJvmClass
import org.jetbrains.kotlin.config.IncrementalCompilation
import org.jetbrains.kotlin.incremental.ChangeInfo.MembersChanged
import org.jetbrains.kotlin.incremental.ChangeInfo.Removed
import org.jetbrains.kotlin.incremental.storage.*
import org.jetbrains.kotlin.inline.inlineFunctionsJvmNames
import org.jetbrains.kotlin.load.kotlin.ModuleMapping
@@ -34,16 +31,13 @@ import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
import org.jetbrains.kotlin.load.kotlin.incremental.components.JvmPackagePartProto
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.protobuf.MessageLite
import org.jetbrains.kotlin.resolve.jvm.JvmClassName
import org.jetbrains.kotlin.serialization.Flags
import org.jetbrains.kotlin.serialization.ProtoBuf
import org.jetbrains.kotlin.serialization.deserialization.NameResolver
import org.jetbrains.kotlin.serialization.deserialization.TypeTable
import org.jetbrains.kotlin.serialization.deserialization.supertypes
import org.jetbrains.kotlin.serialization.jvm.BitEncoding
import org.jetbrains.kotlin.serialization.jvm.JvmProtoBufUtil
import org.jetbrains.kotlin.utils.singletonOrEmptyList
import org.jetbrains.org.objectweb.asm.*
import java.io.File
import java.security.MessageDigest
@@ -68,7 +62,6 @@ open class IncrementalCacheImpl<Target>(
private val SUBTYPES = "subtypes"
private val SUPERTYPES = "supertypes"
private val CLASS_FQ_NAME_TO_SOURCE = "class-fq-name-to-source"
private val INTERNAL_NAME_TO_SOURCE = "internal-name-to-source"
private val MODULE_MAPPING_FILE_NAME = "." + ModuleMapping.MAPPING_FILE_EXT
}
@@ -95,17 +88,16 @@ open class IncrementalCacheImpl<Target>(
private val subtypesMap = registerExperimentalMap(SubtypesMap(SUBTYPES.storageFile))
private val supertypesMap = registerExperimentalMap(SupertypesMap(SUPERTYPES.storageFile))
private val classFqNameToSourceMap = registerExperimentalMap(ClassFqNameToSourceMap(CLASS_FQ_NAME_TO_SOURCE.storageFile))
// todo: try to use internal names only?
private val internalNameToSource = registerExperimentalMap(InternalNameToSourcesMap(INTERNAL_NAME_TO_SOURCE.storageFile))
private val dependents = arrayListOf<IncrementalCacheImpl<Target>>()
private val outputDir by lazy(LazyThreadSafetyMode.NONE) { requireNotNull(targetOutputDir) { "Target is expected to have output directory: $target" } }
val thisWithDependentCaches: Iterable<IncrementalCacheImpl<Target>> by lazy {
val result = arrayListOf(this)
result.addAll(dependents)
result
}
// TODO: review
val dependentsWithThis: Sequence<IncrementalCacheImpl<Target>>
get() = sequenceOf(this).plus(dependents.asSequence())
internal val dependentCaches: Iterable<IncrementalCacheImpl<Target>>
get() = dependents
override fun registerInline(fromPath: String, jvmSignature: String, toPath: String) {
}
@@ -127,19 +119,10 @@ open class IncrementalCacheImpl<Target>(
}
}
// used in gradle
@Suppress("unused")
fun classesBySources(sources: Iterable<File>): Iterable<JvmClassName> =
sources.flatMap { sourceToClassesMap[it] }
fun getSubtypesOf(className: FqName): Sequence<FqName> =
subtypesMap[className].asSequence()
fun getSourceFileIfClass(fqName: FqName): File? =
classFqNameToSourceMap[fqName]
fun sourcesByInternalName(internalName: String): Collection<File> =
internalNameToSource[internalName]
fun getSourceFileIfClass(fqName: FqName): File? = classFqNameToSourceMap[fqName]
fun isMultifileFacade(className: JvmClassName): Boolean =
className.internalName in multifileFacadeToParts
@@ -156,7 +139,7 @@ open class IncrementalCacheImpl<Target>(
return CompilationResult.NO_CHANGES
}
open fun saveFileToCache(generatedClass: GeneratedJvmClass<Target>): CompilationResult {
fun saveFileToCache(generatedClass: GeneratedJvmClass<Target>): CompilationResult {
val sourceFiles: Collection<File> = generatedClass.sourceFiles
val kotlinClass: LocalFileKotlinClass = generatedClass.outputClass
val className = kotlinClass.className
@@ -166,10 +149,6 @@ open class IncrementalCacheImpl<Target>(
sourceToClassesMap.add(it, className)
}
if (IncrementalCompilation.isExperimental()) {
internalNameToSource[className.internalName] = sourceFiles
}
if (kotlinClass.classId.isLocal) {
return CompilationResult.NO_CHANGES
}
@@ -181,7 +160,7 @@ open class IncrementalCacheImpl<Target>(
packagePartMap.addPackagePart(className)
protoMap.process(kotlinClass, isPackage = true) +
constantsMap.process(kotlinClass, isPackage = true) +
constantsMap.process(kotlinClass) +
inlineFunctionsMap.process(kotlinClass, isPackage = true)
}
KotlinClassHeader.Kind.MULTIFILE_CLASS -> {
@@ -192,19 +171,12 @@ open class IncrementalCacheImpl<Target>(
// the class' proto wouldn't ever be deleted,
// because we don't write proto for multifile facades.
// As a workaround we can remove proto values for multifile facades.
val additionalChangeInfo = if (className in protoMap) {
val info = ChangeInfo.SignatureChanged(className.fqNameForClassNameWithoutDollars, areSubclassesAffected = true)
CompilationResult(protoChanged = true, changes = sequenceOf(info))
}
else CompilationResult.NO_CHANGES
protoMap.remove(className)
classFqNameToSourceMap.remove(className.fqNameForClassNameWithoutDollars)
internalNameToSource.remove(className.internalName)
// TODO NO_CHANGES? (delegates only)
constantsMap.process(kotlinClass, isPackage = true) +
inlineFunctionsMap.process(kotlinClass, isPackage = true) +
additionalChangeInfo
constantsMap.process(kotlinClass) +
inlineFunctionsMap.process(kotlinClass, isPackage = true)
}
KotlinClassHeader.Kind.MULTIFILE_CLASS_PART -> {
assert(sourceFiles.size == 1) { "Multifile class part from several source files: $sourceFiles" }
@@ -212,7 +184,7 @@ open class IncrementalCacheImpl<Target>(
partToMultifileFacade.set(className.internalName, header.multifileClassName!!)
protoMap.process(kotlinClass, isPackage = true) +
constantsMap.process(kotlinClass, isPackage = true) +
constantsMap.process(kotlinClass) +
inlineFunctionsMap.process(kotlinClass, isPackage = true)
}
KotlinClassHeader.Kind.CLASS -> {
@@ -220,7 +192,7 @@ open class IncrementalCacheImpl<Target>(
addToClassStorage(kotlinClass, sourceFiles.first())
protoMap.process(kotlinClass, isPackage = false) +
constantsMap.process(kotlinClass, isPackage = false) +
constantsMap.process(kotlinClass) +
inlineFunctionsMap.process(kotlinClass, isPackage = false)
}
else -> CompilationResult.NO_CHANGES
@@ -236,34 +208,32 @@ open class IncrementalCacheImpl<Target>(
debugLog("$className is changed: $this")
}
private fun computeChanges(className: JvmClassName, createChangeInfo: (FqName, Collection<String>) -> ChangeInfo): List<ChangeInfo> {
fun clearCacheForRemovedClasses(): CompilationResult {
fun <T> T.getNonPrivateNames(nameResolver: NameResolver, vararg members: T.() -> List<MessageLite>): Set<String> =
members.flatMap { this.it().filterNot { it.isPrivate }.names(nameResolver) }.toSet()
if (className.internalName == MODULE_MAPPING_FILE_NAME) return emptyList()
fun createChangeInfo(className: JvmClassName): ChangeInfo? {
if (className.internalName == MODULE_MAPPING_FILE_NAME) return null
val mapValue = protoMap[className] ?: return emptyList()
val mapValue = protoMap.get(className) ?: return null
return when {
mapValue.isPackageFacade -> {
val packageData = JvmProtoBufUtil.readPackageDataFrom(mapValue.bytes, mapValue.strings)
return when {
mapValue.isPackageFacade -> {
val packageData = JvmProtoBufUtil.readPackageDataFrom(mapValue.bytes, mapValue.strings)
val memberNames =
packageData.packageProto.getNonPrivateNames(
packageData.nameResolver,
ProtoBuf.Package::getFunctionList,
ProtoBuf.Package::getPropertyList
)
val memberNames =
packageData.packageProto.getNonPrivateNames(
packageData.nameResolver,
ProtoBuf.Package::getFunctionList,
ProtoBuf.Package::getPropertyList
)
listOf(createChangeInfo(className.packageFqName, memberNames))
}
else -> {
val classData = JvmProtoBufUtil.readClassDataFrom(mapValue.bytes, mapValue.strings)
ChangeInfo.Removed(className.packageFqName, memberNames)
}
else -> {
val classData = JvmProtoBufUtil.readClassDataFrom(mapValue.bytes, mapValue.strings)
val classFqName = className.fqNameForClassNameWithoutDollars
val kind = Flags.CLASS_KIND.get(classData.classProto.flags)
if (kind == ProtoBuf.Class.Kind.COMPANION_OBJECT) {
val memberNames =
classData.classProto.getNonPrivateNames(
classData.nameResolver,
@@ -272,19 +242,11 @@ open class IncrementalCacheImpl<Target>(
ProtoBuf.Class::getPropertyList
) + classData.classProto.enumEntryList.map { classData.nameResolver.getString(it.name) }
val companionObjectChanged = createChangeInfo(classFqName.parent(), classFqName.shortName().asString().singletonOrEmptyList())
val companionObjectMembersChanged = createChangeInfo(classFqName, memberNames)
listOf(companionObjectMembersChanged, companionObjectChanged)
}
else {
listOf(ChangeInfo.SignatureChanged(classFqName, areSubclassesAffected = true))
ChangeInfo.Removed(className.fqNameForClassNameWithoutDollars, memberNames)
}
}
}
}
fun clearCacheForRemovedClasses(): CompilationResult {
val dirtyClasses = dirtyOutputClassesMap
.getDirtyOutputClasses()
.map(JvmClassName::byInternalName)
@@ -292,7 +254,7 @@ open class IncrementalCacheImpl<Target>(
val changes =
if (IncrementalCompilation.isExperimental())
dirtyClasses.flatMap { computeChanges(it, ::Removed) }.asSequence()
dirtyClasses.mapNotNull { createChangeInfo(it) }.asSequence()
else
emptySequence<ChangeInfo>()
@@ -330,7 +292,6 @@ open class IncrementalCacheImpl<Target>(
partToMultifileFacade.remove(it)
constantsMap.remove(it)
inlineFunctionsMap.remove(it)
internalNameToSource.remove(it.internalName)
}
removeAllFromClassStorage(dirtyClasses)
@@ -342,7 +303,7 @@ open class IncrementalCacheImpl<Target>(
override fun getObsoletePackageParts(): Collection<String> {
val obsoletePackageParts =
dirtyOutputClassesMap.getDirtyOutputClasses().filter { packagePartMap.isPackagePart(JvmClassName.byInternalName(it)) }
debugLog("Obsolete package parts: $obsoletePackageParts")
debugLog("Obsolete package parts: ${obsoletePackageParts}")
return obsoletePackageParts
}
@@ -367,6 +328,10 @@ open class IncrementalCacheImpl<Target>(
return partNames.filter { !dirtyOutputClassesMap.isDirty(it) }
}
override fun getMultifileFacade(partInternalName: String): String? {
return partToMultifileFacade.get(partInternalName)
}
override fun getModuleMappingData(): ByteArray? {
return protoMap[JvmClassName.byInternalName(MODULE_MAPPING_FILE_NAME)]?.bytes
}
@@ -409,17 +374,7 @@ open class IncrementalCacheImpl<Target>(
storage[key] = data
}
if (!checkChangesIsOpenPart) return CompilationResult(protoChanged = true)
if (oldData == null) {
val changes =
if (IncrementalCompilation.isExperimental())
computeChanges(className, ::MembersChanged).asSequence()
else
emptySequence<ChangeInfo>()
return CompilationResult(protoChanged = true, changes = changes)
}
if (oldData == null || !checkChangesIsOpenPart) return CompilationResult(protoChanged = true)
val difference = difference(oldData, data)
val fqName = if (isPackage) className.packageFqName else className.fqNameForClassNameWithoutDollars
@@ -471,11 +426,11 @@ open class IncrementalCacheImpl<Target>(
operator fun contains(className: JvmClassName): Boolean =
className.internalName in storage
fun process(kotlinClass: LocalFileKotlinClass, isPackage: Boolean): CompilationResult {
return put(kotlinClass.className, getConstantsMap(kotlinClass.fileContents), isPackage)
fun process(kotlinClass: LocalFileKotlinClass): CompilationResult {
return put(kotlinClass.className, getConstantsMap(kotlinClass.fileContents))
}
private fun put(className: JvmClassName, constantsMap: Map<String, Any>?, isPackage: Boolean): CompilationResult {
private fun put(className: JvmClassName, constantsMap: Map<String, Any>?): CompilationResult {
val key = className.internalName
val oldMap = storage[key]
@@ -485,30 +440,14 @@ open class IncrementalCacheImpl<Target>(
storage[key] = constantsMap
}
else {
remove(className)
storage.remove(key)
}
val changes =
if (!IncrementalCompilation.isExperimental() ||
constantsMap == null || constantsMap.isEmpty() ||
oldMap == null || oldMap.isEmpty()
) {
emptySequence<ChangeInfo>()
}
else {
// we need only changed constants everything other should be covered by diff
val changedNames = oldMap.filter { constantsMap.containsKey(it.key) && constantsMap[it.key] != it.value }.map { it.key }
val fqName = if (isPackage) className.packageFqName else className.fqNameForClassNameWithoutDollars
sequenceOf(ChangeInfo.MembersChanged(fqName, changedNames))
}
return CompilationResult(constantsChanged = true, changes = changes)
return CompilationResult(constantsChanged = true)
}
fun remove(className: JvmClassName) {
storage.remove(className.internalName)
put(className, null)
}
override fun dumpValue(value: Map<String, Any>): String =
@@ -596,23 +535,6 @@ open class IncrementalCacheImpl<Target>(
override fun dumpValue(value: String) = value
}
inner class InternalNameToSourcesMap(storageFile: File) : BasicStringMap<Collection<String>>(storageFile, EnumeratorStringDescriptor(), PathCollectionExternalizer) {
operator fun set(internalName: String, sourceFiles: Iterable<File>) {
storage[internalName] = sourceFiles.map { it.canonicalPath }
}
operator fun get(internalName: String): Collection<File> =
(storage[internalName] ?: emptyList()).map(::File)
fun remove(internalName: String) {
storage.remove(internalName)
}
override fun dumpValue(value: Collection<String>): String =
value.dumpCollection()
}
private fun addToClassStorage(kotlinClass: LocalFileKotlinClass, srcFile: File) {
if (!IncrementalCompilation.isExperimental()) return
@@ -637,7 +559,7 @@ open class IncrementalCacheImpl<Target>(
val removedFqNames = removedClasses.map { it.fqNameForClassNameWithoutDollars }.toSet()
for (cache in thisWithDependentCaches) {
for (cache in dependentsWithThis) {
val parentsFqNames = hashSetOf<FqName>()
val childrenFqNames = hashSetOf<FqName>()
@@ -680,12 +602,12 @@ open class IncrementalCacheImpl<Target>(
}
private inner class InlineFunctionsMap(storageFile: File) : BasicStringMap<Map<String, Long>>(storageFile, StringToLongMapExternalizer) {
private fun getInlineFunctionsMap(header: KotlinClassHeader, bytes: ByteArray): Map<String, Long> {
val inlineFunctions = inlineFunctionsJvmNames(header)
if (inlineFunctions.isEmpty()) return emptyMap()
private fun getInlineFunctionsMap(bytes: ByteArray): Map<String, Long> {
val result = HashMap<String, Long>()
val inlineFunctions = inlineFunctionsJvmNames(bytes)
if (inlineFunctions.isEmpty()) return emptyMap()
ClassReader(bytes).accept(object : ClassVisitor(Opcodes.ASM5) {
override fun visitMethod(access: Int, name: String, desc: String, signature: String?, exceptions: Array<out String>?): MethodVisitor? {
val dummyClassWriter = ClassWriter(Opcodes.ASM5)
@@ -708,7 +630,7 @@ open class IncrementalCacheImpl<Target>(
}
fun process(kotlinClass: LocalFileKotlinClass, isPackage: Boolean): CompilationResult {
return put(kotlinClass.className, getInlineFunctionsMap(kotlinClass.classHeader, kotlinClass.fileContents), isPackage)
return put(kotlinClass.className, getInlineFunctionsMap(kotlinClass.fileContents), isPackage)
}
private fun put(className: JvmClassName, newMap: Map<String, Long>, isPackage: Boolean): CompilationResult {
@@ -765,8 +687,6 @@ open class IncrementalCacheImpl<Target>(
}
}
private object PathCollectionExternalizer : CollectionExternalizer<String>(PathStringDescriptor, { THashSet(FileUtil.PATH_HASHING_STRATEGY) })
sealed class ChangeInfo(val fqName: FqName) {
open class MembersChanged(fqName: FqName, val names: Collection<String>) : ChangeInfo(fqName) {
override fun toStringProperties(): String = super.toStringProperties() + ", names = $names"

View File

@@ -26,25 +26,23 @@ class LocalFileKotlinClass private constructor(
private val file: File,
private val fileContents: ByteArray,
className: ClassId,
classVersion: Int,
classHeader: KotlinClassHeader,
innerClasses: InnerClassesInfo
) : FileBasedKotlinClass(className, classVersion, classHeader, innerClasses) {
innerClasses: FileBasedKotlinClass.InnerClassesInfo
) : FileBasedKotlinClass(className, classHeader, innerClasses) {
companion object {
fun create(file: File): LocalFileKotlinClass? {
val fileContents = file.readBytes()
return FileBasedKotlinClass.create(fileContents) {
className, classVersion, classHeader, innerClasses ->
LocalFileKotlinClass(file, fileContents, className, classVersion, classHeader, innerClasses)
className, classHeader, innerClasses ->
LocalFileKotlinClass(file, fileContents, className, classHeader, innerClasses)
}
}
}
val className: JvmClassName by lazy { JvmClassName.byClassId(classId) }
override val location: String
get() = file.absolutePath
override fun getLocation(): String = file.absolutePath
public override fun getFileContents(): ByteArray = fileContents

View File

@@ -171,7 +171,7 @@ open class LookupStorage(private val targetDataDir: File) : BasicMapsOwner() {
flush(false)
}
@TestOnly fun dump(lookupSymbols: Set<LookupSymbol>, basePath: File? = null): String {
@TestOnly fun dump(lookupSymbols: Set<LookupSymbol>): String {
flush(false)
val sb = StringBuilder()
@@ -188,7 +188,7 @@ open class LookupStorage(private val targetDataDir: File) : BasicMapsOwner() {
lookup.toString()
}
val value = fileIds.map { idToFile[it]?.let { if (basePath == null) it.absolutePath else it.toRelativeString(basePath) } ?: it.toString() }.sorted().joinToString(", ")
val value = fileIds.map { idToFile[it]?.absolutePath ?: it.toString() }.sorted().joinToString(", ")
p.println("$key -> $value")
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,18 +39,11 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
if (!checkEqualsPackageProperty(old, new)) return false
if (!checkEqualsPackageTypeAlias(old, new)) return false
if (old.hasTypeTable() != new.hasTypeTable()) return false
if (old.hasTypeTable()) {
if (!checkEquals(old.typeTable, new.typeTable)) return false
}
if (old.hasSinceKotlinInfoTable() != new.hasSinceKotlinInfoTable()) return false
if (old.hasSinceKotlinInfoTable()) {
if (!checkEquals(old.sinceKotlinInfoTable, new.sinceKotlinInfoTable)) return false
}
if (old.hasExtension(JvmProtoBuf.packageModuleName) != new.hasExtension(JvmProtoBuf.packageModuleName)) return false
if (old.hasExtension(JvmProtoBuf.packageModuleName)) {
if (!checkStringEquals(old.getExtension(JvmProtoBuf.packageModuleName), new.getExtension(JvmProtoBuf.packageModuleName))) return false
@@ -61,9 +54,7 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
enum class ProtoBufPackageKind {
FUNCTION_LIST,
PROPERTY_LIST,
TYPE_ALIAS_LIST,
TYPE_TABLE,
SINCE_KOTLIN_INFO_TABLE,
PACKAGE_MODULE_NAME
}
@@ -74,18 +65,11 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
if (!checkEqualsPackageProperty(old, new)) result.add(ProtoBufPackageKind.PROPERTY_LIST)
if (!checkEqualsPackageTypeAlias(old, new)) result.add(ProtoBufPackageKind.TYPE_ALIAS_LIST)
if (old.hasTypeTable() != new.hasTypeTable()) result.add(ProtoBufPackageKind.TYPE_TABLE)
if (old.hasTypeTable()) {
if (!checkEquals(old.typeTable, new.typeTable)) result.add(ProtoBufPackageKind.TYPE_TABLE)
}
if (old.hasSinceKotlinInfoTable() != new.hasSinceKotlinInfoTable()) result.add(ProtoBufPackageKind.SINCE_KOTLIN_INFO_TABLE)
if (old.hasSinceKotlinInfoTable()) {
if (!checkEquals(old.sinceKotlinInfoTable, new.sinceKotlinInfoTable)) result.add(ProtoBufPackageKind.SINCE_KOTLIN_INFO_TABLE)
}
if (old.hasExtension(JvmProtoBuf.packageModuleName) != new.hasExtension(JvmProtoBuf.packageModuleName)) result.add(ProtoBufPackageKind.PACKAGE_MODULE_NAME)
if (old.hasExtension(JvmProtoBuf.packageModuleName)) {
if (!checkStringEquals(old.getExtension(JvmProtoBuf.packageModuleName), new.getExtension(JvmProtoBuf.packageModuleName))) result.add(ProtoBufPackageKind.PACKAGE_MODULE_NAME)
@@ -121,27 +105,13 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
if (!checkEqualsClassProperty(old, new)) return false
if (!checkEqualsClassTypeAlias(old, new)) return false
if (!checkEqualsClassEnumEntry(old, new)) return false
if (!checkEqualsClassSealedSubclassFqName(old, new)) return false
if (old.hasTypeTable() != new.hasTypeTable()) return false
if (old.hasTypeTable()) {
if (!checkEquals(old.typeTable, new.typeTable)) return false
}
if (old.hasSinceKotlinInfo() != new.hasSinceKotlinInfo()) return false
if (old.hasSinceKotlinInfo()) {
if (old.sinceKotlinInfo != new.sinceKotlinInfo) return false
}
if (old.hasSinceKotlinInfoTable() != new.hasSinceKotlinInfoTable()) return false
if (old.hasSinceKotlinInfoTable()) {
if (!checkEquals(old.sinceKotlinInfoTable, new.sinceKotlinInfoTable)) return false
}
if (old.hasExtension(JvmProtoBuf.classModuleName) != new.hasExtension(JvmProtoBuf.classModuleName)) return false
if (old.hasExtension(JvmProtoBuf.classModuleName)) {
if (!checkStringEquals(old.getExtension(JvmProtoBuf.classModuleName), new.getExtension(JvmProtoBuf.classModuleName))) return false
@@ -160,12 +130,8 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
CONSTRUCTOR_LIST,
FUNCTION_LIST,
PROPERTY_LIST,
TYPE_ALIAS_LIST,
ENUM_ENTRY_LIST,
SEALED_SUBCLASS_FQ_NAME_LIST,
TYPE_TABLE,
SINCE_KOTLIN_INFO,
SINCE_KOTLIN_INFO_TABLE,
CLASS_MODULE_NAME
}
@@ -198,27 +164,13 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
if (!checkEqualsClassProperty(old, new)) result.add(ProtoBufClassKind.PROPERTY_LIST)
if (!checkEqualsClassTypeAlias(old, new)) result.add(ProtoBufClassKind.TYPE_ALIAS_LIST)
if (!checkEqualsClassEnumEntry(old, new)) result.add(ProtoBufClassKind.ENUM_ENTRY_LIST)
if (!checkEqualsClassSealedSubclassFqName(old, new)) result.add(ProtoBufClassKind.SEALED_SUBCLASS_FQ_NAME_LIST)
if (old.hasTypeTable() != new.hasTypeTable()) result.add(ProtoBufClassKind.TYPE_TABLE)
if (old.hasTypeTable()) {
if (!checkEquals(old.typeTable, new.typeTable)) result.add(ProtoBufClassKind.TYPE_TABLE)
}
if (old.hasSinceKotlinInfo() != new.hasSinceKotlinInfo()) result.add(ProtoBufClassKind.SINCE_KOTLIN_INFO)
if (old.hasSinceKotlinInfo()) {
if (old.sinceKotlinInfo != new.sinceKotlinInfo) result.add(ProtoBufClassKind.SINCE_KOTLIN_INFO)
}
if (old.hasSinceKotlinInfoTable() != new.hasSinceKotlinInfoTable()) result.add(ProtoBufClassKind.SINCE_KOTLIN_INFO_TABLE)
if (old.hasSinceKotlinInfoTable()) {
if (!checkEquals(old.sinceKotlinInfoTable, new.sinceKotlinInfoTable)) result.add(ProtoBufClassKind.SINCE_KOTLIN_INFO_TABLE)
}
if (old.hasExtension(JvmProtoBuf.classModuleName) != new.hasExtension(JvmProtoBuf.classModuleName)) result.add(ProtoBufClassKind.CLASS_MODULE_NAME)
if (old.hasExtension(JvmProtoBuf.classModuleName)) {
if (!checkStringEquals(old.getExtension(JvmProtoBuf.classModuleName), new.getExtension(JvmProtoBuf.classModuleName))) result.add(ProtoBufClassKind.CLASS_MODULE_NAME)
@@ -269,11 +221,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
if (!checkEquals(old.typeTable, new.typeTable)) return false
}
if (old.hasSinceKotlinInfo() != new.hasSinceKotlinInfo()) return false
if (old.hasSinceKotlinInfo()) {
if (old.sinceKotlinInfo != new.sinceKotlinInfo) return false
}
if (old.hasExtension(JvmProtoBuf.methodSignature) != new.hasExtension(JvmProtoBuf.methodSignature)) return false
if (old.hasExtension(JvmProtoBuf.methodSignature)) {
if (!checkEquals(old.getExtension(JvmProtoBuf.methodSignature), new.getExtension(JvmProtoBuf.methodSignature))) return false
@@ -332,11 +279,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
if (old.setterFlags != new.setterFlags) return false
}
if (old.hasSinceKotlinInfo() != new.hasSinceKotlinInfo()) return false
if (old.hasSinceKotlinInfo()) {
if (old.sinceKotlinInfo != new.sinceKotlinInfo) return false
}
if (old.hasExtension(JvmProtoBuf.propertySignature) != new.hasExtension(JvmProtoBuf.propertySignature)) return false
if (old.hasExtension(JvmProtoBuf.propertySignature)) {
if (!checkEquals(old.getExtension(JvmProtoBuf.propertySignature), new.getExtension(JvmProtoBuf.propertySignature))) return false
@@ -345,46 +287,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
return true
}
open fun checkEquals(old: ProtoBuf.TypeAlias, new: ProtoBuf.TypeAlias): Boolean {
if (old.hasFlags() != new.hasFlags()) return false
if (old.hasFlags()) {
if (old.flags != new.flags) return false
}
if (!checkStringEquals(old.name, new.name)) return false
if (!checkEqualsTypeAliasTypeParameter(old, new)) return false
if (old.hasUnderlyingType() != new.hasUnderlyingType()) return false
if (old.hasUnderlyingType()) {
if (!checkEquals(old.underlyingType, new.underlyingType)) return false
}
if (old.hasUnderlyingTypeId() != new.hasUnderlyingTypeId()) return false
if (old.hasUnderlyingTypeId()) {
if (old.underlyingTypeId != new.underlyingTypeId) return false
}
if (old.hasExpandedType() != new.hasExpandedType()) return false
if (old.hasExpandedType()) {
if (!checkEquals(old.expandedType, new.expandedType)) return false
}
if (old.hasExpandedTypeId() != new.hasExpandedTypeId()) return false
if (old.hasExpandedTypeId()) {
if (old.expandedTypeId != new.expandedTypeId) return false
}
if (!checkEqualsTypeAliasAnnotation(old, new)) return false
if (old.hasSinceKotlinInfo() != new.hasSinceKotlinInfo()) return false
if (old.hasSinceKotlinInfo()) {
if (old.sinceKotlinInfo != new.sinceKotlinInfo) return false
}
return true
}
open fun checkEquals(old: ProtoBuf.TypeTable, new: ProtoBuf.TypeTable): Boolean {
if (!checkEqualsTypeTableType(old, new)) return false
@@ -396,12 +298,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
return true
}
open fun checkEquals(old: ProtoBuf.SinceKotlinInfoTable, new: ProtoBuf.SinceKotlinInfoTable): Boolean {
if (!checkEqualsSinceKotlinInfoTableInfo(old, new)) return false
return true
}
open fun checkEquals(old: ProtoBuf.TypeParameter, new: ProtoBuf.TypeParameter): Boolean {
if (old.id != new.id) return false
@@ -468,11 +364,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
if (!checkStringEquals(old.typeParameterName, new.typeParameterName)) return false
}
if (old.hasTypeAliasName() != new.hasTypeAliasName()) return false
if (old.hasTypeAliasName()) {
if (!checkClassIdEquals(old.typeAliasName, new.typeAliasName)) return false
}
if (old.hasOuterType() != new.hasOuterType()) return false
if (old.hasOuterType()) {
if (!checkEquals(old.outerType, new.outerType)) return false
@@ -483,21 +374,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
if (old.outerTypeId != new.outerTypeId) return false
}
if (old.hasAbbreviatedType() != new.hasAbbreviatedType()) return false
if (old.hasAbbreviatedType()) {
if (!checkEquals(old.abbreviatedType, new.abbreviatedType)) return false
}
if (old.hasAbbreviatedTypeId() != new.hasAbbreviatedTypeId()) return false
if (old.hasAbbreviatedTypeId()) {
if (old.abbreviatedTypeId != new.abbreviatedTypeId) return false
}
if (old.hasFlags() != new.hasFlags()) return false
if (old.hasFlags()) {
if (old.flags != new.flags) return false
}
if (old.getExtensionCount(JvmProtoBuf.typeAnnotation) != new.getExtensionCount(JvmProtoBuf.typeAnnotation)) return false
for(i in 0..old.getExtensionCount(JvmProtoBuf.typeAnnotation) - 1) {
@@ -520,11 +396,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
if (!checkEqualsConstructorValueParameter(old, new)) return false
if (old.hasSinceKotlinInfo() != new.hasSinceKotlinInfo()) return false
if (old.hasSinceKotlinInfo()) {
if (old.sinceKotlinInfo != new.sinceKotlinInfo) return false
}
if (old.hasExtension(JvmProtoBuf.constructorSignature) != new.hasExtension(JvmProtoBuf.constructorSignature)) return false
if (old.hasExtension(JvmProtoBuf.constructorSignature)) {
if (!checkEquals(old.getExtension(JvmProtoBuf.constructorSignature), new.getExtension(JvmProtoBuf.constructorSignature))) return false
@@ -619,35 +490,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
return true
}
open fun checkEquals(old: ProtoBuf.SinceKotlinInfo, new: ProtoBuf.SinceKotlinInfo): Boolean {
if (old.hasVersion() != new.hasVersion()) return false
if (old.hasVersion()) {
if (old.version != new.version) return false
}
if (old.hasVersionFull() != new.hasVersionFull()) return false
if (old.hasVersionFull()) {
if (old.versionFull != new.versionFull) return false
}
if (old.hasLevel() != new.hasLevel()) return false
if (old.hasLevel()) {
if (old.level != new.level) return false
}
if (old.hasErrorCode() != new.hasErrorCode()) return false
if (old.hasErrorCode()) {
if (old.errorCode != new.errorCode) return false
}
if (old.hasMessage() != new.hasMessage()) return false
if (old.hasMessage()) {
if (!checkStringEquals(old.message, new.message)) return false
}
return true
}
open fun checkEquals(old: ProtoBuf.Type.Argument, new: ProtoBuf.Type.Argument): Boolean {
if (old.hasProjection() != new.hasProjection()) return false
if (old.hasProjection()) {
@@ -755,16 +597,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
return true
}
open fun checkEqualsPackageTypeAlias(old: ProtoBuf.Package, new: ProtoBuf.Package): Boolean {
if (old.typeAliasCount != new.typeAliasCount) return false
for(i in 0..old.typeAliasCount - 1) {
if (!checkEquals(old.getTypeAlias(i), new.getTypeAlias(i))) return false
}
return true
}
open fun checkEqualsClassTypeParameter(old: ProtoBuf.Class, new: ProtoBuf.Class): Boolean {
if (old.typeParameterCount != new.typeParameterCount) return false
@@ -835,16 +667,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
return true
}
open fun checkEqualsClassTypeAlias(old: ProtoBuf.Class, new: ProtoBuf.Class): Boolean {
if (old.typeAliasCount != new.typeAliasCount) return false
for(i in 0..old.typeAliasCount - 1) {
if (!checkEquals(old.getTypeAlias(i), new.getTypeAlias(i))) return false
}
return true
}
open fun checkEqualsClassEnumEntry(old: ProtoBuf.Class, new: ProtoBuf.Class): Boolean {
if (old.enumEntryCount != new.enumEntryCount) return false
@@ -855,16 +677,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
return true
}
open fun checkEqualsClassSealedSubclassFqName(old: ProtoBuf.Class, new: ProtoBuf.Class): Boolean {
if (old.sealedSubclassFqNameCount != new.sealedSubclassFqNameCount) return false
for(i in 0..old.sealedSubclassFqNameCount - 1) {
if (!checkClassIdEquals(old.getSealedSubclassFqName(i), new.getSealedSubclassFqName(i))) return false
}
return true
}
open fun checkEqualsFunctionTypeParameter(old: ProtoBuf.Function, new: ProtoBuf.Function): Boolean {
if (old.typeParameterCount != new.typeParameterCount) return false
@@ -895,26 +707,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
return true
}
open fun checkEqualsTypeAliasTypeParameter(old: ProtoBuf.TypeAlias, new: ProtoBuf.TypeAlias): Boolean {
if (old.typeParameterCount != new.typeParameterCount) return false
for(i in 0..old.typeParameterCount - 1) {
if (!checkEquals(old.getTypeParameter(i), new.getTypeParameter(i))) return false
}
return true
}
open fun checkEqualsTypeAliasAnnotation(old: ProtoBuf.TypeAlias, new: ProtoBuf.TypeAlias): Boolean {
if (old.annotationCount != new.annotationCount) return false
for(i in 0..old.annotationCount - 1) {
if (!checkEquals(old.getAnnotation(i), new.getAnnotation(i))) return false
}
return true
}
open fun checkEqualsTypeTableType(old: ProtoBuf.TypeTable, new: ProtoBuf.TypeTable): Boolean {
if (old.typeCount != new.typeCount) return false
@@ -925,16 +717,6 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
return true
}
open fun checkEqualsSinceKotlinInfoTableInfo(old: ProtoBuf.SinceKotlinInfoTable, new: ProtoBuf.SinceKotlinInfoTable): Boolean {
if (old.infoCount != new.infoCount) return false
for(i in 0..old.infoCount - 1) {
if (!checkEquals(old.getInfo(i), new.getInfo(i))) return false
}
return true
}
open fun checkEqualsTypeParameterUpperBound(old: ProtoBuf.TypeParameter, new: ProtoBuf.TypeParameter): Boolean {
if (old.upperBoundCount != new.upperBoundCount) return false
@@ -1037,18 +819,10 @@ fun ProtoBuf.Package.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int)
hashCode = 31 * hashCode + getProperty(i).hashCode(stringIndexes, fqNameIndexes)
}
for(i in 0..typeAliasCount - 1) {
hashCode = 31 * hashCode + getTypeAlias(i).hashCode(stringIndexes, fqNameIndexes)
}
if (hasTypeTable()) {
hashCode = 31 * hashCode + typeTable.hashCode(stringIndexes, fqNameIndexes)
}
if (hasSinceKotlinInfoTable()) {
hashCode = 31 * hashCode + sinceKotlinInfoTable.hashCode(stringIndexes, fqNameIndexes)
}
if (hasExtension(JvmProtoBuf.packageModuleName)) {
hashCode = 31 * hashCode + stringIndexes(getExtension(JvmProtoBuf.packageModuleName))
}
@@ -1097,30 +871,14 @@ fun ProtoBuf.Class.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) ->
hashCode = 31 * hashCode + getProperty(i).hashCode(stringIndexes, fqNameIndexes)
}
for(i in 0..typeAliasCount - 1) {
hashCode = 31 * hashCode + getTypeAlias(i).hashCode(stringIndexes, fqNameIndexes)
}
for(i in 0..enumEntryCount - 1) {
hashCode = 31 * hashCode + getEnumEntry(i).hashCode(stringIndexes, fqNameIndexes)
}
for(i in 0..sealedSubclassFqNameCount - 1) {
hashCode = 31 * hashCode + fqNameIndexes(getSealedSubclassFqName(i))
}
if (hasTypeTable()) {
hashCode = 31 * hashCode + typeTable.hashCode(stringIndexes, fqNameIndexes)
}
if (hasSinceKotlinInfo()) {
hashCode = 31 * hashCode + sinceKotlinInfo
}
if (hasSinceKotlinInfoTable()) {
hashCode = 31 * hashCode + sinceKotlinInfoTable.hashCode(stringIndexes, fqNameIndexes)
}
if (hasExtension(JvmProtoBuf.classModuleName)) {
hashCode = 31 * hashCode + stringIndexes(getExtension(JvmProtoBuf.classModuleName))
}
@@ -1169,10 +927,6 @@ fun ProtoBuf.Function.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int)
hashCode = 31 * hashCode + typeTable.hashCode(stringIndexes, fqNameIndexes)
}
if (hasSinceKotlinInfo()) {
hashCode = 31 * hashCode + sinceKotlinInfo
}
if (hasExtension(JvmProtoBuf.methodSignature)) {
hashCode = 31 * hashCode + getExtension(JvmProtoBuf.methodSignature).hashCode(stringIndexes, fqNameIndexes)
}
@@ -1225,10 +979,6 @@ fun ProtoBuf.Property.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int)
hashCode = 31 * hashCode + setterFlags
}
if (hasSinceKotlinInfo()) {
hashCode = 31 * hashCode + sinceKotlinInfo
}
if (hasExtension(JvmProtoBuf.propertySignature)) {
hashCode = 31 * hashCode + getExtension(JvmProtoBuf.propertySignature).hashCode(stringIndexes, fqNameIndexes)
}
@@ -1236,46 +986,6 @@ fun ProtoBuf.Property.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int)
return hashCode
}
fun ProtoBuf.TypeAlias.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int {
var hashCode = 1
if (hasFlags()) {
hashCode = 31 * hashCode + flags
}
hashCode = 31 * hashCode + stringIndexes(name)
for(i in 0..typeParameterCount - 1) {
hashCode = 31 * hashCode + getTypeParameter(i).hashCode(stringIndexes, fqNameIndexes)
}
if (hasUnderlyingType()) {
hashCode = 31 * hashCode + underlyingType.hashCode(stringIndexes, fqNameIndexes)
}
if (hasUnderlyingTypeId()) {
hashCode = 31 * hashCode + underlyingTypeId
}
if (hasExpandedType()) {
hashCode = 31 * hashCode + expandedType.hashCode(stringIndexes, fqNameIndexes)
}
if (hasExpandedTypeId()) {
hashCode = 31 * hashCode + expandedTypeId
}
for(i in 0..annotationCount - 1) {
hashCode = 31 * hashCode + getAnnotation(i).hashCode(stringIndexes, fqNameIndexes)
}
if (hasSinceKotlinInfo()) {
hashCode = 31 * hashCode + sinceKotlinInfo
}
return hashCode
}
fun ProtoBuf.TypeTable.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int {
var hashCode = 1
@@ -1290,16 +1000,6 @@ fun ProtoBuf.TypeTable.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int
return hashCode
}
fun ProtoBuf.SinceKotlinInfoTable.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int {
var hashCode = 1
for(i in 0..infoCount - 1) {
hashCode = 31 * hashCode + getInfo(i).hashCode(stringIndexes, fqNameIndexes)
}
return hashCode
}
fun ProtoBuf.TypeParameter.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int {
var hashCode = 1
@@ -1365,10 +1065,6 @@ fun ProtoBuf.Type.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) ->
hashCode = 31 * hashCode + stringIndexes(typeParameterName)
}
if (hasTypeAliasName()) {
hashCode = 31 * hashCode + fqNameIndexes(typeAliasName)
}
if (hasOuterType()) {
hashCode = 31 * hashCode + outerType.hashCode(stringIndexes, fqNameIndexes)
}
@@ -1377,18 +1073,6 @@ fun ProtoBuf.Type.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) ->
hashCode = 31 * hashCode + outerTypeId
}
if (hasAbbreviatedType()) {
hashCode = 31 * hashCode + abbreviatedType.hashCode(stringIndexes, fqNameIndexes)
}
if (hasAbbreviatedTypeId()) {
hashCode = 31 * hashCode + abbreviatedTypeId
}
if (hasFlags()) {
hashCode = 31 * hashCode + flags
}
for(i in 0..getExtensionCount(JvmProtoBuf.typeAnnotation) - 1) {
hashCode = 31 * hashCode + getExtension(JvmProtoBuf.typeAnnotation, i).hashCode(stringIndexes, fqNameIndexes)
}
@@ -1411,10 +1095,6 @@ fun ProtoBuf.Constructor.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (I
hashCode = 31 * hashCode + getValueParameter(i).hashCode(stringIndexes, fqNameIndexes)
}
if (hasSinceKotlinInfo()) {
hashCode = 31 * hashCode + sinceKotlinInfo
}
if (hasExtension(JvmProtoBuf.constructorSignature)) {
hashCode = 31 * hashCode + getExtension(JvmProtoBuf.constructorSignature).hashCode(stringIndexes, fqNameIndexes)
}
@@ -1508,32 +1188,6 @@ fun ProtoBuf.Annotation.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (In
return hashCode
}
fun ProtoBuf.SinceKotlinInfo.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int {
var hashCode = 1
if (hasVersion()) {
hashCode = 31 * hashCode + version
}
if (hasVersionFull()) {
hashCode = 31 * hashCode + versionFull
}
if (hasLevel()) {
hashCode = 31 * hashCode + level.hashCode()
}
if (hasErrorCode()) {
hashCode = 31 * hashCode + errorCode
}
if (hasMessage()) {
hashCode = 31 * hashCode + stringIndexes(message)
}
return hashCode
}
fun ProtoBuf.Type.Argument.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int {
var hashCode = 1

View File

@@ -1,281 +0,0 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// these functions are used in the kotlin gradle plugin
@file:Suppress("unused")
package org.jetbrains.kotlin.incremental
import com.intellij.ide.highlighter.JavaFileType
import com.intellij.openapi.util.io.FileUtil
import com.intellij.openapi.util.text.StringUtil
import org.jetbrains.kotlin.build.GeneratedFile
import org.jetbrains.kotlin.build.GeneratedJvmClass
import org.jetbrains.kotlin.build.JvmSourceRoot
import org.jetbrains.kotlin.build.isModuleMappingFile
import org.jetbrains.kotlin.compilerRunner.OutputItemsCollectorImpl
import org.jetbrains.kotlin.config.IncrementalCompilation
import org.jetbrains.kotlin.config.Services
import org.jetbrains.kotlin.incremental.components.LookupTracker
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCompilationComponents
import org.jetbrains.kotlin.modules.KotlinModuleXmlBuilder
import org.jetbrains.kotlin.modules.TargetId
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.progress.CompilationCanceledStatus
import org.jetbrains.kotlin.utils.keysToMap
import java.io.File
import java.util.*
fun Iterable<File>.javaSourceRoots(roots: Iterable<File>): Iterable<File> =
filter { it.isJavaFile() }
.map { findSrcDirRoot(it, roots) }
.filterNotNull()
fun makeModuleFile(name: String, isTest: Boolean, outputDir: File, sourcesToCompile: Iterable<File>, javaSourceRoots: Iterable<File>, classpath: Iterable<File>, friendDirs: Iterable<File>): File {
val builder = KotlinModuleXmlBuilder()
builder.addModule(
name,
outputDir.absolutePath,
sourcesToCompile,
javaSourceRoots.map { JvmSourceRoot(it) },
classpath,
"java-production",
isTest,
// this excludes the output directories from the class path, to be removed for true incremental compilation
setOf(outputDir),
friendDirs
)
val scriptFile = File.createTempFile("kjps", StringUtil.sanitizeJavaIdentifier(name) + ".script.xml")
FileUtil.writeToFile(scriptFile, builder.asText().toString())
return scriptFile
}
fun makeCompileServices(
incrementalCaches: Map<TargetId, IncrementalCache>,
lookupTracker: LookupTracker,
compilationCanceledStatus: CompilationCanceledStatus?
): Services =
with(Services.Builder()) {
register(IncrementalCompilationComponents::class.java,
IncrementalCompilationComponentsImpl(incrementalCaches, lookupTracker))
compilationCanceledStatus?.let {
register(CompilationCanceledStatus::class.java, it)
}
build()
}
fun makeLookupTracker(parentLookupTracker: LookupTracker = LookupTracker.DO_NOTHING): LookupTracker =
if (IncrementalCompilation.isExperimental()) LookupTrackerImpl(parentLookupTracker)
else parentLookupTracker
fun<Target> makeIncrementalCachesMap(
targets: Iterable<Target>,
getDependencies: (Target) -> Iterable<Target>,
getCache: (Target) -> IncrementalCacheImpl<Target>,
getTargetId: Target.() -> TargetId
): Map<TargetId, IncrementalCacheImpl<Target>>
{
val dependents = targets.keysToMap { hashSetOf<Target>() }
val targetsWithDependents = targets.toHashSet()
for (target in targets) {
for (dependency in getDependencies(target)) {
if (dependency !in targets) continue
dependents[dependency]!!.add(target)
targetsWithDependents.add(target)
}
}
val caches = targetsWithDependents.keysToMap { getCache(it) }
for ((target, cache) in caches) {
dependents[target]?.forEach {
cache.addDependentCache(caches[it]!!)
}
}
return caches.mapKeys { it.key.getTargetId() }
}
fun<Target> updateIncrementalCaches(
targets: Iterable<Target>,
generatedFiles: List<GeneratedFile<Target>>,
compiledWithErrors: Boolean,
getIncrementalCache: (Target) -> IncrementalCacheImpl<Target>
): CompilationResult {
var changesInfo = CompilationResult.NO_CHANGES
for (generatedFile in generatedFiles) {
val ic = getIncrementalCache(generatedFile.target)
when {
generatedFile is GeneratedJvmClass<Target> -> changesInfo += ic.saveFileToCache(generatedFile)
generatedFile.outputFile.isModuleMappingFile() -> changesInfo += ic.saveModuleMappingToCache(generatedFile.sourceFiles, generatedFile.outputFile)
}
}
if (!compiledWithErrors) {
targets.forEach {
val newChangesInfo = getIncrementalCache(it).clearCacheForRemovedClasses()
changesInfo += newChangesInfo
}
}
return changesInfo
}
fun LookupStorage.update(
lookupTracker: LookupTracker,
filesToCompile: Iterable<File>,
removedFiles: Iterable<File>
) {
if (lookupTracker !is LookupTrackerImpl) throw AssertionError("Lookup tracker is expected to be LookupTrackerImpl, got ${lookupTracker.javaClass}")
removeLookupsFrom(filesToCompile.asSequence() + removedFiles.asSequence())
addAll(lookupTracker.lookups.entrySet(), lookupTracker.pathInterner.values)
}
fun<Target> OutputItemsCollectorImpl.generatedFiles(
targets: Collection<Target>,
representativeTarget: Target,
getSources: (Target) -> Iterable<File>,
getOutputDir: (Target) -> File?
): List<GeneratedFile<Target>> {
// If there's only one target, this map is empty: get() always returns null, and the representativeTarget will be used below
val sourceToTarget =
if (targets.size >1) targets.flatMap { target -> getSources(target).map { Pair(it, target) } }.toMap()
else mapOf<File, Target>()
return outputs.map { outputItem ->
val target =
outputItem.sourceFiles.firstOrNull()?.let { sourceToTarget[it] } ?:
targets.filter { getOutputDir(it)?.let { outputItem.outputFile.startsWith(it) } ?: false }.singleOrNull() ?:
representativeTarget
if (outputItem.outputFile.name.endsWith(".class"))
GeneratedJvmClass(target, outputItem.sourceFiles, outputItem.outputFile)
else
GeneratedFile(target, outputItem.sourceFiles, outputItem.outputFile)
}
}
data class DirtyData(
val dirtyLookupSymbols: Collection<LookupSymbol> = emptyList(),
val dirtyClassesFqNames: Collection<FqName> = emptyList()
)
fun <Target> CompilationResult.getDirtyData(
caches: Iterable<IncrementalCacheImpl<Target>>,
reporter: ICReporter
): DirtyData {
val dirtyLookupSymbols = HashSet<LookupSymbol>()
val dirtyClassesFqNames = HashSet<FqName>()
for (change in changes) {
reporter.report { "Process $change" }
if (change is ChangeInfo.SignatureChanged) {
val fqNames = if (!change.areSubclassesAffected) listOf(change.fqName) else withSubtypes(change.fqName, caches)
for (classFqName in fqNames) {
assert(!classFqName.isRoot) { "$classFqName is root when processing $change" }
val scope = classFqName.parent().asString()
val name = classFqName.shortName().identifier
dirtyLookupSymbols.add(LookupSymbol(name, scope))
}
}
else if (change is ChangeInfo.MembersChanged) {
val fqNames = withSubtypes(change.fqName, caches)
// need to recompile subtypes because changed member might break override
dirtyClassesFqNames.addAll(fqNames)
for (name in change.names) {
for (fqName in fqNames) {
dirtyLookupSymbols.add(LookupSymbol(name, fqName.asString()))
}
}
}
}
return DirtyData(dirtyLookupSymbols, dirtyClassesFqNames)
}
fun mapLookupSymbolsToFiles(
lookupStorage: LookupStorage,
lookupSymbols: Iterable<LookupSymbol>,
reporter: ICReporter,
excludes: Set<File> = emptySet()
): Set<File> {
val dirtyFiles = HashSet<File>()
for (lookup in lookupSymbols) {
val affectedFiles = lookupStorage.get(lookup).map(::File).filter { it !in excludes }
reporter.report { "${lookup.scope}#${lookup.name} caused recompilation of: ${reporter.pathsAsString(affectedFiles)}" }
dirtyFiles.addAll(affectedFiles)
}
return dirtyFiles
}
fun <Target> mapClassesFqNamesToFiles(
caches: Iterable<IncrementalCacheImpl<Target>>,
classesFqNames: Iterable<FqName>,
reporter: ICReporter,
excludes: Set<File> = emptySet()
): Set<File> {
val dirtyFiles = HashSet<File>()
for (cache in caches) {
for (dirtyClassFqName in classesFqNames) {
val srcFile = cache.getSourceFileIfClass(dirtyClassFqName)
if (srcFile == null || srcFile in excludes) continue
reporter.report { ("Class $dirtyClassFqName caused recompilation of: ${reporter.pathsAsString(srcFile)}") }
dirtyFiles.add(srcFile)
}
}
return dirtyFiles
}
private fun findSrcDirRoot(file: File, roots: Iterable<File>): File? =
roots.firstOrNull { FileUtil.isAncestor(it, file, false) }
fun <Target> withSubtypes(
typeFqName: FqName,
caches: Iterable<IncrementalCacheImpl<Target>>
): Set<FqName> {
val types = LinkedList(listOf(typeFqName))
val subtypes = hashSetOf<FqName>()
while (types.isNotEmpty()) {
val unprocessedType = types.pollFirst()
caches.asSequence()
.flatMap { it.getSubtypesOf(unprocessedType) }
.filter { it !in subtypes }
.forEach { types.addLast(it) }
subtypes.add(unprocessedType)
}
return subtypes
}

View File

@@ -1,31 +0,0 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental
import java.io.File
fun File.isJavaFile() =
extension.equals("java", ignoreCase = true)
fun File.isKotlinFile(): Boolean =
extension.let {
"kt".equals(it, ignoreCase = true) ||
"kts".equals(it, ignoreCase = true)
}
fun File.isClassFile(): Boolean =
extension.equals("class", ignoreCase = true)

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,16 +16,17 @@
package org.jetbrains.kotlin.incremental
import com.google.protobuf.MessageLite
import org.jetbrains.kotlin.descriptors.Visibilities
import org.jetbrains.kotlin.incremental.ProtoCompareGenerated.ProtoBufClassKind
import org.jetbrains.kotlin.incremental.ProtoCompareGenerated.ProtoBufPackageKind
import org.jetbrains.kotlin.incremental.storage.ProtoMapValue
import org.jetbrains.kotlin.protobuf.MessageLite
import org.jetbrains.kotlin.serialization.Flags
import org.jetbrains.kotlin.serialization.ProtoBuf
import org.jetbrains.kotlin.serialization.deserialization.Deserialization
import org.jetbrains.kotlin.serialization.deserialization.NameResolver
import org.jetbrains.kotlin.serialization.jvm.JvmProtoBufUtil
import org.jetbrains.kotlin.utils.HashSetUtil
import java.util.*
data class Difference(
@@ -56,7 +57,6 @@ internal val MessageLite.isPrivate: Boolean
is ProtoBuf.Constructor -> Flags.VISIBILITY.get(flags)
is ProtoBuf.Function -> Flags.VISIBILITY.get(flags)
is ProtoBuf.Property -> Flags.VISIBILITY.get(flags)
is ProtoBuf.TypeAlias -> Flags.VISIBILITY.get(flags)
else -> error("Unknown message: $this")
}))
@@ -65,7 +65,6 @@ private fun MessageLite.name(nameResolver: NameResolver): String {
is ProtoBuf.Constructor -> "<init>"
is ProtoBuf.Function -> nameResolver.getString(name)
is ProtoBuf.Property -> nameResolver.getString(name)
is ProtoBuf.TypeAlias -> nameResolver.getString(name)
else -> error("Unknown message: $this")
}
}
@@ -134,7 +133,7 @@ private abstract class DifferenceCalculator() {
): Collection<String> {
val oldNames = oldList.map { compareObject.oldNameResolver.getString(it) }.toSet()
val newNames = newList.map { compareObject.newNameResolver.getString(it) }.toSet()
return oldNames.union(newNames) - oldNames.intersect(newNames)
return HashSetUtil.symmetricDifference(oldNames, newNames)
}
private fun MessageLite.getHashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int {
@@ -142,7 +141,6 @@ private abstract class DifferenceCalculator() {
is ProtoBuf.Constructor -> hashCode(stringIndexes, fqNameIndexes)
is ProtoBuf.Function -> hashCode(stringIndexes, fqNameIndexes)
is ProtoBuf.Property -> hashCode(stringIndexes, fqNameIndexes)
is ProtoBuf.TypeAlias -> hashCode(stringIndexes, fqNameIndexes)
else -> error("Unknown message: $this")
}
}
@@ -152,13 +150,21 @@ private abstract class DifferenceCalculator() {
old is ProtoBuf.Constructor && new is ProtoBuf.Constructor -> checkEquals(old, new)
old is ProtoBuf.Function && new is ProtoBuf.Function -> checkEquals(old, new)
old is ProtoBuf.Property && new is ProtoBuf.Property -> checkEquals(old, new)
old is ProtoBuf.TypeAlias && new is ProtoBuf.TypeAlias -> checkEquals(old, new)
else -> error("Unknown message: $this")
}
}
}
private class DifferenceCalculatorForClass(oldData: ProtoMapValue, newData: ProtoMapValue) : DifferenceCalculator() {
companion object {
private val CLASS_SIGNATURE_ENUMS = EnumSet.of(
ProtoBufClassKind.FLAGS,
ProtoBufClassKind.FQ_NAME,
ProtoBufClassKind.TYPE_PARAMETER_LIST,
ProtoBufClassKind.SUPERTYPE_LIST
)
}
val oldClassData = JvmProtoBufUtil.readClassDataFrom(oldData.bytes, oldData.strings)
val newClassData = JvmProtoBufUtil.readClassDataFrom(newData.bytes, newData.strings)
@@ -190,7 +196,6 @@ private class DifferenceCalculatorForClass(oldData: ProtoMapValue, newData: Prot
ProtoBufClassKind.COMPANION_OBJECT_NAME -> {
if (oldProto.hasCompanionObjectName()) oldProto.companionObjectName.oldToNames()
if (newProto.hasCompanionObjectName()) newProto.companionObjectName.newToNames()
isClassAffected = true
}
ProtoBufClassKind.NESTED_CLASS_NAME_LIST -> {
if (classIsSealed) {
@@ -212,32 +217,17 @@ private class DifferenceCalculatorForClass(oldData: ProtoMapValue, newData: Prot
names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Class::getFunctionList))
ProtoBufClassKind.PROPERTY_LIST ->
names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Class::getPropertyList))
ProtoBufClassKind.TYPE_ALIAS_LIST ->
names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Class::getTypeAliasList))
ProtoBufClassKind.ENUM_ENTRY_LIST -> {
isClassAffected = true
}
ProtoBufClassKind.SEALED_SUBCLASS_FQ_NAME_LIST -> {
// TODO
}
ProtoBufClassKind.TYPE_TABLE -> {
// TODO
}
ProtoCompareGenerated.ProtoBufClassKind.SINCE_KOTLIN_INFO,
ProtoCompareGenerated.ProtoBufClassKind.SINCE_KOTLIN_INFO_TABLE -> {
// TODO
}
ProtoBufClassKind.FLAGS,
ProtoBufClassKind.FQ_NAME,
ProtoBufClassKind.TYPE_PARAMETER_LIST,
ProtoBufClassKind.SUPERTYPE_LIST,
ProtoBufClassKind.SUPERTYPE_ID_LIST-> {
in CLASS_SIGNATURE_ENUMS -> {
isClassAffected = true
areSubclassesAffected = true
}
ProtoBufClassKind.CLASS_MODULE_NAME -> {
// TODO
}
else -> throw IllegalArgumentException("Unsupported kind: $kind")
}
}
@@ -272,11 +262,7 @@ private class DifferenceCalculatorForPackageFacade(oldData: ProtoMapValue, newDa
names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Package::getFunctionList))
ProtoBufPackageKind.PROPERTY_LIST ->
names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Package::getPropertyList))
ProtoBufPackageKind.TYPE_ALIAS_LIST ->
names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Package::getTypeAliasList))
ProtoBufPackageKind.TYPE_TABLE,
ProtoBufPackageKind.SINCE_KOTLIN_INFO_TABLE,
ProtoBufPackageKind.PACKAGE_MODULE_NAME -> {
ProtoBufPackageKind.TYPE_TABLE -> {
// TODO
}
else -> throw IllegalArgumentException("Unsupported kind: $kind")

View File

@@ -1,77 +0,0 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.build
import junit.framework.TestCase
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments
import org.jetbrains.kotlin.config.KotlinCompilerVersion
import org.jetbrains.kotlin.config.LanguageFeature
import org.jetbrains.kotlin.load.kotlin.JvmMetadataVersion
import org.junit.Assert.assertNotEquals
import org.junit.Test
class JvmBuildMetaInfoTest : TestCase() {
@Test
fun testSerialization() {
val args = K2JVMCompilerArguments()
val info = JvmBuildMetaInfo(args)
val actual = JvmBuildMetaInfo.serializeToString(info)
val expectedKeys = listOf(
"apiVersionString",
"bytecodeVersionMajor",
"bytecodeVersionMinor",
"bytecodeVersionPatch",
"compilerBuildVersion",
"coroutinesEnable",
"coroutinesError",
"coroutinesVersion",
"coroutinesWarn",
"isEAP",
"languageVersionString",
"metadataVersionMajor",
"metadataVersionMinor",
"metadataVersionPatch",
"multiplatformEnable",
"multiplatformVersion",
"ownVersion"
)
assertEquals(expectedKeys, actual.split("\r\n", "\n").map { line -> line.split("=").first() })
}
@Test
fun testSerializationDeserialization() {
val args = K2JVMCompilerArguments()
val info = JvmBuildMetaInfo(args)
val serialized = JvmBuildMetaInfo.serializeToString(info)
val deserialized = JvmBuildMetaInfo.deserializeFromString(serialized)
assertEquals(info, deserialized)
}
@Test
fun testEquals() {
val args1 = K2JVMCompilerArguments()
args1.coroutinesEnable = true
val info1 = JvmBuildMetaInfo(args1)
val args2 = K2JVMCompilerArguments()
args2.coroutinesEnable = false
val info2 = JvmBuildMetaInfo(args2)
assertNotEquals(info1, info2)
assertEquals(info1, info2.copy(coroutinesEnable = true))
}
}

View File

@@ -1,55 +0,0 @@
/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.build
import junit.framework.TestCase
import org.junit.Test
class SerializationUtilsTest : TestCase() {
data class TestPropertyTypes(
val intNull: Int?,
val int: Int,
val stringNull: String?,
val string: String,
val boolNull: Boolean?,
val bool: Boolean
)
@Test
fun testPropertyTypes() {
val instance1 = TestPropertyTypes(null, 1, null, "abc", null, false)
val deserialized1 = deserializeFromPlainText<TestPropertyTypes>(serializeToPlainText(instance1))
assertEquals(instance1, deserialized1)
val instance2 = TestPropertyTypes(1, 2, "abc", "xyz", true, false)
val deserialized2 = deserializeFromPlainText<TestPropertyTypes>(serializeToPlainText(instance2))
assertEquals(instance2, deserialized2)
}
data class TestAddedField1(val x: Int)
data class TestAddedField2(val x: Int, val y: Int?)
@Test
fun testAddedField() {
val testAddedField1 = TestAddedField1(1)
val serialized = serializeToPlainText(testAddedField1)
val deserialized = deserializeFromPlainText<TestAddedField2>(serialized)
assertEquals(TestAddedField2(1, null), deserialized)
}
}

View File

@@ -1,47 +0,0 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.testingUtils
import java.io.File
class BuildLogFinder(
private val isExperimentalEnabled: Boolean = false,
private val isDataContainerBuildLogEnabled: Boolean = false,
private val isGradleEnabled: Boolean = false
) {
companion object {
private const val GRADLE_LOG = "gradle-build.log"
private const val DATA_CONTAINER_LOG = "data-container-version-build.log"
private const val EXPERIMENTAL_LOG = "experimental-ic-build.log"
private const val SIMPLE_LOG = "build.log"
}
fun findBuildLog(dir: File): File? {
val names = dir.list() ?: arrayOf()
val files = names.filter { File(dir, it).isFile }.toSet()
val matchedName = when {
isGradleEnabled && GRADLE_LOG in files -> GRADLE_LOG
isDataContainerBuildLogEnabled && DATA_CONTAINER_LOG in files -> DATA_CONTAINER_LOG
isExperimentalEnabled && EXPERIMENTAL_LOG in files -> EXPERIMENTAL_LOG
SIMPLE_LOG in files -> SIMPLE_LOG
else -> null
}
return File(dir, matchedName ?: return null)
}
}

View File

@@ -1,181 +0,0 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.incremental.testingUtils
import com.intellij.openapi.util.io.FileUtil
import java.io.File
import java.util.*
private val COMMANDS = listOf("new", "touch", "delete")
private val COMMANDS_AS_REGEX_PART = COMMANDS.joinToString("|")
private val COMMANDS_AS_MESSAGE_PART = COMMANDS.joinToString("/") { "\".$it\"" }
enum class TouchPolicy {
TIMESTAMP,
CHECKSUM
}
fun copyTestSources(testDataDir: File, sourceDestinationDir: File, filePrefix: String): Map<File, File> {
val mapping = hashMapOf<File, File>()
FileUtil.copyDir(testDataDir, sourceDestinationDir) {
it.isDirectory || it.name.startsWith(filePrefix) && (it.name.endsWith(".kt") || it.name.endsWith(".java"))
}
for (file in sourceDestinationDir.walk()) {
if (!file.isFile) continue
val renamedFile =
if (filePrefix.isEmpty()) {
file
}
else {
File(sourceDestinationDir, file.name.removePrefix(filePrefix)).apply {
file.renameTo(this)
}
}
mapping[renamedFile] = File(testDataDir, file.name)
}
return mapping
}
fun getModificationsToPerform(
testDataDir: File,
moduleNames: Collection<String>?,
allowNoFilesWithSuffixInTestData: Boolean,
touchPolicy: TouchPolicy
): List<List<Modification>> {
fun getModificationsForIteration(newSuffix: String, touchSuffix: String, deleteSuffix: String): List<Modification> {
fun splitToModuleNameAndFileName(fileName: String): Pair<String?, String> {
val underscore = fileName.indexOf("_")
if (underscore != -1) {
val module = fileName.substring(0, underscore)
assert(moduleNames != null) { "File name has module prefix, but multi-module environment is absent" }
assert(module in moduleNames!!) { "Module not found for file with prefix: $fileName" }
return Pair(module, fileName.substring(underscore + 1))
}
assert(moduleNames == null) { "Test is multi-module, but file has no module prefix: $fileName" }
return Pair(null, fileName)
}
val rules = mapOf<String, (String, File) -> Modification>(
newSuffix to { path, file -> ModifyContent(path, file) },
touchSuffix to { path, file -> TouchFile(path, touchPolicy) },
deleteSuffix to { path, file -> DeleteFile(path) }
)
val modifications = ArrayList<Modification>()
for (file in testDataDir.walkTopDown()) {
if (!file.isFile) continue
val relativeFilePath = file.toRelativeString(testDataDir)
val (suffix, createModification) = rules.entries.firstOrNull { file.path.endsWith(it.key) } ?: continue
val (moduleName, fileName) = splitToModuleNameAndFileName(relativeFilePath)
val srcDir = moduleName?.let { "$it/src" } ?: "src"
modifications.add(createModification(srcDir + "/" + fileName.removeSuffix(suffix), file))
}
return modifications
}
val haveFilesWithoutNumbers = testDataDir.walkTopDown().any { it.name.matches(".+\\.($COMMANDS_AS_REGEX_PART)$".toRegex()) }
val haveFilesWithNumbers = testDataDir.walkTopDown().any { it.name.matches(".+\\.($COMMANDS_AS_REGEX_PART)\\.\\d+$".toRegex()) }
if (haveFilesWithoutNumbers && haveFilesWithNumbers) {
throw IllegalStateException("Bad test data format: files ending with both unnumbered and numbered ${COMMANDS_AS_MESSAGE_PART} were found")
}
if (!haveFilesWithoutNumbers && !haveFilesWithNumbers) {
if (allowNoFilesWithSuffixInTestData) {
return listOf(listOf())
}
else {
throw IllegalStateException("Bad test data format: no files ending with ${COMMANDS_AS_MESSAGE_PART} found")
}
}
if (haveFilesWithoutNumbers) {
return listOf(getModificationsForIteration(".new", ".touch", ".delete"))
}
else {
return (1..10)
.map { getModificationsForIteration(".new.$it", ".touch.$it", ".delete.$it") }
.filter { it.isNotEmpty() }
}
}
abstract class Modification(val path: String) {
abstract fun perform(workDir: File, mapping: MutableMap<File, File>)
override fun toString(): String = "${javaClass.simpleName} $path"
}
class ModifyContent(path: String, val dataFile: File) : Modification(path) {
override fun perform(workDir: File, mapping: MutableMap<File, File>) {
val file = File(workDir, path)
val oldLastModified = file.lastModified()
file.delete()
dataFile.copyTo(file)
val newLastModified = file.lastModified()
if (newLastModified <= oldLastModified) {
//Mac OS and some versions of Linux truncate timestamp to nearest second
file.setLastModified(oldLastModified + 1000)
}
mapping[file] = dataFile
}
}
class TouchFile(path: String, private val touchPolicy: TouchPolicy) : Modification(path) {
override fun perform(workDir: File, mapping: MutableMap<File, File>) {
val file = File(workDir, path)
when (touchPolicy) {
TouchPolicy.TIMESTAMP -> {
val oldLastModified = file.lastModified()
//Mac OS and some versions of Linux truncate timestamp to nearest second
file.setLastModified(Math.max(System.currentTimeMillis(), oldLastModified + 1000))
}
TouchPolicy.CHECKSUM -> {
file.appendText(" ")
}
}
}
}
class DeleteFile(path: String) : Modification(path) {
override fun perform(workDir: File, mapping: MutableMap<File, File>) {
val fileToDelete = File(workDir, path)
if (!fileToDelete.delete()) {
throw AssertionError("Couldn't delete $fileToDelete")
}
mapping.remove(fileToDelete)
}
}

View File

@@ -1,100 +0,0 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: core/deserialization/src/ext_options.debug.proto
package org.jetbrains.kotlin.serialization;
public final class DebugExtOptionsProtoBuf {
private DebugExtOptionsProtoBuf() {}
public static void registerAllExtensions(
org.jetbrains.kotlin.protobuf.ExtensionRegistry registry) {
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.skipInComparison);
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.nameIdInTable);
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.fqNameIdInTable);
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable);
}
public static final int SKIP_IN_COMPARISON_FIELD_NUMBER = 50000;
/**
* <code>extend .google.protobuf.FieldOptions { ... }</code>
*/
public static final
org.jetbrains.kotlin.protobuf.GeneratedMessage.GeneratedExtension<
org.jetbrains.kotlin.protobuf.DescriptorProtos.FieldOptions,
java.lang.Boolean> skipInComparison = org.jetbrains.kotlin.protobuf.GeneratedMessage
.newFileScopedGeneratedExtension(
java.lang.Boolean.class,
null);
public static final int NAME_ID_IN_TABLE_FIELD_NUMBER = 50001;
/**
* <code>extend .google.protobuf.FieldOptions { ... }</code>
*/
public static final
org.jetbrains.kotlin.protobuf.GeneratedMessage.GeneratedExtension<
org.jetbrains.kotlin.protobuf.DescriptorProtos.FieldOptions,
java.lang.Boolean> nameIdInTable = org.jetbrains.kotlin.protobuf.GeneratedMessage
.newFileScopedGeneratedExtension(
java.lang.Boolean.class,
null);
public static final int FQ_NAME_ID_IN_TABLE_FIELD_NUMBER = 50002;
/**
* <code>extend .google.protobuf.FieldOptions { ... }</code>
*/
public static final
org.jetbrains.kotlin.protobuf.GeneratedMessage.GeneratedExtension<
org.jetbrains.kotlin.protobuf.DescriptorProtos.FieldOptions,
java.lang.Boolean> fqNameIdInTable = org.jetbrains.kotlin.protobuf.GeneratedMessage
.newFileScopedGeneratedExtension(
java.lang.Boolean.class,
null);
public static final int STRING_ID_IN_TABLE_FIELD_NUMBER = 50003;
/**
* <code>extend .google.protobuf.FieldOptions { ... }</code>
*/
public static final
org.jetbrains.kotlin.protobuf.GeneratedMessage.GeneratedExtension<
org.jetbrains.kotlin.protobuf.DescriptorProtos.FieldOptions,
java.lang.Boolean> stringIdInTable = org.jetbrains.kotlin.protobuf.GeneratedMessage
.newFileScopedGeneratedExtension(
java.lang.Boolean.class,
null);
public static org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n0core/deserialization/src/ext_options.d" +
"ebug.proto\022\"org.jetbrains.kotlin.seriali" +
"zation\032 google/protobuf/descriptor.proto" +
":;\n\022skip_in_comparison\022\035.google.protobuf" +
".FieldOptions\030\320\206\003 \001(\010:9\n\020name_id_in_tabl" +
"e\022\035.google.protobuf.FieldOptions\030\321\206\003 \001(\010" +
":<\n\023fq_name_id_in_table\022\035.google.protobu" +
"f.FieldOptions\030\322\206\003 \001(\010:;\n\022string_id_in_t" +
"able\022\035.google.protobuf.FieldOptions\030\323\206\003 " +
"\001(\010B\031B\027DebugExtOptionsProtoBuf"
};
org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public org.jetbrains.kotlin.protobuf.ExtensionRegistry assignDescriptors(
org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor[] {
org.jetbrains.kotlin.protobuf.DescriptorProtos.getDescriptor(),
}, assigner);
skipInComparison.internalInit(descriptor.getExtensions().get(0));
nameIdInTable.internalInit(descriptor.getExtensions().get(1));
fqNameIdInTable.internalInit(descriptor.getExtensions().get(2));
stringIdInTable.internalInit(descriptor.getExtensions().get(3));
org.jetbrains.kotlin.protobuf.DescriptorProtos.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}

754
build.xml

File diff suppressed because it is too large Load Diff

View File

@@ -1,29 +0,0 @@
<project name="Commons">
<condition property="isWindows">
<os family="windows"/>
</condition>
<condition property="isMac">
<os family="mac"/>
</condition>
<condition property="isLinux">
<and>
<os family="unix"/>
<not>
<os family="mac"/>
</not>
</and>
</condition>
<property name="dependencies" value="${basedir}/dependencies"/>
<property name="output" value="${basedir}/dist"/>
<property name="js.stdlib.output.dir" value="${output}/js"/>
<target name="make-dependency-dirs">
<mkdir dir="${dependencies}"/>
<mkdir dir="${dependencies}/download"/>
</target>
</project>

View File

@@ -1,6 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="NewModuleRootManager" inherit-compiler-output="false">
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/gen" />
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/gen" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/assets" />
<option name="LIBS_FOLDER_RELATIVE_PATH" value="/libs" />
<option name="USE_CUSTOM_APK_RESOURCE_FOLDER" value="false" />
<option name="CUSTOM_APK_RESOURCE_FOLDER" value="" />
<option name="USE_CUSTOM_COMPILER_MANIFEST" value="false" />
<option name="CUSTOM_COMPILER_MANIFEST" value="" />
<option name="APK_PATH" value="" />
<option name="LIBRARY_PROJECT" value="false" />
<option name="RUN_PROCESS_RESOURCES_MAVEN_TASK" value="true" />
<option name="GENERATE_UNSIGNED_APK" value="false" />
<option name="CUSTOM_DEBUG_KEYSTORE_PATH" value="" />
<option name="PACK_TEST_CODE" value="false" />
<option name="RUN_PROGUARD" value="false" />
<option name="PROGUARD_CFG_PATH" value="/proguard-project.txt" />
<resOverlayFolders>
<path>/res-overlay</path>
</resOverlayFolders>
<includeSystemProguardFile>true</includeSystemProguardFile>
<includeAssetsFromLibraries>false</includeAssetsFromLibraries>
<additionalNativeLibs />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="Android 2.3.3 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
</module>

View File

@@ -1,76 +0,0 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply plugin: 'com.android.application'
repositories {
jcenter()
}
android {
compileSdkVersion 19
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "org.jetbrains.kotlin.android.tests"
minSdkVersion 19
targetSdkVersion 19
versionCode 1
versionName "1.0"
testApplicationId "org.jetbrains.kotlin.android.tests.gradle"
testInstrumentationRunner "android.test.InstrumentationTestRunner"
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java {
srcDirs = ['src']
}
res.srcDirs = ['res']
}
androidTest {
java {
srcDirs = ['src']
}
}
}
packagingOptions { exclude 'META-INF/build.txt' }
//TODO run under java 6, cause there is error on implicit 'stream' import in 'asWithMutable' test
lintOptions {
abortOnError false
}
compileOptions {
incremental = false
}
dexOptions {
dexInProcess false
javaMaxHeapSize "700m"
//default is 4 and Total Memory = maxProcessCount * javaMaxHeapSize
maxProcessCount 2
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile 'junit:junit:4.12'
}

View File

@@ -8,5 +8,5 @@
# For customization when using a Version Control System, please read the
# header note.
#sdk.dir=compiler/android-tests/android-module/android-sdk/android-sdk-windows
sdk.dir=../../../android.tests.dependencies/android-sdk
#sdk.dir.relative=android-sdk/android-sdk-windows

View File

@@ -22,13 +22,21 @@ import java.lang.reflect.Method;
public class AbstractCodegenTestCaseOnAndroid extends TestCase {
protected void invokeBoxMethod(Class clazz, String filePath, String expectedResult) throws Exception {
protected void invokeBoxMethod(String filePath, String expectedResult) throws Exception {
try {
Method method = clazz.getMethod("box");
Class clazz;
String packageName = filePath.replaceAll("\\\\|-|\\.|/", "_");
clazz = Class.forName(packageName + "." + getPackageClassName(packageName));
Method method;
method = clazz.getMethod("box");
assertEquals(expectedResult, method.invoke(null));
}
catch (Throwable e) {
throw new RuntimeException("File: " + filePath, e);
}
}
public static String getPackageClassName(String packageName) {
return Character.toUpperCase(packageName.charAt(0)) + packageName.substring(1, packageName.length()) + "Package";
}
}

View File

@@ -6,17 +6,15 @@
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="cli" />
<orderEntry type="module" module-name="tests-common" />
<orderEntry type="module" module-name="compiler-tests" />
<orderEntry type="module" module-name="frontend" />
<orderEntry type="module" module-name="backend" />
<orderEntry type="library" name="jps-test" level="project" />
<orderEntry type="module" module-name="generators" scope="TEST" />
<orderEntry type="library" name="idea-full" level="project" />
<orderEntry type="module" module-name="util" />
<orderEntry type="module" module-name="descriptor.loader.java" scope="TEST" />
<orderEntry type="module" module-name="frontend.java" scope="TEST" />
<orderEntry type="module" module-name="jps-tests" scope="TEST" />
</component>
</module>

View File

@@ -19,27 +19,25 @@ package org.jetbrains.kotlin.android.tests;
import com.intellij.util.PlatformUtils;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.android.tests.ant.AntRunner;
import org.jetbrains.kotlin.android.tests.download.SDKDownloader;
import org.jetbrains.kotlin.android.tests.emulator.Emulator;
import org.jetbrains.kotlin.android.tests.gradle.GradleRunner;
import org.jetbrains.kotlin.android.tests.run.PermissionManager;
import org.junit.Assert;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class CodegenTestsOnAndroidRunner {
private static final Pattern ERROR_IN_TEST_OUTPUT_PATTERN =
Pattern.compile("([\\s]+at .*| Caused .*| java.lang.RuntimeException: File: .*|[\\s]+\\.\\.\\. .* more| Error in .*)");
private static final Pattern NUMBER_OF_TESTS_IF_FAILED = Pattern.compile("Tests run: ([0-9]*), Failures: ([0-9]*), Errors: ([0-9]*)");
private static final Pattern NUMBER_OF_TESTS_OK = Pattern.compile(" OK \\(([0-9]*) tests\\)");
private final PathManager pathManager;
@@ -55,22 +53,120 @@ public class CodegenTestsOnAndroidRunner {
TestSuite suite = new TestSuite("MySuite");
String resultOutput = runTests();
if (resultOutput == null) return suite;
String reportFolder = pathManager.getTmpFolder() + "/build/outputs/androidTest-results/connected";
try {
List<TestCase> testCases = parseSingleReportInFolder(reportFolder);
for (TestCase aCase : testCases) {
suite.addTest(aCase);
// Test name -> stackTrace
Map<String, String> resultMap = parseOutputForFailedTests(resultOutput);
final Statistics statistics;
// If map is empty => there are no failed tests
if (resultMap.isEmpty()) {
statistics = parseOutputForTestsNumberIfTestsPassed(resultOutput);
}
else {
statistics = parseOutputForTestsNumberIfThereIsFailedTests(resultOutput);
for (final Map.Entry<String, String> entry : resultMap.entrySet()) {
suite.addTest(new TestCase("run") {
@Override
public String getName() {
return entry.getKey();
}
@Override
protected void runTest() throws Throwable {
Assert.fail(entry.getValue() + "See more information in log above.");
}
});
}
Assert.assertNotEquals("There is no test results in report", 0, testCases.size());
}
catch (Exception e) {
throw new RuntimeException("Can't parse test results in " + reportFolder +"\n" + resultOutput);
}
Assert.assertNotNull("Cannot parse number of failed tests from final line", statistics);
Assert.assertEquals("Number of stackTraces != failed tests on the final line", resultMap.size(),
statistics.failed + statistics.errors);
suite.addTest(new TestCase("run") {
@Override
public String getName() {
return "testAll: Total: " + statistics.total + ", Failures: " + statistics.failed + ", Errors: " + statistics.errors;
}
@Override
protected void runTest() throws Throwable {
Assert.assertTrue(true);
}
});
return suite;
}
/*
Output example:
[exec] Error in testKt344:
[exec] java.lang.RuntimeException: File: compiler\testData\codegen\boxWithStdlib\regressions\kt344.kt
[exec] at org.jetbrains.kotlin.android.tests.AbstractCodegenTestCaseOnAndroid.invokeBoxMethod(AbstractCodegenTestCaseOnAndroid.java:38)
[exec] at org.jetbrains.kotlin.android.tests.CodegenTestCaseOnAndroid.testKt344(CodegenTestCaseOnAndroid.java:595)
[exec] at java.lang.reflect.Method.invokeNative(Native Method)
[exec] at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
[exec] Caused by: java.lang.reflect.InvocationTargetException
[exec] at java.lang.reflect.Method.invokeNative(Native Method)
[exec] at org.jetbrains.kotlin.android.tests.AbstractCodegenTestCaseOnAndroid.invokeBoxMethod(AbstractCodegenTestCaseOnAndroid.java:35)
[exec] ... 13 more
[exec] Caused by: java.lang.VerifyError: compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage$t6$foo$1
[exec] at compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage.t6(dummy.kt:94)
[exec] at compiler_testData_codegen_boxWithStdlib_regressions_kt344_kt.Compiler_testData_codegen_boxWithStdlib_regressions_kt344_ktPackage.box(dummy.kt:185)
[exec] ... 16 more
[exec] ...............
[exec] Error in testKt529:
*/
private static Map<String, String> parseOutputForFailedTests(@NotNull String output) {
Map<String, String> result = new HashMap<String, String>();
StringBuilder builder = new StringBuilder();
String failedTestNamePrefix = " Error in ";
String lastFailedTestName = "";
Matcher matcher = ERROR_IN_TEST_OUTPUT_PATTERN.matcher(output);
while (matcher.find()) {
String groupValue = matcher.group();
if (groupValue.startsWith(failedTestNamePrefix)) {
if (builder.length() > 0) {
result.put(lastFailedTestName, builder.toString());
builder.delete(0, builder.length());
}
lastFailedTestName = groupValue.substring(failedTestNamePrefix.length());
}
builder.append(groupValue);
builder.append("\n");
}
if (builder.length() > 0) {
result.put(lastFailedTestName, builder.toString());
}
return result;
}
//[exec] Tests run: 225, Failures: 0, Errors: 2
@Nullable
private static Statistics parseOutputForTestsNumberIfThereIsFailedTests(String output) {
Matcher matcher = NUMBER_OF_TESTS_IF_FAILED.matcher(output);
if (matcher.find()) {
return new Statistics(Integer.parseInt(matcher.group(1)), Integer.parseInt(matcher.group(2)),
Integer.parseInt(matcher.group(3)));
}
return null;
}
//[exec] OK (223 tests)
@Nullable
private static Statistics parseOutputForTestsNumberIfTestsPassed(String output) {
Matcher matcher = NUMBER_OF_TESTS_OK.matcher(output);
if (matcher.find()) {
return new Statistics(Integer.parseInt(matcher.group(1)), 0, 0);
}
return null;
}
@Nullable
public String runTests() {
File rootForAndroidDependencies = new File(pathManager.getDependenciesRoot());
@@ -79,27 +175,27 @@ public class CodegenTestsOnAndroidRunner {
}
SDKDownloader downloader = new SDKDownloader(pathManager);
Emulator emulator = new Emulator(pathManager);
AntRunner antRunner = new AntRunner(pathManager);
downloader.downloadAll();
downloader.unzipAll();
PermissionManager.setPermissions(pathManager);
AntRunner antRunner = new AntRunner(pathManager);
antRunner.packLibraries();
Emulator emulator = new Emulator(pathManager, Emulator.ARM);
GradleRunner gradleRunner = new GradleRunner(pathManager);
gradleRunner.clean();
gradleRunner.build();
emulator.createEmulator();
String platformPrefixProperty = System.setProperty(PlatformUtils.PLATFORM_PREFIX_KEY, "Idea");
try {
PermissionManager.setPermissions(pathManager);
antRunner.packLibraries();
emulator.createEmulator();
emulator.startEmulator();
try {
emulator.waitEmulatorStart();
//runTestsViaAdb(emulator, gradleRunner);
return gradleRunner.connectedDebugAndroidTest();
antRunner.cleanOutput();
antRunner.compileSources();
antRunner.installApplicationOnEmulator();
return antRunner.runTestsOnEmulator();
}
catch (RuntimeException e) {
e.printStackTrace();
@@ -124,55 +220,15 @@ public class CodegenTestsOnAndroidRunner {
}
}
private String runTestsViaAdb(Emulator emulator, GradleRunner gradleRunner) {
gradleRunner.installDebugAndroidTest();
String result = emulator.runTestsViaAdb();
System.out.println(result);
gradleRunner.uninstallDebugAndroidTest();
return result;
}
private static class Statistics {
public final int total;
public final int errors;
public final int failed;
private static List<TestCase> parseSingleReportInFolder(String reportFolder) throws
IOException,
SAXException,
ParserConfigurationException {
File folder = new File(reportFolder);
File[] files = folder.listFiles();
assert files != null;
assert files.length == 1;
File reportFile = files[0];
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(reportFile);
Element root = doc.getDocumentElement();
NodeList testCases = root.getElementsByTagName("testcase");
List<TestCase> result = new ArrayList(testCases.getLength());
for (int i = 0; i < testCases.getLength(); i++) {
Element item = (Element) testCases.item(i);
final NodeList failure = item.getElementsByTagName("failure");
String name = item.getAttribute("name");
String clazz = item.getAttribute("classname");
if (failure.getLength() == 0) {
result.add(new TestCase(name) {
@Override
protected void runTest() throws Throwable {
}
});
}
else {
result.add(new TestCase(name) {
@Override
protected void runTest() throws Throwable {
Assert.fail(failure.item(0).getTextContent());
}
});
}
private Statistics(int total, int failed, int errors) {
this.total = total;
this.failed = failed;
this.errors = errors;
}
return result;
}
}

View File

@@ -16,8 +16,6 @@
package org.jetbrains.kotlin.android.tests;
import org.jetbrains.kotlin.android.tests.download.SDKDownloader;
import java.io.File;
public class PathManager {
@@ -48,10 +46,6 @@ public class PathManager {
return getAndroidSdkRoot() + "/tools";
}
public String getBuildToolsFolderInAndroidSdk() {
return getAndroidSdkRoot() + "/build-tools";
}
public String getOutputForCompiledFiles() {
return tmpFolder + "/libs/codegen-test-output";
}
@@ -76,10 +70,6 @@ public class PathManager {
return rootFolder + "/android.tests.dependencies";
}
public String getGradleBinFolder() {
return getDependenciesRoot() + "/gradle-" + SDKDownloader.GRADLE_VERSION + "/bin";
}
public String getRootForDownload() {
return getDependenciesRoot() + "/download";
}

View File

@@ -29,115 +29,81 @@ import java.util.zip.ZipInputStream;
public class SDKDownloader {
private final String platformZipPath;
private final String armImage;
private final String x86Image;
private final String systemImages;
private final String platformToolsZipPath;
private final String skdToolsZipPath;
private final String buildToolsZipPath;
private final String gradleZipPath;
private final String toolsZipPath;
private final PathManager pathManager;
//NOTE: PLATFORM_TOOLS 23.1.0 requires only 64 bit build agents
private static final String PLATFORM_TOOLS = "23.0.1";
private static final String SDK_TOOLS = "25.1.1";
public static final String BUILD_TOOLS = "23.0.3";
private static final int ANDROID_VERSION = 19;
public static final String GRADLE_VERSION = "2.14.1";
public SDKDownloader(PathManager pathManager) {
this.pathManager = pathManager;
platformZipPath = pathManager.getRootForDownload() + "/platforms.zip";
armImage = pathManager.getRootForDownload() + "/arm-image.zip";
x86Image = pathManager.getRootForDownload() + "/x86-image.zip";
platformToolsZipPath = pathManager.getRootForDownload() + "/platform-tools.zip";
skdToolsZipPath = pathManager.getRootForDownload() + "/tools.zip";
buildToolsZipPath = pathManager.getRootForDownload() + "/build-tools.zip";
gradleZipPath = pathManager.getRootForDownload() + "/gradle.zip";
this.platformZipPath = pathManager.getRootForDownload() + "/platforms.zip";
this.systemImages = pathManager.getRootForDownload() + "/system-images.zip";
this.platformToolsZipPath = pathManager.getRootForDownload() + "/platform-tools.zip";
this.toolsZipPath = pathManager.getRootForDownload() + "/tools.zip";
}
public void downloadPlatform() {
download("https://dl-ssl.google.com/android/repository/android-" + ANDROID_VERSION + "_r04.zip", platformZipPath); //Same for all platforms
download("http://dl-ssl.google.com/android/repository/android-16_r04.zip", platformZipPath); //Same for all platforms
}
private void downloadAbi() {
download("https://dl.google.com/android/repository/sys-img/android/sysimg_armv7a-" + ANDROID_VERSION + "_r03.zip", armImage); //Same for all platforms
download("https://dl.google.com/android/repository/sys-img/android/sysimg_x86-" + ANDROID_VERSION + "_r03.zip", x86Image); //Same for all platforms
download("http://dl.google.com/android/repository/sysimg_armv7a-16_r03.zip", systemImages); //Same for all platforms
}
public void downloadPlatformTools() {
download(getDownloadUrl("https://dl-ssl.google.com/android/repository/platform-tools_r" + PLATFORM_TOOLS), platformToolsZipPath);
}
public void downloadSdkTools() {
download(getDownloadUrl("https://dl.google.com/android/repository/tools_r" + SDK_TOOLS), skdToolsZipPath);
}
public void downloadBuildTools() {
download(getDownloadUrl("https://dl.google.com/android/repository/build-tools_r" + BUILD_TOOLS), buildToolsZipPath);
}
public void downloadGradle() {
download("https://services.gradle.org/distributions/gradle-" + GRADLE_VERSION + "-bin.zip", gradleZipPath);
}
private static String getDownloadUrl(String prefix) {
String suffix;
String downloadURL;
if (SystemInfo.isWindows) {
suffix = "-windows.zip";
downloadURL = "http://dl-ssl.google.com/android/repository/platform-tools_r16-windows.zip";
}
else if (SystemInfo.isMac) {
suffix = "-macosx.zip";
downloadURL = "http://dl-ssl.google.com/android/repository/platform-tools_r16-macosx.zip";
}
else if (SystemInfo.isUnix) {
suffix = "-linux.zip";
downloadURL = "http://dl-ssl.google.com/android/repository/platform-tools_r16-linux.zip";
}
else {
throw new IllegalStateException("Your operating system doesn't supported yet.");
}
return prefix + suffix;
download(downloadURL, platformToolsZipPath);
}
public void downloadTools() {
String downloadURL;
if (SystemInfo.isWindows) {
downloadURL = "http://dl.google.com/android/repository/tools_r16-windows.zip";
}
else if (SystemInfo.isMac) {
downloadURL = "http://dl.google.com/android/repository/tools_r16-macosx.zip";
}
else if (SystemInfo.isUnix) {
downloadURL = "http://dl.google.com/android/repository/tools_r16-linux.zip";
}
else {
throw new IllegalStateException("Your operating system doesn't supported yet.");
}
download(downloadURL, toolsZipPath);
}
public void downloadAll() {
downloadSdkTools();
downloadTools();
downloadAbi();
downloadPlatform();
downloadPlatformTools();
downloadBuildTools();
downloadGradle();
}
public void unzipAll() {
String androidSdkRoot = pathManager.getAndroidSdkRoot();
unzip(platformZipPath, pathManager.getPlatformFolderInAndroidSdk());
new File(pathManager.getPlatformFolderInAndroidSdk() + "/android-4.4.2").renameTo(new File(pathManager.getPlatformFolderInAndroidSdk() + "/android-" + ANDROID_VERSION));
unzip(armImage, androidSdkRoot + "/system-images/android-" + ANDROID_VERSION + "/default/");
unzip(x86Image, androidSdkRoot + "/system-images/android-" + ANDROID_VERSION + "/default/");
unzip(platformToolsZipPath, androidSdkRoot);
unzip(skdToolsZipPath, androidSdkRoot);
unzip(gradleZipPath, pathManager.getDependenciesRoot());
//BUILD TOOLS
String buildTools = androidSdkRoot + "/build-tools/";
String buildToolsFolder = buildTools + BUILD_TOOLS + "/";
new File(buildToolsFolder).delete();
unzip(buildToolsZipPath, buildTools);
new File(buildTools + "/android-6.0").renameTo(new File(buildToolsFolder));
unzip(systemImages, pathManager.getAndroidSdkRoot() + "/system-images/android-16/");
unzip(platformToolsZipPath, pathManager.getAndroidSdkRoot());
unzip(toolsZipPath, pathManager.getAndroidSdkRoot());
}
public void deleteAll() {
delete(platformZipPath);
delete(platformToolsZipPath);
delete(skdToolsZipPath);
delete(buildToolsZipPath);
delete(armImage);
delete(x86Image);
delete(gradleZipPath);
delete(toolsZipPath);
}
private static void download(String urlString, String output) {

View File

@@ -24,7 +24,6 @@ import org.jetbrains.kotlin.android.tests.OutputUtils;
import org.jetbrains.kotlin.android.tests.PathManager;
import org.jetbrains.kotlin.android.tests.run.RunResult;
import org.jetbrains.kotlin.android.tests.run.RunUtils;
import org.junit.Assert;
import java.util.List;
import java.util.regex.Matcher;
@@ -32,17 +31,12 @@ import java.util.regex.Pattern;
public class Emulator {
public static final String ARM = "arm";
public static final String X86 = "x86";
private final static Pattern EMULATOR_PATTERN = Pattern.compile("emulator-([0-9])*");
private final PathManager pathManager;
private String platform;
public Emulator(PathManager pathManager, String platform) {
public Emulator(PathManager pathManager) {
this.pathManager = pathManager;
this.platform = platform;
}
private GeneralCommandLine getCreateCommand() {
@@ -58,16 +52,9 @@ public class Emulator {
commandLine.addParameter(pathManager.getAndroidEmulatorRoot());
commandLine.addParameter("-t");
commandLine.addParameter("1");
commandLine.addParameter("-b");
commandLine.addParameter(getEmulatorAbi());
return commandLine;
}
private String getEmulatorAbi(){
return platform == X86 ? "x86" : "armeabi-v7a";
}
private GeneralCommandLine getStartCommand() {
GeneralCommandLine commandLine = new GeneralCommandLine();
String emulatorCmdName = SystemInfo.isWindows ? "emulator.exe" : "emulator";
@@ -96,13 +83,13 @@ public class Emulator {
}
@Nullable
private GeneralCommandLine getStopCommand() {
private static GeneralCommandLine getStopCommand() {
if (SystemInfo.isWindows) {
GeneralCommandLine commandLine = new GeneralCommandLine();
commandLine.setExePath("taskkill");
commandLine.addParameter("/F");
commandLine.addParameter("/IM");
commandLine.addParameter("emulator-" + platform + ".exe");
commandLine.addParameter("emulator-arm.exe");
return commandLine;
}
return null;
@@ -113,18 +100,13 @@ public class Emulator {
OutputUtils.checkResult(RunUtils.execute(new RunUtils.RunSettings(getCreateCommand(), "no", true, null, false)));
}
private GeneralCommandLine createAdbCommand() {
public void startServer() {
GeneralCommandLine commandLine = new GeneralCommandLine();
String adbCmdName = SystemInfo.isWindows ? "adb.exe" : "adb";
commandLine.setExePath(pathManager.getPlatformToolsFolderInAndroidSdk() + "/" + adbCmdName);
return commandLine;
}
public void startServer() {
GeneralCommandLine commandLine = createAdbCommand();
commandLine.addParameter("start-server");
System.out.println("Start adb server...");
OutputUtils.checkResult(RunUtils.execute(new RunUtils.RunSettings(commandLine, null, true, "ADB START:", true)));
OutputUtils.checkResult(RunUtils.execute(commandLine));
}
public void startEmulator() {
@@ -135,61 +117,27 @@ public class Emulator {
}
public void printLog() {
GeneralCommandLine commandLine = createAdbCommand();
GeneralCommandLine commandLine = new GeneralCommandLine();
String adbCmdName = SystemInfo.isWindows ? "adb.exe" : "adb";
commandLine.setExePath(pathManager.getPlatformToolsFolderInAndroidSdk() + "/" + adbCmdName);
commandLine.addParameter("logcat");
commandLine.addParameter("-v");
commandLine.addParameter("time");
commandLine.addParameter("-s");
commandLine.addParameter("dalvikvm:W");
commandLine.addParameter("TestRunner:I");
commandLine.addParameter("*:I");
RunUtils.executeOnSeparateThread(new RunUtils.RunSettings(commandLine, null, false, "LOGCAT: ", true));
}
public void waitEmulatorStart() {
System.out.println("Waiting for emulator start...");
OutputUtils.checkResult(RunUtils.execute(getWaitCommand()));
GeneralCommandLine bootCheckCommand = createAdbCommand();
bootCheckCommand.addParameter("shell");
bootCheckCommand.addParameter("getprop");
bootCheckCommand.addParameter("sys.boot_completed");
int counter = 0;
RunResult execute = RunUtils.execute(bootCheckCommand);
while (counter < 12) {
String output = execute.getOutput();
if (output.trim().endsWith("1")) {
System.out.println("Emulator fully booted!");
return;
}
System.out.println("Waiting for emulator boot (" + counter + ")...");
try {
Thread.sleep(10000);
}
catch (InterruptedException e) {
e.printStackTrace();
}
counter++;
execute = RunUtils.execute(bootCheckCommand);
}
Assert.fail("Can't find booted emulator: " + execute.getOutput());
}
public void stopEmulator() {
System.out.println("Stopping emulator...");
GeneralCommandLine command = createAdbCommand();
command.addParameter("-s");
command.addParameter("emulator-5554");
command.addParameter("emu");
command.addParameter("kill");
RunUtils.execute(command);
if (SystemInfo.isWindows) {
//TODO check that command above works on windows and remove this
OutputUtils.checkResult(RunUtils.execute(getStopCommand()));
}
finishProcess("emulator64-" + platform);
finishProcess("emulator-" + platform);
finishProcess("emulator-arm");
}
//Only for Unix
@@ -230,25 +178,16 @@ public class Emulator {
for (String pid : processIds) {
GeneralCommandLine killCommand = new GeneralCommandLine();
killCommand.setExePath("kill");
killCommand.addParameter("-s");
killCommand.addParameter("9");
killCommand.addParameter(pid);
RunUtils.execute(killCommand);
}
}
}
public String runTestsViaAdb() {
System.out.println("Running tests via adb...");
GeneralCommandLine adbCommand = createAdbCommand();
//adb shell am instrument -w -r org.jetbrains.kotlin.android.tests/android.test.InstrumentationTestRunner
adbCommand.addParameters("shell", "am", "instrument", "-w", "-r", "org.jetbrains.kotlin.android.tests/android.test.InstrumentationTestRunner");
RunResult execute = RunUtils.execute(adbCommand);
return execute.getOutput();
}
private void stopRedundantEmulators(PathManager pathManager) {
GeneralCommandLine commandLineForListOfDevices = createAdbCommand();
GeneralCommandLine commandLineForListOfDevices = new GeneralCommandLine();
String adbCmdName = SystemInfo.isWindows ? "adb.exe" : "adb";
commandLineForListOfDevices.setExePath(pathManager.getPlatformToolsFolderInAndroidSdk() + "/" + adbCmdName);
commandLineForListOfDevices.addParameter("devices");
RunResult runResult = RunUtils.execute(commandLineForListOfDevices);
OutputUtils.checkResult(runResult);
@@ -268,7 +207,7 @@ public class Emulator {
}
else {
if (!isDdmsStopped && SystemInfo.isUnix) {
stopEmulator();
finishProcess("emulator-arm");
stopDdmsProcess();
isDdmsStopped = true;
}

View File

@@ -1,76 +0,0 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests.gradle;
import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.openapi.util.SystemInfo;
import org.jetbrains.kotlin.android.tests.OutputUtils;
import org.jetbrains.kotlin.android.tests.PathManager;
import org.jetbrains.kotlin.android.tests.run.RunResult;
import org.jetbrains.kotlin.android.tests.run.RunUtils;
import java.util.ArrayList;
import java.util.List;
public class GradleRunner {
private final List<String> listOfCommands;
public GradleRunner(PathManager pathManager) {
listOfCommands = new ArrayList<String>();
String cmdName = SystemInfo.isWindows ? "gradle.bat" : "gradle";
listOfCommands.add(pathManager.getGradleBinFolder() + "/" + cmdName);
listOfCommands.add("--build-file");
listOfCommands.add(pathManager.getTmpFolder() + "/build.gradle");
}
public void clean() {
System.out.println("Building gradle project...");
RunResult result = RunUtils.execute(generateCommandLine("clean"));
OutputUtils.checkResult(result);
}
public void build() {
System.out.println("Building gradle project...");
RunResult result = RunUtils.execute(generateCommandLine("build"));
OutputUtils.checkResult(result);
}
public void installDebugAndroidTest() {
System.out.println("Install tests...");
OutputUtils.checkResult(RunUtils.execute(generateCommandLine("installDebug")));
OutputUtils.checkResult(RunUtils.execute(generateCommandLine("installDebugAndroidTest")));
}
public void uninstallDebugAndroidTest() {
System.out.println("Uninstall tests...");
RunUtils.execute(generateCommandLine("uninstallDebugAndroidTest"));
RunUtils.execute(generateCommandLine("uninstallDebug"));
}
public String connectedDebugAndroidTest() {
System.out.println("Starting tests...");
RunResult result = RunUtils.execute(generateCommandLine("connectedAndroidTest"));
return result.getOutput();
}
private GeneralCommandLine generateCommandLine(String taskName) {
GeneralCommandLine commandLine = new GeneralCommandLine(listOfCommands);
commandLine.addParameter(taskName);
return commandLine;
}
}

View File

@@ -19,9 +19,6 @@ package org.jetbrains.kotlin.android.tests.run;
import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.openapi.util.SystemInfo;
import org.jetbrains.kotlin.android.tests.PathManager;
import org.jetbrains.kotlin.android.tests.download.SDKDownloader;
import java.io.File;
public class PermissionManager {
private PermissionManager() {
@@ -29,30 +26,22 @@ public class PermissionManager {
public static void setPermissions(PathManager pathManager) {
if (!SystemInfo.isWindows) {
RunUtils.execute(generateChmodCmd(pathManager.getPlatformToolsFolderInAndroidSdk() + "/aapt"));
RunUtils.execute(generateChmodCmd(pathManager.getPlatformToolsFolderInAndroidSdk() + "/adb"));
RunUtils.execute(generateChmodCmd(pathManager.getPlatformToolsFolderInAndroidSdk() + "/dx"));
RunUtils.execute(generateChmodCmd(pathManager.getToolsFolderInAndroidSdk() + "/emulator"));
RunUtils.execute(generateChmodCmd(pathManager.getToolsFolderInAndroidSdk() + "/ddms"));
RunUtils.execute(generateChmodCmd(pathManager.getToolsFolderInAndroidSdk() + "/android"));
RunUtils.execute(generateChmodCmd(pathManager.getToolsFolderInAndroidSdk() + "/emulator-arm"));
RunUtils.execute(generateChmodCmd(pathManager.getToolsFolderInAndroidSdk() + "/zipalign"));
RunUtils.execute(generateChmodCmd(pathManager.getAntBinDirectory() + "/ant"));
setExecPermissionForSimpleNamedFiles(new File(pathManager.getToolsFolderInAndroidSdk()));
setExecPermissionForSimpleNamedFiles(new File(pathManager.getToolsFolderInAndroidSdk() + "/bin64"));
setExecPermissionForSimpleNamedFiles(new File(pathManager.getBuildToolsFolderInAndroidSdk() + "/" + SDKDownloader.BUILD_TOOLS));
setExecPermissionForSimpleNamedFiles(new File(pathManager.getPlatformToolsFolderInAndroidSdk()));
RunUtils.execute(generateChmodCmd(pathManager.getGradleBinFolder() + "/gradle"));
}
}
private static void setExecPermissionForSimpleNamedFiles(File folder) {
File[] files = folder.listFiles();
if (files != null) {
for (File file : files) {
if (file.isFile() && !file.getName().contains(".")) {
RunUtils.execute(generateChmodCmd(file.getAbsolutePath()));
}
}
}
}
private static GeneralCommandLine generateChmodCmd(String path) {
GeneralCommandLine commandLine = new GeneralCommandLine();
commandLine.setExePath("chmod");
commandLine.addParameter("a+x");
commandLine.addParameter("u+x");
commandLine.addParameter(path);
return commandLine;
}

View File

@@ -16,12 +16,12 @@
package org.jetbrains.kotlin.android.tests;
import org.jetbrains.kotlin.jps.build.BaseKotlinJpsBuildTestCase;
import org.jetbrains.jps.builders.JpsBuildTestCase;
import java.io.File;
import java.io.IOException;
public class AndroidJpsBuildTestCase extends BaseKotlinJpsBuildTestCase {
public class AndroidJpsBuildTestCase extends JpsBuildTestCase {
private static final String PROJECT_NAME = "android-module";
private static final String SDK_NAME = "Android_SDK";

View File

@@ -22,8 +22,6 @@ import junit.framework.TestSuite;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class AndroidRunner extends TestSuite {
@@ -44,15 +42,12 @@ public class AndroidRunner extends TestSuite {
PathManager pathManager = getPathManager();
FileUtil.copyDir(new File(pathManager.getAndroidModuleRoot()), new File(pathManager.getTmpFolder()));
writeAndroidSkdToLocalProperties();
CodegenTestsOnAndroidGenerator.generate(pathManager);
System.out.println("Run tests on android...");
TestSuite suite = CodegenTestsOnAndroidRunner.getTestSuite(pathManager);
//AndroidJpsBuildTestCase indirectly depends on UsefulTestCase which compiled against java 8
//TODO: Need add separate run configuration for AndroidJpsBuildTestCase
//suite.addTest(new AndroidJpsBuildTestCase());
suite.addTest(new AndroidJpsBuildTestCase());
return suite;
}
@@ -60,15 +55,4 @@ public class AndroidRunner extends TestSuite {
// Clear tmp folder where we run android tests
FileUtil.delete(new File(pathManager.getTmpFolder()));
}
private static void writeAndroidSkdToLocalProperties() throws IOException {
System.out.println("Writing android sdk to local.properties: " + pathManager.getAndroidSdkRoot());
File file = new File(pathManager.getTmpFolder() + "/local.properties");
FileWriter fw = new FileWriter(file);
try {
fw.write("sdk.dir=" + pathManager.getAndroidSdkRoot());
} finally {
fw.close();
}
}
}

View File

@@ -1,164 +0,0 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.android.tests
import com.intellij.openapi.util.Ref
import org.jetbrains.kotlin.codegen.CodegenTestCase
import org.jetbrains.kotlin.load.kotlin.PackagePartClassUtils
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.test.KotlinTestUtils
import java.io.File
import java.util.regex.Pattern
private val FILE_NAME_ANNOTATIONS = arrayOf("@file:JvmName", "@file:kotlin.jvm.JvmName")
private val packagePattern = Pattern.compile("(?m)^\\s*package[ |\t]+([\\w|\\.]*)")
private val importPattern = Pattern.compile("import[ |\t]([\\w|]*\\.)")
internal fun genFiles(file: File, fileContent: String, filesHolder: CodegenTestsOnAndroidGenerator.FilesWriter): FqName? {
val testFiles = createTestFiles(file, fileContent)
if (testFiles.filter { it.name.endsWith(".java") }.isNotEmpty()) {
//TODO support java files
return null;
}
val ktFiles = testFiles.filter { it.name.endsWith(".kt") }
if (ktFiles.isEmpty()) return null
val newPackagePrefix = file.path.replace("\\\\|-|\\.|/".toRegex(), "_")
val oldPackage = Ref<FqName>()
val isSingle = testFiles.size == 1
val resultFiles = testFiles.map {
val fileName = if (isSingle) it.name else file.name.substringBeforeLast(".kt") + "/" + it.name
TestClassInfo(
fileName,
changePackage(newPackagePrefix, it.content, oldPackage),
oldPackage.get(),
getGeneratedClassName(File(fileName), it.content, newPackagePrefix, oldPackage.get())
)
}
/*replace all Class.forName*/
resultFiles.forEach {
file ->
file.content = resultFiles.fold(file.content) { r, param ->
patchClassForName(param.newClassId, param.oldPackage, r)
}
}
/*patch imports and self imports*/
resultFiles.forEach {
file ->
file.content = resultFiles.fold(file.content) { r, param ->
r.patchImports(param.oldPackage, param.newPackage)
}.patchSelfImports(file.newPackage)
}
resultFiles.forEach { resultFile ->
if (resultFile.name.endsWith(".kt") || resultFile.name.endsWith(".kts")) {
filesHolder.addFile(resultFile.name, resultFile.content)
}
}
val boxFiles = resultFiles.filter { hasBoxMethod(it.content) }
if (boxFiles.size != 1) {
println("Several box methods in $file")
}
return boxFiles.last().newClassId
}
private fun createTestFiles(file: File, expectedText: String): List<CodegenTestCase.TestFile> {
val files = KotlinTestUtils.createTestFiles(file.name, expectedText, object : KotlinTestUtils.TestFileFactoryNoModules<CodegenTestCase.TestFile>() {
override fun create(fileName: String, text: String, directives: Map<String, String>): CodegenTestCase.TestFile {
return CodegenTestCase.TestFile(fileName, text)
}
})
return files
}
private fun hasBoxMethod(text: String): Boolean {
return text.contains("fun box()")
}
class TestClassInfo(val name: String, var content: String, val oldPackage: FqName, val newClassId: FqName) {
val newPackage = newClassId.parent()
}
private fun changePackage(newPackagePrefix: String, text: String, oldPackage: Ref<FqName>): String {
val matcher = packagePattern.matcher(text)
if (matcher.find()) {
val oldPackageName = matcher.toMatchResult().group(1)
oldPackage.set(FqName(oldPackageName))
return matcher.replaceAll("package $newPackagePrefix.$oldPackageName")
}
else {
oldPackage.set(FqName.ROOT)
val packageDirective = "package $newPackagePrefix;\n"
if (text.contains("@file:")) {
val index = text.lastIndexOf("@file:")
val packageDirectiveIndex = text.indexOf("\n", index)
return text.substring(0, packageDirectiveIndex + 1) + packageDirective + text.substring(packageDirectiveIndex + 1)
}
else {
return packageDirective + text
}
}
}
private fun getGeneratedClassName(file: File, text: String, newPackagePrefix: String, oldPackage: FqName): FqName {
//TODO support multifile facades
var packageFqName = FqName(newPackagePrefix)
if (!oldPackage.isRoot) {
packageFqName = packageFqName.child(Name.identifier(oldPackage.asString()))
}
for (annotation in FILE_NAME_ANNOTATIONS) {
if (text.contains(annotation)) {
val indexOf = text.indexOf(annotation)
val annotationParameter = text.substring(text.indexOf("(\"", indexOf) + 2, text.indexOf("\")", indexOf))
return packageFqName.child(Name.identifier(annotationParameter))
}
}
return PackagePartClassUtils.getPackagePartFqName(packageFqName, file.name)
}
private fun patchClassForName(className: FqName, oldPackage: FqName, text: String): String {
return text.replace(("Class\\.forName\\(\"" + oldPackage.child(className.shortName()).asString() + "\"\\)").toRegex(), "Class.forName(\"" + className.asString() + "\")")
}
private fun String.patchImports(oldPackage: FqName, newPackage: FqName): String {
if (oldPackage.isRoot) return this
return this.replace(("import\\s+" + oldPackage.asString()).toRegex(), "import " + newPackage.asString())
}
private fun String.patchSelfImports(newPackage: FqName): String {
var newText = this;
val matcher = importPattern.matcher(this)
while (matcher.find()) {
val possibleSelfImport = matcher.toMatchResult().group(1)
val classOrObjectPattern = Pattern.compile("[\\s|^](class|object)\\s$possibleSelfImport[\\s|\\(|{|;|:]")
if (classOrObjectPattern.matcher(newText).find()) {
newText = newText.replace("import " + possibleSelfImport, "import " + newPackage.child(Name.identifier(possibleSelfImport)).asString())
}
}
return newText
}

View File

@@ -20,23 +20,20 @@ import com.google.common.collect.Lists;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.io.FileUtilRt;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.testFramework.UsefulTestCase;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.kotlin.backend.common.output.OutputFileCollection;
import org.jetbrains.kotlin.cli.common.output.outputUtils.OutputUtilsKt;
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles;
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment;
import org.jetbrains.kotlin.codegen.CodegenTestFiles;
import org.jetbrains.kotlin.codegen.GenerationUtils;
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime;
import org.jetbrains.kotlin.config.CommonConfigurationKeys;
import org.jetbrains.kotlin.config.CompilerConfiguration;
import org.jetbrains.kotlin.config.JVMConfigurationKeys;
import org.jetbrains.kotlin.generators.tests.generator.TestGeneratorUtil;
import org.jetbrains.kotlin.idea.KotlinFileType;
import org.jetbrains.kotlin.name.FqName;
import org.jetbrains.kotlin.name.NameUtils;
import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.test.*;
import org.jetbrains.kotlin.test.testFramework.KtUsefulTestCase;
import org.jetbrains.kotlin.test.ConfigurationKind;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestJdkKind;
import org.jetbrains.kotlin.utils.Printer;
import org.junit.Assert;
@@ -44,8 +41,10 @@ import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class CodegenTestsOnAndroidGenerator extends KtUsefulTestCase {
public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
private final PathManager pathManager;
private static final String testClassPackage = "org.jetbrains.kotlin.android.tests";
@@ -54,7 +53,7 @@ public class CodegenTestsOnAndroidGenerator extends KtUsefulTestCase {
private static final String baseTestClassName = "AbstractCodegenTestCaseOnAndroid";
private static final String generatorName = "CodegenTestsOnAndroidGenerator";
private static int MODULE_INDEX = 1;
private final Pattern packagePattern = Pattern.compile("package (.*)");
private final List<String> generatedTestNames = Lists.newArrayList();
@@ -91,11 +90,6 @@ public class CodegenTestsOnAndroidGenerator extends KtUsefulTestCase {
ForTestCompileRuntime.reflectJarForTests(),
new File(pathManager.getLibsFolderInAndroidTmpFolder() + "/kotlin-reflect.jar")
);
FileUtil.copy(
ForTestCompileRuntime.kotlinTestJarForTests(),
new File(pathManager.getLibsFolderInAndroidTmpFolder() + "/kotlin-test.jar")
);
}
private void generateAndSave() throws Throwable {
@@ -112,7 +106,7 @@ public class CodegenTestsOnAndroidGenerator extends KtUsefulTestCase {
p.println("public class ", testClassName, " extends ", baseTestClassName, " {");
p.pushIndent();
generateTestMethodsForDirectories(p, new File("compiler/testData/codegen/box"), new File("compiler/testData/codegen/boxInline"));
generateTestMethodsForDirectories(p, new File("compiler/testData/codegen/box"), new File("compiler/testData/codegen/boxWithStdlib"));
p.popIndent();
p.println("}");
@@ -123,44 +117,36 @@ public class CodegenTestsOnAndroidGenerator extends KtUsefulTestCase {
}
private void generateTestMethodsForDirectories(Printer p, File... dirs) throws IOException {
FilesWriter holderMock = new FilesWriter(false, false);
FilesWriter holderFull = new FilesWriter(true, false);
FilesWriter holderInheritMFP = new FilesWriter(true, true);
FilesWriter holderMock = new FilesWriter(false);
FilesWriter holderFull = new FilesWriter(true);
for (File dir : dirs) {
File[] files = dir.listFiles();
Assert.assertNotNull("Folder with testData is empty: " + dir.getAbsolutePath(), files);
processFiles(p, files, holderFull, holderMock, holderInheritMFP);
processFiles(p, files, holderFull, holderMock);
}
holderFull.writeFilesOnDisk();
holderMock.writeFilesOnDisk();
holderInheritMFP.writeFilesOnDisk();
}
class FilesWriter {
private final boolean isFullJdkAndRuntime;
private final boolean inheritMultifileParts;
private class FilesWriter {
private final boolean isFullJdk;
public List<KtFile> files = new ArrayList<KtFile>();
private KotlinCoreEnvironment environment;
private FilesWriter(boolean isFullJdkAndRuntime, boolean inheritMultifileParts) {
this.isFullJdkAndRuntime = isFullJdkAndRuntime;
this.inheritMultifileParts = inheritMultifileParts;
this.environment = createEnvironment(isFullJdkAndRuntime);
private FilesWriter(boolean isFullJdk) {
this.isFullJdk = isFullJdk;
environment = createEnvironment(isFullJdk);
}
private KotlinCoreEnvironment createEnvironment(boolean isFullJdkAndRuntime) {
ConfigurationKind configurationKind = isFullJdkAndRuntime ? ConfigurationKind.ALL : ConfigurationKind.NO_KOTLIN_REFLECT;
TestJdkKind testJdkKind = isFullJdkAndRuntime ? TestJdkKind.FULL_JDK : TestJdkKind.MOCK_JDK;
CompilerConfiguration configuration =
KotlinTestUtils.newConfiguration(configurationKind, testJdkKind, KotlinTestUtils.getAnnotationsJar());
configuration.put(CommonConfigurationKeys.MODULE_NAME, "android-module-" + MODULE_INDEX++);
if (inheritMultifileParts) {
configuration.put(JVMConfigurationKeys.INHERIT_MULTIFILE_PARTS, true);
}
return KotlinCoreEnvironment.createForTests(myTestRootDisposable, configuration, EnvironmentConfigFiles.JVM_CONFIG_FILES);
private KotlinCoreEnvironment createEnvironment(boolean isFullJdk) {
return isFullJdk ?
KotlinTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea(
myTestRootDisposable, ConfigurationKind.ALL, TestJdkKind.FULL_JDK
) :
KotlinTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable);
}
public boolean shouldWriteFilesOnDisk() {
@@ -176,28 +162,15 @@ public class CodegenTestsOnAndroidGenerator extends KtUsefulTestCase {
public void writeFilesOnDisk() {
writeFiles(files);
files = new ArrayList<KtFile>();
environment = createEnvironment(isFullJdkAndRuntime);
}
public void addFile(String name, String content) {
try {
files.add(CodegenTestFiles.create(name, content, environment.getProject()).getPsiFile());
}
catch (Throwable e) {
throw new RuntimeException("Problem during creating file " + name + ": \n" + content, e);
}
environment = createEnvironment(isFullJdk);
}
private void writeFiles(List<KtFile> filesToCompile) {
if (filesToCompile.isEmpty()) return;
System.out.println("Generating " + filesToCompile.size() + " files" +
(inheritMultifileParts
? " (JVM.INHERIT_MULTIFILE_PARTS)"
: isFullJdkAndRuntime ? " (full jdk and runtime)" : "") + "...");
System.out.println("Generating " + filesToCompile.size() + " files...");
OutputFileCollection outputFiles;
try {
outputFiles = GenerationUtils.compileFiles(filesToCompile, environment).getFactory();
outputFiles = GenerationUtils
.compileManyFilesGetGenerationStateForTest(filesToCompile.iterator().next().getProject(), filesToCompile).getFactory();
}
catch (Throwable e) {
throw new RuntimeException(e);
@@ -217,12 +190,12 @@ public class CodegenTestsOnAndroidGenerator extends KtUsefulTestCase {
@NotNull Printer printer,
@NotNull File[] files,
@NotNull FilesWriter holderFull,
@NotNull FilesWriter holderMock,
@NotNull FilesWriter holderInheritMFP
) throws IOException {
@NotNull FilesWriter holderMock)
throws IOException
{
holderFull.writeFilesOnDiskIfNeeded();
holderMock.writeFilesOnDiskIfNeeded();
holderInheritMFP.writeFilesOnDiskIfNeeded();
for (File file : files) {
if (SpecialFiles.getExcludedFiles().contains(file.getName())) {
@@ -231,60 +204,60 @@ public class CodegenTestsOnAndroidGenerator extends KtUsefulTestCase {
if (file.isDirectory()) {
File[] listFiles = file.listFiles();
if (listFiles != null) {
processFiles(printer, listFiles, holderFull, holderMock, holderInheritMFP);
processFiles(printer, listFiles, holderFull, holderMock);
}
}
else if (!FileUtilRt.getExtension(file.getName()).equals(KotlinFileType.INSTANCE.getDefaultExtension())) {
// skip non kotlin files
}
else {
String fullFileText = FileUtil.loadFile(file, true);
if (!InTextDirectivesUtils.isPassingTarget(TargetBackend.JVM, file)) {
continue;
}
//TODO: support LANGUAGE_VERSION
if (InTextDirectivesUtils.isDirectiveDefined(fullFileText, "LANGUAGE_VERSION:")) {
continue;
}
//TODO: support multifile facades
//TODO: support multifile facades hierarchies
if (hasBoxMethod(fullFileText)) {
FilesWriter filesHolder = InTextDirectivesUtils.isDirectiveDefined(fullFileText, "FULL_JDK") ||
InTextDirectivesUtils.isDirectiveDefined(fullFileText, "WITH_RUNTIME") ||
InTextDirectivesUtils.isDirectiveDefined(fullFileText, "WITH_REFLECT") ? holderFull : holderMock;
filesHolder = fullFileText.contains("+JVM.INHERIT_MULTIFILE_PARTS") ? holderInheritMFP : filesHolder;
FqName classWithBoxMethod = AndroidTestGeneratorKt.genFiles(file, fullFileText, filesHolder);
if (classWithBoxMethod == null)
continue;
String text = FileUtil.loadFile(file, true);
if (hasBoxMethod(text)) {
String generatedTestName = generateTestName(file.getName());
generateTestMethod(printer, generatedTestName, classWithBoxMethod.asString(), StringUtil.escapeStringCharacters(file.getPath()));
String packageName = file.getPath().replaceAll("\\\\|-|\\.|/", "_");
text = changePackage(packageName, text);
if (!file.getCanonicalPath().contains("boxWithStdlib")) {
CodegenTestFiles codegenFile = CodegenTestFiles.create(file.getName(), text, holderMock.environment.getProject());
holderMock.files.add(codegenFile.getPsiFile());
}
else {
CodegenTestFiles codegenFile = CodegenTestFiles.create(file.getName(), text, holderFull.environment.getProject());
holderFull.files.add(codegenFile.getPsiFile());
}
generateTestMethod(printer, generatedTestName, StringUtil.escapeStringCharacters(file.getPath()));
}
}
}
}
private static boolean hasBoxMethod(String text) {
return text.contains("fun box()");
}
private static void generateTestMethod(Printer p, String testName, String className, String filePath) {
private String changePackage(String testName, String text) {
if (text.contains("package ")) {
Matcher matcher = packagePattern.matcher(text);
return matcher.replaceAll("package " + testName);
}
else {
return "package " + testName + ";\n" + text;
}
}
private static void generateTestMethod(Printer p, String testName, String packageName) {
p.println("public void test" + testName + "() throws Exception {");
p.pushIndent();
p.println("invokeBoxMethod(" + className + ".class, \"" + filePath + "\", \"OK\");");
p.println("invokeBoxMethod(\"" + packageName + "\", \"OK\");");
p.popIndent();
p.println("}");
p.println();
}
private String generateTestName(String fileName) {
String result = NameUtils.sanitizeAsJavaIdentifier(FileUtil.getNameWithoutExtension(StringUtil.capitalize(fileName)));
String result = TestGeneratorUtil.escapeForJavaIdentifier(FileUtil.getNameWithoutExtension(StringUtil.capitalize(fileName)));
int i = 0;
while (generatedTestNames.contains(result)) {

View File

@@ -22,97 +22,54 @@ import java.util.Set;
public class SpecialFiles {
private static final Set<String> excludedFiles = Sets.newHashSet();
private static final Set<String> filesCompiledWithoutStdLib = Sets.newHashSet();
static {
fillExcludedFiles();
}
public static Set<String> getExcludedFiles() {
return excludedFiles;
}
private static void fillExcludedFiles() {
// Reflection
excludedFiles.add("enclosing");
excludedFiles.add("noReflectAtRuntime");
excludedFiles.add("methodsFromAny");
excludedFiles.add("genericProperty.kt");
excludedFiles.add("kt3238.kt");
excludedFiles.add("kt1482_2279.kt");
excludedFiles.add("extensionMethod.kt");
excludedFiles.add("functionNtoStringNoReflect.kt");
excludedFiles.add("innerGeneric.kt");
excludedFiles.add("simpleCreateType.kt");
excludedFiles.add("equalsHashCodeToString.kt");
excludedFiles.add("arrayOfKClasses.kt");
excludedFiles.add("enumKClassAnnotation.kt");
excludedFiles.add("primitivesAndArrays.kt");
excludedFiles.add("native"); // Reflection is used to check full class name
// Reflection is used to check full class name
excludedFiles.add("native");
excludedFiles.add("reflection");
excludedFiles.add("kt3238.kt"); // Reflection
excludedFiles.add("kt1482_2279.kt"); // Reflection
// "IOOBE: Invalid index 4, size is 4" for java.lang.reflect.ParameterizedType on Android
excludedFiles.add("innerGenericTypeArgument.kt");
excludedFiles.add("nestedInPackage.kt"); // Cannot change package name
excludedFiles.add("importNestedClass.kt"); // Cannot change package name
excludedFiles.add("packageQualifiedMethod.kt"); // Cannot change package name
excludedFiles.add("classObjectToString.kt"); // Cannot change package name
excludedFiles.add("invokeOnClassObjectOfNestedClass2.kt"); // Cannot change package name
excludedFiles.add("invokeOnImportedEnum1.kt"); // Cannot change package name
excludedFiles.add("invokeOnImportedEnum2.kt"); // Cannot change package name
excludedFiles.add("sortEnumEntries.kt"); // Cannot change package name
excludedFiles.add("assertionStackTrace.kt"); // Cannot change package name
excludedFiles.add("anonymousObjectReifiedSupertype.kt"); // Cannot change package name
excludedFiles.add("innerAnonymousObject.kt"); // Cannot change package name
excludedFiles.add("nestedReifiedSignature.kt"); // Cannot change package name
excludedFiles.add("recursiveInnerAnonymousObject.kt"); // Cannot change package name
// Cannot change package name
excludedFiles.add("nestedInPackage.kt");
excludedFiles.add("packageQualifiedMethod.kt");
excludedFiles.add("classObjectToString.kt");
excludedFiles.add("assertionStackTrace.kt");
excludedFiles.add("anonymousObjectReifiedSupertype.kt");
excludedFiles.add("innerAnonymousObject.kt");
excludedFiles.add("nestedReifiedSignature.kt");
excludedFiles.add("recursiveInnerAnonymousObject.kt");
excludedFiles.add("approximateCapturedTypes.kt");
excludedFiles.add("classForEnumEntry.kt");
excludedFiles.add("kt10143.kt");
excludedFiles.add("internalTopLevelOtherPackage.kt");
excludedFiles.add("noPrivateDelegation.kt");
excludedFiles.add("platformTypeAssertionStackTrace.kt");
excludedFiles.add("packages.kt");
excludedFiles.add("kt10259.kt");
excludedFiles.add("kt11081.kt");
excludedFiles.add("kt6990.kt");
excludedFiles.add("mainInFiles.kt");
excludedFiles.add("noClassForSimpleEnum.kt");
excludedFiles.add("simpleClassLiteral.kt");
excludedFiles.add("jvmName.kt");
excludedFiles.add("qualifiedName.kt");
excludedFiles.add("topLevelProperty.kt");
excludedFiles.add("typeParameters.kt");
excludedFiles.add("kt13133.kt");
excludedFiles.add("genericOverriddenFunction.kt");
excludedFiles.add("genericOverriddenProperty.kt");
excludedFiles.add("genericProperty.kt");
excludedFiles.add("kt684.kt"); // StackOverflow with StringBuilder (escape())
// StackOverflow with StringBuilder (escape())
excludedFiles.add("kt684.kt");
excludedFiles.add("kt529.kt"); // Bug
excludedFiles.add("kt344.kt"); // Bug
// Wrong enclosing info or signature after package renaming
excludedFiles.add("enclosingInfo");
excludedFiles.add("signature");
excludedFiles.add("genericBackingFieldSignature.kt");
excludedFiles.add("genericMethodSignature.kt");
excludedFiles.add("kt11121.kt");
excludedFiles.add("kt5112.kt");
excludedFiles.add("comparisonWithNullCallsFun.kt"); // java.lang.NoClassDefFoundError: kotlin.Nothing
excludedFiles.add("kt3574.kt"); // java.lang.NoClassDefFoundError: kotlin.Nothing
// Some classes are not visible on android
excludedFiles.add("classpath.kt");
excludedFiles.add("genericBackingFieldSignature.kt"); // Wrong signature after package renaming
excludedFiles.add("genericMethodSignature.kt"); // Wrong signature after package renaming
// Out of memory
excludedFiles.add("manyNumbers.kt");
excludedFiles.add("classpath.kt"); // Some classes are not visible on android
// Native methods
excludedFiles.add("external");
excludedFiles.add("manyNumbers.kt"); // Out of memory
// Additional nested class in 'Thread' class on Android
excludedFiles.add("nestedClasses.kt");
// No 'modifiers' field in 'java.lang.reflect.Field' class
excludedFiles.add("kt12200Const.kt");
// KT-8120
excludedFiles.add("closureOfInnerLocalClass.kt");
excludedFiles.add("closureWithSelfInstantiation.kt");
excludedFiles.add("smap"); // Line numbers
}
private SpecialFiles() {

Some files were not shown because too many files have changed in this diff Show More