30 Commits

Author SHA1 Message Date
Yahor Berdnikau 6b19b8b9d0 [Repo] Don't use kotlinOptions in repo build scripts
^KT-63419 In Progress
2024-02-22 14:48:10 +00:00
Yahor Berdnikau db1086f005 [repo] Migrate 'configureFrontendIr()' into buildSrc 2023-07-04 19:26:38 +00:00
Yahor Berdnikau 73a757c105 [repo] Migrate Groovy build scripts to use 'publish()' directly from buildSrc 2023-07-04 19:26:38 +00:00
Yahor Berdnikau d7fc4a1d27 [repo] Migrate Groovy build scripts to use 'sourcesJar()' directly from buildSrc 2023-07-04 19:26:38 +00:00
Yahor Berdnikau 6d5f1c84a7 [repo] Migrate Groovy build scripts to use 'javadocJar()' directly from buildSrc 2023-07-04 19:26:38 +00:00
Yahor Berdnikau 5de2b5aeb4 [repo] Migrate Groovy build scripts to use 'kotlinStdlib()' directly from buildSrc 2023-07-04 19:26:38 +00:00
Abduqodiri Qurbonzoda 34e50649e8 Switch JVM target of the standard libraries to 1.8 #KT-51907 2022-08-13 01:33:45 +03:00
Yahor Berdnikau af6f17c243 Unify kotlinCompilerClasspath for all projects
This will prevent spawning second Kotlin daemon during compilation
except 'buildSrc' compilation. Original change was introduced in
2e515f3945 commit.
2022-05-24 07:58:38 +00:00
Alexander Udalov 2e515f3945 Prohibit JVM target 1.6
But still compile stdlib, reflect, kotlin.test and scripting runtimes
with JVM target 1.6 to simplify migration from Kotlin 1.6 to 1.7.

 #KT-45165 Fixed
2022-04-19 22:54:40 +02:00
Dmitriy Novozhilov 0923d39215 [Build] Setup useFirForLibraries flag 2021-09-20 14:18:18 +03:00
Alexander Udalov 0925e1b497 Enable JVM IR for stdlib/reflect/test libraries
Changes in Gradle integration tests are needed because:
- in new-mpp-android, kotlin-stdlib-jdk8 is used, and JVM IR generates
  JDK 8-specific bytecode (invokedynamic). D8 needs to be configured to
  desugar it with source/target versions set to 1.8, otherwise it
  reports an error.
- in AndroidExtensionsManyVariants and AndroidIcepickProject, D8 fails
  with assertions enabled if AGP < 4.0.0 is used because of
  https://issuetracker.google.com/issues/148661132. The tests which use
  old AGP versions are probably not relevant anymore anyway.

Changes in kotlin-stdlib-runtime-merged.txt are caused by a slightly
different generation scheme of collection subclasses in JVM IR, and are
harmless.

(Previous attempt was at 15e978dbd311c2ba78ec32b394c21acde9811ccb.)
2021-08-05 12:36:35 +02:00
Alexander Udalov 0a9498f7e2 Build: suppress deprecated JVM target warning globally
There seems to be no point in configuring the compiler argument per
project. This argument will be deleted soon anyway, when we remove
support for JDK 1.6 & 1.7.

Also remove `disableDeprecatedJvmTargetWarning`. It didn't have any
effect in all modules where it was applied because these modules
reassign `freeCompilerArgs` anyway, with
`-Xsuppress-deprecated-jvm-target-warning` in it.
2021-07-27 13:35:39 +02:00
Alexander Udalov 91c39ed01c Build: remove obsolete compiler arguments
These compiler arguments enable features which are enabled by default in
the current Kotlin anyway.

