Commit Graph

92 Commits

Author SHA1 Message Date
Alexander Udalov 8c95b78346 Update JVM metadata version to 1.5.0
Improve the test which checks that we use correct metadata version if
`-language-version` is passed by checking all supported language
versions.

The change in libraries/reflect/build.gradle.kts is needed because
kotlinx-metadata-jvm of version 0.1.0 is based on pre-1.4 Kotlin, which
doesn't support the new module file metadata generated with metadata
version 1.4 and later, and module files need to be readable there to be
able to transform them for the shadow plugin.

Similarly override dependency on kotlinx-metadata-jvm in the
binary-compatibility-validator module.
2021-02-18 12:42:23 +01:00
Alexander Udalov e0b6d4d917 Add -Xsuppress-deprecated-jvm-target-warning to modules compiled with 1.6
Currently this leads to an unknown argument warning, but it'll be
removed automatically on the next bootstrap.
2021-02-03 12:51:39 +01: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
Alexander Udalov 243db689af Build: fix "unknown enum constant" warning on Nls.Capitalization
#KTI-88 Fixed
2020-09-25 22:17:10 +02:00
Dmitriy Novozhilov 07a3009d43 Introduce new modules for common parts of deserialization 2020-09-11 10:08:37 +03:00
Dmitriy Novozhilov 564d382b9d Introduce new modules for common jvm related parts of compiler 2020-09-04 11:07:40 +03:00
Dmitriy Novozhilov bc1b6d3588 Rename :core:descriptors.common to :core:compiler.common 2020-08-25 10:41:34 +03:00
Dmitriy Novozhilov 864cf21f03 Merge :core:type-system into :core:descriptors.common 2020-08-25 10:41:34 +03:00
Dmitriy Novozhilov 5fa80a2f8c Merge :core:deserialization:deserialization.common into :core:descriptors.common 2020-08-25 10:41:34 +03:00
Dmitriy Novozhilov 6f0cd14afa Move common classes to new :core:deserialization:deserialization.common module 2020-08-25 10:31:37 +03:00
Dmitriy Novozhilov 9d9f9c52c0 Extract some classes from descriptors module to :core:common
This is needed to remove dependencies from fir modules to
  `:core:descriptors` module

What was extracted:
- Modality
- ClassKind
- org.jetbrains.kotlin.name package
2020-08-25 10:31:35 +03:00
Alexander Udalov 9b94e073af Fix warnings related to OptIn/UseExperimental 2020-08-17 21:18:19 +02:00
Vyacheslav Gerasimov 567aabeced Build: Fix kotlin-reflect publication 2020-06-14 20:31:28 +03:00
Vyacheslav Gerasimov f4e8c21309 Build: Introduce new software component for publishing
Some of our published modules don't have javaComponent
2020-06-14 20:31:27 +03:00
Vyacheslav Gerasimov e3f1ddefd0 Build: Add modularJar helper 2020-06-14 20:31:26 +03:00
Vyacheslav Gerasimov d711086be2 Build: Publish Kotlin artifacts with maven-publish plugin 2020-06-14 20:31:25 +03:00
Ilya Gorbunov 01fb200791 Build default jvm core libraries artifacts as modular
#KT-21266
2020-05-18 11:21:12 +03:00
Alexander Udalov 72c52d37ae Add some -X flags for compatibility to kotlin-reflect build
"-Xno-kotlin-nothing-value-exception" is needed to temporarily prevent
the problem happening in the composite build with Kotlin/Native
(ClassNotFoundException from KClassImpl.Data).
"-Xno-optimized-callable-references" is added just in case of any
similar problem.
2020-04-17 18:34:45 +02:00
Ilya Gorbunov 1727fcf1a8 Make some build properties extensions in buildSrc
They are used only in main build's .gradle.kts files, so it is more
flexible to define them as extensions - no need to republish
kotlin-build-gradle-plugin when another such property is to be added.
2020-04-02 05:21:10 +03:00
Vyacheslav Gerasimov 7dc24a13e4 Build: Make ProGuard task cacheable
Exclude jdk files form libraries input. Instead add jdk major version
to inputs. JavaCompile task acts same to ignore fluctuations in JDK
implementations since api should remain same
2020-03-18 22:32:07 +03:00
Vyacheslav Gerasimov 744c4c545e Build: Make DexMethodCount task cacheable, extract print stats to task 2020-03-05 00:47:52 +03:00
Vyacheslav Gerasimov 8e0f403f02 Build: normalize inputs of :kotlin-reflect:stripMetadata as classpath 2020-02-29 16:33:34 +03:00
Vyacheslav Gerasimov 6e2fb72bb6 Build: Make :kotlin-reflect:relocateCoreSources task cacheable 2020-02-29 16:33:34 +03:00
Vyacheslav Gerasimov 0ebc11270b Build: Remove duplicated manifestAttributes call from reflectShadowJar
manifestAttributes call done in the result jar
2020-02-29 16:32:02 +03:00
Yan Zhulanow 73813aef23 Pill: Support all Gradle source sets, not just main/test 2020-02-14 17:35:15 +09:00
Vyacheslav Gerasimov 1f3755248c Build: Make task inputs relative to improve caching 2020-01-24 19:40:00 +03:00
Vyacheslav Gerasimov 8e0dd604af Build: Annotate KotlinModuleShadowTransformer with @CacheableTransformer 2020-01-24 19:40:00 +03:00
Vyacheslav Gerasimov 131765537a Build: Implement preserveFileTimestamps for stripMetadata task 2020-01-24 19:40:00 +03:00
Vyacheslav Gerasimov 317972db2a Build: Make :kotlin-reflect:stripMetadata cacheable 2020-01-24 19:39:59 +03:00
Zac Sweers 482874fdc1 Embed proguard/R8 rules in kotlin-reflect artifact jar
The Android build pipeline can extract embedded proguard configurations
from dependencies and merge them automatically. This adds a conservative
proguard configuration to the kotlin-reflect JVM artifact in support of
that. This focuses mostly on just retaining what's necessary for
kotlin-reflect's own functionality to operate, but could be expanded if
community feedback discovers other good candidate rules.

