README.md
1The Apache 2 license (given in full in [LICENSE.txt](LICENSE.txt)) applies to all code in this repository which is copyright
2by JetBrains. The following sections of the repository contain third-party code, to which different licenses
3may apply:
4
5## Kotlin Compiler
6
7The following modules contain third-party code and are incorporated into the Kotlin compiler and/or
8the Kotlin IntelliJ IDEA plugin:
9
10 - Path: compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MaxStackFrameSizeAndLocalsCalculator.java
11 - License: BSD ([license/third_party/asm_license.txt][asm])
12 - Origin: Derived from ASM: a very small and fast Java bytecode manipulation framework, Copyright (c) 2000-2011 INRIA, France Telecom
13
14 - Path: compiler/backend/src/org/jetbrains/kotlin/codegen/inline/MaxLocalsCalculator.java
15 - License: BSD ([license/third_party/asm_license.txt][asm])
16 - Origin: Derived from ASM: a very small and fast Java bytecode manipulation framework, Copyright (c) 2000-2011 INRIA, France Telecom
17
18 - Path: compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/common/FastMethodAnalyzer.kt
19 - License: BSD ([license/third_party/asm_license.txt][asm])
20 - Origin: Derived from ASM: a very small and fast Java bytecode manipulation framework, Copyright (c) 2000-2011 INRIA, France Telecom
21
22 - Path: compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/common/InstructionLivenessAnalyzer.kt
23 - License: BSD ([license/third_party/asm_license.txt][asm])
24 - Origin: Derived from ASM: a very small and fast Java bytecode manipulation framework, Copyright (c) 2000-2011 INRIA, France Telecom
25
26 - Path: compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/common/ControlFlowGraph.kt
27 - License: BSD ([license/third_party/asm_license.txt][asm])
28 - Origin: Derived from ASM: a very small and fast Java bytecode manipulation framework, Copyright (c) 2000-2011 INRIA, France Telecom
29
30 - Path: compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/fixStack/FastStackAnalyzer.kt
31 - License: BSD ([license/third_party/asm_license.txt][asm])
32 - Origin: Derived from ASM: a very small and fast Java bytecode manipulation framework, Copyright (c) 2000-2011 INRIA, France Telecom
33
34 - Path: compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/temporaryVals/FastStoreLoadAnalyzer.kt
35 - License: BSD ([license/third_party/asm_license.txt][asm])
36 - Origin: Derived from ASM: a very small and fast Java bytecode manipulation framework, Copyright (c) 2000-2011 INRIA, France Telecom
37
38 - Path: core/reflection.jvm/src/kotlin.reflect/jvm/internal/pcollections
39 - License: MIT ([license/third_party/pcollections_LICENSE.txt][pcollections])
40 - Origin: Derived from PCollections, A Persistent Java Collections Library (https://pcollections.org/)
41
42 - Path: eval4j/src/org/jetbrains/eval4j/interpreterLoop.kt
43 - License: BSD ([license/third_party/asm_license.txt][asm])
44 - Origin: Derived from ASM: a very small and fast Java bytecode manipulation framework, Copyright (c) 2000-2011 INRIA, France Telecom
45
46 - Path: compiler/backend/src/org/jetbrains/kotlin/codegen/optimization/common/OptimizationBasicInterpreter.java
47 - License: BSD ([license/third_party/asm_license.txt][asm])
48 - Origin: Derived from ASM: a very small and fast Java bytecode manipulation framework, Copyright (c) 2000-2011 INRIA, France Telecom
49
50 - Path: js/js.ast
51 - License: BSD ([license/third_party/dart_LICENSE.txt][dart])
52 - Origin: Originally part of the Dart compiler, (c) 2011 the Dart Project Authors,
53
54 - Path: js/js.inliner/src/org/jetbrains/kotlin/js/inline/FunctionInlineMutator.kt
55 - License: BSD ([license/third_party/dart_LICENSE.txt][dart])
56 - Origin: Originally part of the Dart compiler, (c) 2011 the Dart Project Authors,
57
58 - Path: js/js.parser/src/com/google
59 - License: Netscape Public License 1.1 ([license/third_party/rhino_LICENSE.txt][rhino])
60 - Origin: Originally part of GWT, (C) 2007-08 Google Inc., distributed under the Apache 2 license. The code
61 is derived from Rhino, (C) 1997-1999 Netscape Communications Corporation, distributed under the
62 Netscape Public License.
63
64 - Path: js/js.translator/qunit/qunit.js
65 - License: MIT ([license/third_party/qunit_license.txt][qunit])
66 - Origin: QUnit, Copyright (c) 2012 John Resig, Jörn Zaefferer,
67
68 - Path: libraries/stdlib/src/kotlin/collections
69 - License: Apache 2 ([license/third_party/gwt_license.txt][gwt])
70 - Origin: Derived from GWT, (C) 2007-08 Google Inc.
71
72 - Path: libraries/stdlib/unsigned/src/kotlin/UnsignedUtils.kt
73 - License: Apache 2 ([license/third_party/guava_license.txt][guava])
74 - Origin: Derived from Guava's UnsignedLongs, (C) 2011 The Guava Authors
75
76 - Path: libraries/stdlib/jvm/src/kotlin/util/MathJVM.kt
77 - License: Boost Software License 1.0 ([license/third_party/boost_LICENSE.txt][boost])
78 - Origin: Derived from boost special math functions, Copyright Eric Ford & Hubert Holin 2001.
79
80 - Path: libraries/stdlib/js/src/kotlin/collections
81 - License: Apache 2 ([license/third_party/gwt_license.txt][gwt])
82 - Origin: Derived from GWT, (C) 2007-08 Google Inc.
83
84 - Path: libraries/stdlib/native-wasm/src/kotlin/collections
85 - License: Apache 2 ([license/third_party/gwt_license.txt][gwt])
86 - Origin: Derived from GWT, (C) 2007-08 Google Inc.
87
88 - Path: libraries/stdlib/js-v1/src/js/long.js
89 - License: Apache 2 ([license/third_party/closure-compiler_LICENSE.txt][closure-compiler])
90 - Origin: Google Closure Library, Copyright 2009 The Closure Library Authors
91
92 - Path: libraries/stdlib/js-v1/src/js/polyfills.js
93 - License: Boost Software License 1.0 ([license/third_party/boost_LICENSE.txt][boost])
94 - Origin: Derived from boost special math functions, Copyright Eric Ford & Hubert Holin 2001.
95
96 - Path: libraries/stdlib/js/src/kotlin/js/math.polyfills.kt
97 - License: Boost Software License 1.0 ([license/third_party/boost_LICENSE.txt][boost])
98 - Origin: Derived from boost special math functions, Copyright Eric Ford & Hubert Holin 2001.
99
100 - Path: libraries/stdlib/wasm/internal/kotlin/wasm/internal/Number2String.kt
101 - License: Apache 2 ([third_party/assemblyscript_license.txt][assemblyscript])
102 - Origin: Derived from assemblyscript standard library
103
104 - Path: plugins/lint/android-annotations
105 - License: Apache 2 ([license/third_party/aosp_license.txt][aosp])
106 - Origin: Copyright (C) 2011-15 The Android Open Source Project
107
108 - Path: plugins/lint/lint-api
109 - License: Apache 2 ([license/third_party/aosp_license.txt][aosp])
110 - Origin: Copyright (C) 2011-15 The Android Open Source Project
111
112 - Path: plugins/lint/lint-checks
113 - License: Apache 2 ([license/third_party/aosp_license.txt][aosp])
114 - Origin: Copyright (C) 2011-15 The Android Open Source Project
115
116 - Path: plugins/lint/lint-idea
117 - License: Apache 2 ([license/third_party/aosp_license.txt][aosp])
118 - Origin: Copyright (C) 2011-15 The Android Open Source Project
119
120 - Path: wasm/ir/src/org/jetbrains/kotlin/wasm/ir/convertors
121 - License: MIT ([license/third_party/asmble_license.txt][asmble])
122 - Origin: Copyright (C) 2018 Chad Retz
123
124 - Path: compiler/tests-common/tests/org/jetbrains/kotlin/codegen/ir/ComposeLikeGenerationExtension.kt
125 - License: Apache 2 ([license/third_party/aosp_license.txt][aosp])
126 - Origin: Derived from JetPack Compose compiler plugin code, Copyright 2019 The Android Open Source Project
127
128 - Path: libraries/stdlib/wasm/src/kotlin/text/FloatingPointConverter.kt
129 - License: MIT ([license/third_party/asmble_license.txt][asmble])
130 - Origin: Copyright (C) 2018 Chad Retz
131
132 - Path: libraries/stdlib/wasm/src/kotlin/math/fdlibm/
133 - License: SUN ([license/third_party/sun_license.txt][sun])
134 - Origin: Copyright (C) 1993 by Sun Microsystems, Inc.
135
136 - Path: kotlin-native/runtime/src/main/cpp/Utils.cpp
137 - License: Boost Software License 1.0 ([license/third_party/boost_LICENSE.txt][boost])
138 - Origin: Derived from boost hash functions, Copyright 2005-2014 Daniel James
139
140## Kotlin Test Data
141
142The following source code is used for testing the Kotlin compiler and/or plugin and is not incorporated into
143any distributions of the compiler, libraries or plugin:
144
145 - Path: third-party/annotations/android
146 - License: Apache 2 ([license/third_party/aosp_license.txt][aosp])
147 - Origin: Copyright (C) 2011-15 The Android Open Source Project
148
149 - Path: third-party/annotations/com/android
150 - License: Apache 2 ([license/third_party/aosp_license.txt][aosp])
151 - Origin: Copyright (C) 2011-15 The Android Open Source Project
152
153 - Path: third-party/annotations/org/eclipse
154 - License: Eclipse Public License v1.0 ([license/third_party/testdata/eclipse_license.txt][eclipse])
155 - Origin: Eclipse JDT, Copyright (c) 2011, 2013 Stephan Herrmann and others.
156
157 - Path: third-party/annotations/androidx
158 - License: Apache 2 ([license/third_party/aosp_license.txt][aosp])
159 - Origin: Copyright (C) 2011-15 The Android Open Source Project
160
161 - Path: third-party/annotations/edu/umd/cs/findbugs
162 - License: LGPL 2.1 ([license/third_party/testdata/findbugs_license.txt][findbugs])
163 - Origin: Bytecode Analysis Framework, Copyright (C) 2005 University of Maryland
164
165 - Path: third-party/java8-annotations/org/eclipse
166 - License: Eclipse Public License v1.0 ([license/third_party/testdata/eclipse_license.txt][eclipse])
167 - Origin: Eclipse JDT, Copyright (c) 2011, 2013 Stephan Herrmann and others.
168
169 - Path: third-party/annotations/io/reactivex
170 - License: Apache 2 ([license/third_party/testdata/rxjava_license.txt][rxjava])
171 - Origin: RxJava, Copyright (c) 2016-present, RxJava Contributors
172
173 - Path: third-party/java8-annotations/org/jspecify
174 - License: Apache 2 ([license/third_party/testdata/jspecify_license.txt][jspecify])
175 - Origin: JSpecify, Copyright (C) 2020 The JSpecify Authors
176
177 - Path: third-party/java9-annotations/org/jspecify
178 - License: Apache 2 ([license/third_party/testdata/jspecify_license.txt][jspecify])
179 - Origin: JSpecify, Copyright (C) 2020 The JSpecify Authors
180
181 - Path: third-party/annotations/lombok
182 - License: MIT ([license/third_party/testdata/lombok_license.txt][lombok])
183 - Origin: Project Lombok, Copyright (C) 2009-2013 The Project Lombok Authors
184
185 - Path: idea/idea-android/tests/org/jetbrains/kotlin/android/AndroidTestBase.java
186 - License: Apache 2 ([license/third_party/aosp_license.txt][aosp])
187 - Origin: Copyright (C) 2011-15 The Android Open Source Project
188
189 - Path: idea/testData/android/lintQuickfix/requiresApi/RequiresApi.java
190 - License: Apache 2 ([license/third_party/aosp_license.txt][aosp])
191 - Origin: Copyright (C) 2011-15 The Android Open Source Project
192
193 - Path: idea/testData/android/lint/IntRange.java
194 - License: Apache 2 ([license/third_party/aosp_license.txt][aosp])
195 - Origin: Copyright (C) 2011-15 The Android Open Source Project
196
197 - Path: idea/testData/android/lint/RequiresPermission.java
198 - License: Apache 2 ([license/third_party/aosp_license.txt][aosp])
199 - Origin: Copyright (C) 2011-15 The Android Open Source Project
200
201 - Path: libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/allOpenSpring/src/org/springframework/stereotype/Component.java
202 - License: Apache 2 ([license/third_party/testdata/spring_license.txt][spring])
203 - Origin: Spring Framework, Copyright 2002-2007 the original author or authors.
204
205 - Path: libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/AndroidDaggerProject
206 - License: Apache 2 ([license/third_party/testdata/dagger_license.txt][dagger])
207 - Origin: Dagger, Copyright (C) 2013 Square, Inc.
208
209 - Path: libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/kapt2
210 - License: Apache 2 ([license/third_party/testdata/dagger_license.txt][dagger])
211 - Origin: Dagger, Copyright (C) 2013 Square, Inc.
212
213 - Path: libraries/tools/kotlin-maven-plugin-test/src/it/test-allopen-spring/src/main/java/org/springframework/stereotype/Component.java
214 - License: Apache 2 ([license/third_party/testdata/spring_license.txt][spring])
215 - Origin: Spring Framework, Copyright 2002-2007 the original author or authors.
216
217## Kotlin Tools and Libraries Tests
218
219The following source code is used for testing the Kotlin tools and/or libraries and is not incorporated into
220any distributions of the tools or libraries:
221
222 - Path: libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/PluginsDslIT.kt
223 - License: Apache 2 ([license/third_party/gradle_license.txt][gradle])
224 - Origin: Gradle, Copyright 2002-2017 Gradle, Inc.
225
226 - Path: libraries/tools/kotlin-gradle-plugin-integration-tests/target/test-classes/testProject/noArgJpa/src/javax/persistence/Entity.java
227 - License: Eclipse Public License v1.0 ([license/third_party/testdata/eclipse_license.txt][eclipse])
228 and Eclipse Distribution License - v1.0 ([license/third_party/testdata/eclipse_distribution_license.txt][eclipse-distribution])
229 - Origin: javax.persistence, Copyright (c) 2008, 2017 Sun Microsystems, Oracle Corporation.
230
231 - Path: libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/noArgJpa/src/javax/persistence/Entity.java
232 - License: Eclipse Public License v1.0 ([license/third_party/testdata/eclipse_license.txt][eclipse])
233 and Eclipse Distribution License - v1.0 ([license/third_party/testdata/eclipse_distribution_license.txt][eclipse-distribution])
234 - Origin: javax.persistence, Copyright (c) 2008, 2017 Sun Microsystems, Oracle Corporation.
235
236 - Path: libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/noArgJpa/src/javax/persistence/Embeddable.java
237 - License: Eclipse Public License v1.0 ([license/third_party/testdata/eclipse_license.txt][eclipse])
238 and Eclipse Distribution License - v1.0 ([license/third_party/testdata/eclipse_distribution_license.txt][eclipse-distribution])
239 - Origin: javax.persistence, Copyright (c) 2008, 2017 Sun Microsystems, Oracle Corporation.
240
241 - Path: libraries/tools/kotlin-test-js-runner/karma-kotlin-reporter.js
242 - License: MIT ([license/third_party/karma_LICENSE.txt](third_party/karma_LICENSE.txt)
243 and [license/third_party/karma-teamcity-reporter_LICENSE.txt](third_party/karma-teamcity-reporter_LICENSE.txt))
244 - Origin: Copyright (C) 2011-2019 Google, Inc. and Copyright (C) 2011-2013 Vojta Jína and contributors.
245
246 - Path: libraries/tools/kotlin-test-js-runner/mocha-kotlin-reporter.js
247 - License: MIT ([license/third_party/mocha-teamcity-reporter_LICENSE.txt](third_party/mocha-teamcity-reporter_LICENSE.txt))
248 - Origin: Copyright (c) 2016 Jamie Sherriff
249
250 - Path: libraries/tools/kotlin-test-js-runner/src/utils.ts
251 - License: MIT ([license/third_party/teamcity-service-messages_LICENSE.txt](third_party/teamcity-service-messages_LICENSE.txt)
252 and [license/third_party/lodash_LICENSE.txt](third_party/lodash_LICENSE.txt))
253 - Origin: Copyright (c) 2013 Aaron Forsander and Copyright JS Foundation and other contributors <https://js.foundation/>
254
255 - Path: libraries/tools/kotlin-test-js-runner/src/teamcity-format.js
256 - License: MIT ([license/third_party/mocha-teamcity-reporter_LICENSE.txt](third_party/mocha-teamcity-reporter_LICENSE.txt)
257 and [license/third_party/teamcity-service-messages_LICENSE.txt](third_party/teamcity-service-messages_LICENSE.txt))
258 - Origin: Copyright (c) 2016 Jamie Sherriff and Copyright (c) 2013 Aaron Forsander
259
260## Example Code
261
262The following code is provided as examples and is not incorporated into
263any distributions of the compiler, libraries or plugin:
264
265 - Path: libraries/examples/browser-example/src/js/jquery.js
266 - License: MIT ([license/third_party/jquery_license.txt][jquery])
267 - Origin: jQuery JavaScript Library v1.6.2, Copyright 2011, John Resig
268
269 - Path: libraries/examples/browser-example-with-library/src/js/jquery.js
270 - License: MIT ([license/third_party/jquery_license.txt][jquery])
271 - Origin: jQuery JavaScript Library v1.6.2, Copyright 2011, John Resig
272
273[aosp]: third_party/aosp_license.txt
274[asm]: third_party/asm_license.txt
275[boost]: third_party/boost_LICENSE.txt
276[closure-compiler]: third_party/closure-compiler_LICENSE.txt
277[dagger]: third_party/testdata/dagger_license.txt
278[dart]: third_party/dart_LICENSE.txt
279[eclipse]: third_party/testdata/eclipse_license.txt
280[eclipse-distribution]: third_party/testdata/eclipse_distribution_license.txt
281[findbugs]: third_party/testdata/findbugs_license.txt
282[gradle]: third_party/gradle_license.txt
283[guava]: third_party/guava_license.txt
284[gwt]: third_party/gwt_license.txt
285[jquery]: third_party/jquery_license.txt
286[lombok]: third_party/testdata/lombok_license.txt
287[pcollections]: third_party/pcollections_LICENSE.txt
288[qunit]: third_party/qunit_license.txt
289[rhino]: third_party/rhino_LICENSE.txt
290[rxjava]: third_party/testdata/rxjava_license.txt
291[spring]: third_party/testdata/spring_license.txt
292[assemblyscript]: third_party/assemblyscript_license.txt
293