The only exception is in :compiler:cli which uses an old language
version.
2021-07-27 13:35:38 +02:00
Yahor Berdnikau 7789054547 Migrate repo to use JVM toolchains Gradle feature.
^KT-46972 Fixed
2021-07-05 14:11:12 +00:00
Alexander Udalov d326d6a693 Specify module name via moduleName option instead of freeCompilerArgs
This allows to get rid of warnings about duplicate module name in some
of the modules.
2020-11-06 19:27:32 +01:00
Alexander Udalov 4c09906235 Build: add kotlin.build.useIRForLibraries to enable JVM IR for libraries separately
The next step for JVM IR adoption in our project is going to be enabling
`kotlin.build.useIR`, but keeping `kotlin.build.useIRForLibraries`
disabled until we fix all remaining ABI incompatibility issues for
library code.
2020-10-16 12:13:05 +02:00
Vyacheslav Gerasimov 8737168d41 Build: Use maven-publish in configurePublishing helper 2020-06-14 20:31:26 +03:00
Vyacheslav Gerasimov c2589c7d6d Build: Rename javadocJar for groovy to configureJavadocJar
So it doesn't interfere with javadocJar task accessor
2020-06-14 20:31:25 +03:00
Yan Zhulanow 73813aef23 Pill: Support all Gradle source sets, not just main/test 2020-02-14 17:35:15 +09:00
Ilya Gorbunov 0764a065e8 Rewrite UnderMigration and MigrationStatus in Java
to remove dependency on kotlin-stdlib.

#KT-33141
2020-01-13 23:30:32 +03:00
Vyacheslav Gerasimov 89b152809f Build: Make dependencies on builtins compileOnly
for kotlin-annotations-android & kotlin-annotations-jvm, to prevent
builtins from occurring in maven pom compile scope.

 #KT-33140
2019-08-06 18:09:20 +03:00
Vyacheslav Gerasimov db3b01d2d4 Build: Centralize compiler dist build logic in :kotlin-compiler project 2019-06-27 17:56:48 +03:00
Sergey Rostov 7b89b0abbb JPS Build: exclude :core:builtins, use prebuilt bootstrap version 2019-03-28 10:06:35 +03:00
Alexander Udalov ed86757817 Rework how built-in types are loaded in compiler for JVM
In TopDownAnalyzerFacadeForJVM, we now always use the "load built-ins
from module dependencies" behavior that was previously only enabled with
the dedicated CLI argument -Xload-builtins-from-dependencies. However,
sometimes we compile code without kotlin-stdlib in the classpath, and we
don't want everything to crash because some standard type like
kotlin.Unit hasn't been found.

To mitigate this, we add another module at the end of the dependencies
list, namely a "fallback built-ins" module. This module loads all
built-in declarations from the compiler's class loader, as was done by
default previously. This prevents the compiler from crashing if any
built-in declaration is not found, but compiling the code against
built-ins found in the compiler is still discouraged, so we report an
error if anything is resolved to a declaration from this module, via a
new checker MissingBuiltInDeclarationChecker.

Also introduce a new CLI argument -Xsuppress-missing-builtins-error
specifically to suppress this error and to allow compiling code against
compiler's own built-ins.

 #KT-19227 Fixed
 #KT-28198 Fixed
2019-03-22 14:59:03 +01:00
Vyacheslav Gerasimov 14d9ec9fb2 Build: Use javadocJar helper to specify artifact explicitly
Creating javadocJar task for every project produces lots of unnecessary
tasks, some project don't even have code. Jar task without outDir
property set fails idea import with gradle 5.0+
2019-02-18 19:59:36 +03:00
Yan Zhulanow 769a0d7701 Pill: Add extra stdlib jars as dist libraries 2018-08-07 11:55:23 +03:00
Alexey Tsvetkov 29d2679e8d Do not configure dist task for every published module
This change avoids compiling kotlin-compiler-embeddable,
kotlin-gradle-plugin, and other gradle plugins,
when running `./gradlew dist`
2018-02-01 17:39:55 +03:00
Ilya Gorbunov 9995a31c46 Add ReadOnly and Mutable into kotlin.annotations.jvm
Originally provided in org.jetbrains.annotations package as a part of stdlib.
2017-11-28 17:45:10 +03:00
Dmitry Petrov 75ad20f823 Build compiler, plugin & stdlib with constructor call normalization
Required as a workaround for Proguard bug
https://sourceforge.net/p/proguard/bugs/664/

When processing bytecode generated by Kotlin compiler for constructor
call with stack spilling during arguments evaluation, ProGuard performs
an equivalent transformation for the bytecode, but emits invalid stack
frame information.
In JVM 1.6, such invalid stack frames are ignored and re-evaluated by
JVM during bytecode verification.
In JVM 1.8, such invalid stack frames cause VerifyError.
2017-10-12 10:59:57 +03:00
Leonid Stashevsky 95d32d8d1e Add @UnderMigration annotation and options for report level 2017-10-03 16:44:02 +03:00