With this in place - most Android projects using R8 or Proguard should
Just Work™️ with kotlin-reflect.
2020-01-17 20:03:52 +01:00
Alexander Udalov ae395bda09 Do not depend on proguard directly in :kotlin-reflect:modularJar
This is useful if proguard is disabled with
-Pkotlin.build.proguard=false.
2020-01-17 19:58:27 +01:00
Vyacheslav Gerasimov aa05bcc16b Build: Fix usages of this project unavailable in gradle 6.0 2019-11-27 21:26:33 +03:00
Vyacheslav Gerasimov 1cdc68901a Build: Use kotlinx-metadata-jvm from jcenter instead of bintray 2019-08-22 20:39:28 +03:00
Vyacheslav Gerasimov 669b6d164c Build: Use cache redirector for buildscript block of :kotlin-reflect 2019-08-22 20:39:28 +03:00
Ilya Chernikov 2ed8fa7624 Convert main task creating helper to lazy API, refactor accordingly 2019-08-21 20:20:08 +02:00
Vyacheslav Gerasimov 9b32670738 Build: Use stripMetadata task for result jar when relocation is enabled
to cleanup invalid metadata left after relocation
2019-07-11 20:07:14 +03:00
Vyacheslav Gerasimov 4531d2a7b4 Build: restore service files relocation for kotlin-reflect 2019-06-27 19:51:58 +03:00
Sergey Rostov 6647d8fd93 Build: remove mergeServiceFiles from reflectShadowJar 2019-06-27 17:56:52 +03:00
Vyacheslav Gerasimov 2d6a3cb2c8 Build: Introduce flag for disabling jar post processing
proguard, relocation, etc.
2019-06-27 17:56:52 +03:00
Vyacheslav Gerasimov db3b01d2d4 Build: Centralize compiler dist build logic in :kotlin-compiler project 2019-06-27 17:56:48 +03:00
Nikolay Krasko aa079376e7 Fix signing artifacts (KT-32192)
Broken in f1e3e26e6cd6e38b473ffe1a23b19b68ebb2d11f.

----
> Task :kotlin-reflect:signArchives FAILED
Build time for tasks:
Compiling kotlin: 1.44s (12.33% of total time)
Processing jars: 4.28s (36.75% of total time)
Uncategorized: 5.39s (46.26% of total time)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':kotlin-reflect:signArchives'.
> Duplicate key Signature kotlin-reflect:jar.asc:asc:
---

 #KT-32192 Fixed
2019-06-25 11:46:17 +03:00
Vyacheslav Gerasimov 2769dc8359 Build: Improve sourcesJar helper
- Add sources from embedded projects
 - Add artifact to sources configuration
 - Use register instead of create

 #KT-30237 Fixed
2019-06-07 17:37:46 +03:00
Vyacheslav Gerasimov d765bebcfc Build: Import embedded configuration as runtime in JPS build
This makes Idea import all embedded modules as transitive dependencies

 #KT-29548
2019-05-14 18:07:17 +03:00
Vyacheslav Gerasimov 5782267d26 Build: Fix import of kotlin-reflect in JPS build
#KT-29548 Fixed
2019-05-14 18:07:17 +03:00
Vyacheslav Gerasimov b9fe6875e3 Build: Minor cleanup kotlin-reflect 2019-05-14 18:07:16 +03:00
Vyacheslav Gerasimov c672300da1 Build: Use embedded configuration in kotlin-reflect 2019-05-14 18:07:16 +03:00
Alexander Udalov a9de157fd4 Exclude .kotlin_builtins files when proguarding kotlin-reflect.jar
Even though kotlin-annotations-jvm.jar itself doesn't contain those
files, ProGuard pulls them from the project dependency of
:kotlin-annotations-jvm on :core:builtins. They are already present in
kotlin-stdlib.jar and are thus not needed in kotlin-reflect.jar
2019-03-29 09:45:44 +01:00
Sergey Rostov fb3f28974e Build: support local.properties for JPS build. Apply JPS related tweaks only inside IDEA import. 2019-03-28 10:06:16 +03:00
Stanislav Erokhin f7702d3e43 Create new core module: type-system 2019-03-04 17:10:45 +03:00