Commit Graph

42 Commits

Author SHA1 Message Date
Vyacheslav Gerasimov d32f6fb382 Build: Fix compatibility with shadow plugin
Apply java-base plugin since shadow task requires sourcesets
2019-02-18 19:58:56 +03:00
Sergey Rostov f35185b261 Build: remove explicit dependencies to org.jetbrains.annotations 2019-01-28 13:43:08 +03:00
Sergey Rostov 12cfd6396d JPS build flag: exclude java9 when jps build enabled 2019-01-28 13:43:07 +03:00
Vyacheslav Gerasimov f58acbeef5 Build: implement useBootstrapStdlib flag
Excludes stdlib projects from build and uses bootstrap stdlib artifacts

 #KT-29205
2019-01-21 21:09:40 +03:00
Sergey Rostov 883970fadb Add explicit dependencies to nullable annotations 2018-12-26 09:07:06 +03:00
Sergey Rostov 487c57e2e0 Move resources, kotlin-reflect.jar: remove manually included META-INF/services/*
Now it already included. Manually including causes duplicated contents
in resulting files, for example:

1	   kotlin.reflect.jvm.internal.impl.load.java.FieldOverridabilityCondition
2	   kotlin.reflect.jvm.internal.impl.load.java.ErasedOverridabilityCondition
3	   kotlin.reflect.jvm.internal.impl.load.java.JavaIncompatibilityRulesOverridabilityCondition
4	+  kotlin.reflect.jvm.internal.impl.load.java.FieldOverridabilityCondition
5	+  kotlin.reflect.jvm.internal.impl.load.java.ErasedOverridabilityCondition
6	+  kotlin.reflect.jvm.internal.impl.load.java.JavaIncompatibilityRulesOverridabilityCondition

Removing this line fixes that.
2018-11-30 15:01:02 +03:00
Ilya Gorbunov e49789f819 Build java9 modular artifacts under 'modular' classifier
Provide additional modular artifacts as a workaround for KT-21266

Update module-info declarations:
  - add new packages
  - add exports and opens for internal PlatformImplementations
  - remove exports of kotlin.coroutines.experimental.*

#KT-27919 Fixed
2018-11-01 02:27:49 +03:00
Ilya Gorbunov 86ba5ebf29 Mix kotlin-annotations-jvm with kotlin-reflect into proguard
So it can strip these annotations from the resulting jar.

#KT-26929 Fixed
2018-09-19 12:40:47 +03:00
Ilya Gorbunov a18770fbbb Remove projectDist dependency helper usages
Use default configuration dependencies instead of projectDist ones.
2018-09-12 06:05:05 +03:00
Ilya Gorbunov 03340d770b Replace remaining distJar dependencies with default configuration dependencies 2018-09-12 06:05:05 +03:00
Alexander Udalov e41e28271b Use kotlinx-metadata-jvm of version 0.0.4 in kotlin-reflect build script
To prevent various problems with non-shaded artifact (shading was added
in 0.0.3)
2018-08-21 17:12:02 +02:00
Ilya Gorbunov 2a598e0ac4 Replace ReadOnly/Mutable usages in the compiler
Replace ones from org.jetbrains.kotlin package with new annotations from kotlin.annotations.jvm.
No need to copy them to compile kotlin-reflect anymore.
Then simplify reflect project more: no sources — no need to pack its direct output.
2018-08-03 09:37:38 +03:00
Alexander Udalov 1f4dfbf5f3 Fix compilation of Java 9 sources for kotlin-reflect-api
Do not pass the jars for modules such as descriptors, descriptors.jvm,
etc to `--module-path` because javac assumes that these are separate
modules (even though they're listed later as parts of this module in
`--patch-module), and prohibits to have split packages and foreign
service implementations among them
2018-07-13 18:45:09 +02:00
Alexander Udalov 959c2f4843 Get rid of split packages in descriptors, descriptors.jvm, deserialization
Also move some other files to related packages and reformat moved files
2018-07-06 14:08:35 +02:00
Vyacheslav Gerasimov 01db78d776 Build: Introduce Project extension properties for source sets 2018-06-22 21:42:30 +03:00
Alexander Udalov f6169337dd Use kotlinx-metadata-jvm to relocate .kotlin_module files in kotlin-reflect
Instead of custom logic which used compiler internals and was very
brittle
2018-06-18 12:35:06 +02:00
Vyacheslav Gerasimov 992a31af88 Build: introduce javaPluginConvention extension on project
`ExtensionAware.the<T>()` introduced in gradle 4.7 made existing calls `the<JavaPluginConvention>()` invalid (on wrong receiver)
2018-06-13 19:43:03 +03:00
Ilya Gorbunov d9656a939b Do not produce libraries json declarations dump
It's no longer needed for checking binary compatibility.
Clean build of these libraries is no longer required too.

Cleanup build.gradle of binary-compatibility-validator.
2018-05-23 05:00:57 +03:00
Yan Zhulanow ba5836d666 Pill: Introduce pill{} extension to set extended Pill configuration
Also introduce the flavor concept which allows to specify what part of Kotlin project should be imported.
2018-05-15 16:29:45 +03:00
Denis Zharkov 003f381fcd Replace default-type dependencies to :kotlin-stdlib with distJar
Use distJar configuration instead.
It's necessary because currently when using default-type, subproject
starts having a transitive dependency to :kotlin-stdlib-common
and that leads to exception from KT-20897 when building light classes

This change might be reverted once KT-23942 is fixed

 #KT-23942 Submitted
2018-04-26 16:11:27 +03:00
Alexander Udalov dd3cf531cf Disable packing module-info to libraries until Android issue is fixed
https://issuetracker.google.com/issues/77587908

 #KT-21266 Open
2018-04-05 19:18:05 +02:00
Ilya Gorbunov 299d6fa772 Use default compileJava9Java task to build java9 source set 2018-04-03 21:24:34 +02:00
Alexander Udalov 828cc6dbf3 Add module-info.java for kotlin-reflect
The standard way of loading resources with built-ins metadata from the
current class loader no longer works in the modular mode on Java 9
because the current class loader is for module 'kotlin.reflect', but the
metadata is located in the module 'kotlin.stdlib'. On Java 9, we now use
the class loader of 'kotlin.stdlib' to load these resources.

 #KT-21266 Fixed
2018-04-03 21:24:03 +02:00
Alexander Udalov 964bf503a6 Fix warning about kotlin-reflect-api bundling Kotlin Runtime
This fixes the "Some JAR files in the classpath have the Kotlin Runtime
library bundled into them" warning when compiling all modules that
depend on kotlin-reflect-api. This warning is reported on jars in the
classpath which look like standard library artifacts, but in fact are
not because their manifest does not say so. With this change, we're now
writing the manifest of standard library artifacts to the resulting jar
of kotlin-reflect-api, with the standard library component name
"internal" (in fact, it doesn't affect anything here, any name would be
OK) to make the compiler believe that this is actually a standard
library jar
2018-04-03 13:18:56 +02:00
Alexander Udalov 404bcc58e5 Update bootstrap to 1.2.40-dev-967 2018-03-15 20:47:35 +01:00
Alexander Udalov 368af867b8 Add modules metadata and metadata.jvm 2018-03-14 12:25:08 +01:00
Ilya Gorbunov 2891a6c954 Do not use java.home system property to locate JDK dependencies
It may point either to JDK/bin or to JRE/bin. Instead use JDK_16 and JDK_18 paths.
2018-03-13 08:52:15 +03:00
Alexey Tsvetkov e8f8488d54 Add diagnostic task to print all shadow jars in compile classpaths 2018-03-12 17:31:11 +03:00
Yan Zhulanow 6950c256ce Pill: Replace most of the hardcoded library coordinates with info from Gradle 2018-03-02 03:15:33 +03:00
Alexander Udalov bb013ec2bf Update bootstrap to 1.2.40-dev-165 2018-02-08 10:15:30 +01:00
Alexander Udalov ba5cc65792 Rename JvmPackageTable -> JvmModuleProtoBuf, PackageTable -> Module
This protobuf message is going to contain more information about the
module than just the table of package parts
2018-02-07 17:25:43 +01:00
Alexander Udalov 5338df6960 Do not depend on Shadow plugin in subprojects
Since buildSrc depends on the Shadow plugin, it's already in the
classpath of all build scripts
2018-02-01 19:38:31 +01:00
Alexander Udalov f516667640 Exclude META-INF/services from kotlin-reflect-sources.jar 2018-01-23 17:11:20 +01:00
Alexander Udalov 3bf5f44b9d Exclude .proto files from kotlin-reflect.jar
#KT-22459 Fixed
2018-01-23 17:11:09 +01:00
Alexander Udalov 4f70983735 Update Proguard to 5.3.3 2017-11-29 11:58:38 +01:00
Alexander Udalov 79e399942d Use "sourcesJar" task builder for kotlin-reflect sources 2017-11-28 12:46:10 +01:00
Alexander Udalov 9f3577dc70 Minor, use firstFromJavaHomeThatExists for JDK for Proguard
Similarly to "proguard" task in prepare/compiler/build.gradle.kts
2017-11-28 12:45:57 +01:00
Alexander Udalov 200c62b574 Use JvmPackageTable from bootstrap compiler in KotlinModuleShadowTransformer
Instead of generating another copy of it into buildSrc. Also move
KotlinModuleShadowTransformer to kotlin-reflect's build script, to its
only usage
2017-11-28 12:45:56 +01:00
Alexander Udalov a1f895bb1f Rewrite kotlin-reflect build script from Groovy to Kotlin 2017-11-28 12:45:53 +01:00
Alexander Udalov 885ddc49a2 Move libraries/reflect/{build.gradle -> build.gradle.kts}
To preserve Git history after conversion to Kotlin in the next commit
2017-11-28 12:35:50 +01:00
Alexander Udalov 329fbd8fa8 Extract kotlin-reflect-api module out of kotlin-reflect
This is needed only for faster compilation of the Kotlin project itself
and has no effect on the public artifact
org.jetbrains.kotlin:kotlin-reflect.

The problem this is solving is the rebuild of the project once anything
has been changed in modules in 'core' (even inside function bodies, i.e.
a non-API change). Previously, changes in 'core' led to the compilation
of kotlin-reflect, which led to the rebuild of all modules depending on
kotlin-reflect directly or indirectly (which is almost all modules in
the project) because kotlin-reflect's artifacts are custom-built and the
changes can not be picked up incrementally. But 99.9% of the time the
initial changes in 'core' could not have any effect on the usages of
kotlin-reflect, because classes from those modules are moved to an
internal package in kotlin-reflect and thus are an internal
implementation detail.

Now, changes in 'core' still lead to the compilation of kotlin-reflect
and to the process of building the custom jar. But if a module depends
on kotlin-reflect-api, not kotlin-reflect, then the incremental
difference checker will detect that the module does not have to be
recompiled if there hasn't been any changes to the API of
kotlin-reflect-api. Which means that the module will not be rebuilt on
every change in 'core'.

This commit only introduces the new module. The dependencies
(kotlin-reflect -> kotlin-reflect-api) are replaced in the next commit.
2017-11-28 12:35:48 +01:00
Alexander Udalov 3e8b39af90 Move kotlin-reflect Gradle project to libraries/reflect/ 2017-11-28 12:33:21 +01:00