Commit Graph

3046 Commits

Author SHA1 Message Date
Abduqodiri Qurbonzoda 1b6b44c805 Implement conversion between floating point numbers and unsigned integers
KT-27108
2019-02-25 21:58:03 +03:00
Pavel Punegov 86ac5e97e4 Update Kotlin/Native to 1.2-rc2-7869 2019-02-25 20:42:02 +03:00
Alexey Tsvetkov f38ad0fe8a Fix inter-project IC with new MPP for JS/JVM targets
#KT-26275 Fixed
   #KT-29966 Fixed
2019-02-25 17:12:14 +03:00
Sergey Igushkin 03e36334cf Push Gradle version for kotlin-gradle-plugin-integration-tests to 5.2 2019-02-25 15:43:40 +03:00
Sergey Igushkin 43de81e4c8 Fix MPP publishing with metadata on Gradle 5.2 (KT-29758)
In publishing, use attribute containers of detached configuration
instead of HierarchyAttributeContainer, which is rejected by Gradle for
not being an AttributeContainerInternal.

Using attributes of a detached configuration is a small and
conservative fix; we may need to either not filter the attributes,
which will lead to [ProjectLocalConfigurations.ATTRIBUTE] being
published in the Gradle module metadata, which will potentially
complicate our attributes schema migration, or create proper,
non-detached configurations for publishing that are separated from the
configurations used for project-to-project dependencies.

Issue #KT-29758 Fixed
2019-02-25 15:43:40 +03:00
Kirill.Shmakov 4a3476a87c Merge rr/kishmakov/KT-30056 into master 2019-02-25 11:45:55 +00:00
Kirill Shmakov 2a3473f275 Better string builder. 2019-02-25 14:43:32 +03:00
Kirill Shmakov 02c9afcb6f Last test 2019-02-25 14:15:30 +03:00
Kirill Shmakov fb14128cbd All but one 2019-02-25 13:46:34 +03:00
Stanislav Erokhin f1d5912f05 Update Kotlin/Native: 1.2-rc1-7773 2019-02-23 11:39:10 +03:00
Ilya Gorbunov 8f6d73fd32 Use JS stdlib merger from bootstrap compiler 2019-02-22 21:22:19 +03:00
Ilya Gorbunov eca1af4091 Temporary restore kotlin-stdlib-js-merger for bootstrapping 2019-02-22 02:37:31 +03:00
Ilya Gorbunov 98c6c925fc Move JS stdlib merger into cli compiler module
Refactor: use stdlib function to relativize paths.
2019-02-22 02:37:24 +03:00
Kirill Shmakov b695f20526 Candidate 2019-02-21 19:00:37 +03:00
LepilkinaElena 39bdc1cc2c Change short form of flag name to full one for cinterop tool (#2117) 2019-02-20 15:14:08 +03:00
Yaroslav Russkih 028a311949 Use https everywhere - tests and test data 2019-02-19 21:35:36 +01:00
Yaroslav Russkih 7135f1972a Use https everywhere - production code 2019-02-19 21:35:36 +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
Sergey Igushkin 2a14301c75 Fix Gradle plugin build with Gradle 5.0
* Due to 'improved POM support' introduced in 5.0, runtime dependencies
of the `compileOnly 'com.android.tools.build:gradle:...'` dependency
were no more transitively available. Add them manually;

* Add `!!` to usages of `resourcesDir`, which became nullable;

* Replace the dropped `classesDir` method usages with reflection;
2019-02-18 19:58:57 +03:00
Ilya Gorbunov 6bcd112062 Drop obsolete artifact kotlin-runtime
Remove suppresses used to compile some parts of stdlib
as a non-multiplatform project.
2019-02-18 19:20:30 +03:00
Ilya Gorbunov 811566bbe0 Drop obsolete artifacts kotlin-stdlib-jre7/8 2019-02-18 18:44:35 +03:00
Andrey Uskov 59bcd608a1 Minor. Remove useless code related to IJ 173 and AS 3.1 in build scripts 2019-02-17 12:29:01 +03:00
Yan Zhulanow 770a2e3f2d Attach expect sources to all source set tasks (KT-26977)
If kapt is enabled, there are several Kotlin compilation tasks for one source set (stub generator + compile). We should attach the expect sources to all of them.
2019-02-15 21:23:26 +03:00
Ting-Yuan Huang 3a768060ca Skip annotation processing when there's no AP specified
This also fixes KT-29302 where stub generation is skipped while the
subsequent annotation processing phase anticipates the generated stubs.

This patch addresses cases where kapt.use.worker.api=true. The cases
where kapt.use.worker.api=false are handled in the same place of stub
generation.
2019-02-15 21:23:25 +03:00
Yan Zhulanow 53fa647d41 Revert "Kapt: Do not treat initially empty configurations specially (KT-27404)" (KT-29481)
This partially reverts commit 2cb2141e07.
2019-02-15 21:23:25 +03:00
Ilya Matveev 7c3c21790b Fix subplugin options for K/N 2019-02-15 13:37:16 +03:00
Alexey Tsvetkov d5507734e8 Fix maven plugin after IC build reports were introduced to Gradle 2019-02-13 22:04:07 +03:00
Alexey Tsvetkov 37e74e0949 Add debugKotlinDaemon shortcut to Gradle tests 2019-02-12 22:10:11 +03:00
Alexey Tsvetkov 560a9d6ae6 Add smoke test 2019-02-12 22:10:11 +03:00
Alexey Tsvetkov 690f6fdd32 Print build overview 2019-02-12 22:10:11 +03:00
Alexey Tsvetkov 7084fd8966 Do not print tasks info when no Kotlin task was run 2019-02-12 22:10:11 +03:00
Alexey Tsvetkov dbdc7a5b07 Add verbose mode to build reports
#KT-12700

Verbose mode can be enabled by adding `kotlin.build.report.verbose=true`
to `gradle.properties` file.
2019-02-12 22:10:11 +03:00
Alexey Tsvetkov 98ef00b957 Add build reports for diagnosing build problems in Gradle
#KT-12700 Fixed

To turn build reports, add 'kotlin.build.report.enable=true' to
gradle.properties file
(or pass it in CLI via`-Pkotlin.build.report.enable=true`).
By default build reports are created in
`rootProject/build/reports/kotlin-build`.
Build report dir can be customized via `kotlin.build.report.dir`
property.
2019-02-12 22:10:11 +03:00
Alexey Tsvetkov 8fc8b95d83 Move TaskLoggers to org.jetbrains.kotlin.gradle.plugin.internal.state 2019-02-12 22:10:11 +03:00
Ilya Chernikov 66107d430e Fix maven plugin after moving scripting to the compiler plugin 2019-02-10 13:35:58 +01:00
Ilya Chernikov 731df8d3cc Proper handling of the scripting compiler plugin in JSR-223 with daemon 2019-02-10 13:33:21 +01:00
Ilya Chernikov be95acd897 Load scripting plugin explicitly in repl tests and JSR-223 2019-02-10 13:33:21 +01:00
Ilya Chernikov 2f52df0640 Initialize scripting plugin in other tests 2019-02-10 13:31:57 +01:00
Alexander Udalov 246346367c Minor, don't use experimental coroutines in kotlinp test 2019-02-07 21:23:00 +01:00
kirill.shmakov 4b1e5e8005 Resolve #KT-26865 and related issues
CLITool.exec is used in konanc to perform compilation of native project.
Due to some internal limitation, this function runs in separate process.

After this change, there will be a possibility to choose MessageRenderer
used in CLITool.exec via system property
org.jetbrains.kotlin.cliMessageRenderer.

Reviewed at KOTLIN-CR-2698.
2019-02-07 11:29:16 +03:00
Ilya Matveev 25bc88f33d Fix K/N framework naming in test 2019-02-06 18:21:42 +03:00
Ilya Matveev ecbadcdf6f Use project.container instead of WrapUtil
In Gradle 5.2 the 'WrapUtil.toNamedDomainObjectSet' method
was removed. This patches replaces usage of this method
with call of the 'Project.container' method.

Issue #KT-29725 Fixed
2019-02-06 18:21:42 +03:00
kirill.shmakov 9e8972f1f9 Correct typo in comments 2019-02-04 14:30:37 +03:00
Ilya Gorbunov 9c7a785d78 Add an integration test of using modular artifacts with jlink in JDK9
Setup maven plugin integration test execution with JDK9 as java home.
2019-01-31 19:18:55 +03:00
Ilya Matveev 6b14271931 Declare K/N platform libraries as files instead of modules
Earlier the K/N platform libraries were looked for in a local ivy
repository created on basis of a K/N compiler distribution. Such
an approach allowed correctly showing such dependencies in
IDEA using the "group:name:version" format (e.g.
"Kotlin/Native:Accounts:ios_arm64:1.1.1"). But it caused looking
for there libraries in all other declared repositories too
making IDE import slower (see KT-28128).

This patch declares these dependencies as files and gets rid of
the local repo to avoid this problem. The downside of this change
is less informative output in the IDE:
"Kotlin/Native:Accounts:ios_arm64:1.1.1" -> "Accounts".

Issue #KT-28128 Fixed
2019-01-31 19:32:26 +07:00
Ilya Matveev 88d35cb798 Don't embed bitcode for ios simulator 2019-01-31 19:32:26 +07:00
Sergey Igushkin c5ce32653d Fix POM not rewritten correctly with custom artifact IDs (KT-29485)
When the plugin rewrites a POM, it establishes the mapping of the
original Maven coordinates to the modified ones. As one of the steps,
this requires finding the original Maven coordinates to rewrite – these
should be exactly the coordinates that Gradle writes to the POM.

In MPP, these are the coordinates of the 'root' (Gradle module metadata)
publication. If those are modified in the publication, the plugin relies
on delegating to the publication in the root module's SotwareComponent
(the only reasonable fallback is the project's name, and in this case
it obviously doesn't match the Maven artifact ID that was modified).

In 1.3.20, the publication delegate was never assigned. To fix the
issue, it is enough to correctly assign the publication delegate for the
root module's SoftwareComponent.

Issue #KT-29485 Fixed
2019-01-31 15:18:15 +03:00
Sergey Igushkin 55cc5e84fc Fix publishing dependencies of Android libraries (KT-29476)
* Add the extendsFrom relation between the Kotlin MPP compilation's
  configurations (`*Api`, `*Implementation`, `*RuntimeOnly`) and
  the Android variant's `*Elements` configurations, as those
  dependencies currently are not added to the Android source sets and
  are thus missing from the published dependencies.

* Fix a `this is KotlinCompilationToRunnableFiles` check that
  mistakenly referenced the Project receiver of `whenEvaluated { ... }`

Issue #KT-29476 Fixed
2019-01-31 15:16:06 +03:00
Mikhael Bogdanov a122cba862 Switch Kotlin project to jvm-target 1.8
#KT-29405
2019-01-31 07:43:05 +01:00
Alexey Tsvetkov 1103ca3a38 Fix logging in workers
Setting `forkMode` to `ForkMode.NEVER` switches
`isolationMode` to `IsolationMode.CLASSLOADER`.
Classloader isolation mode prevented passing task's
logger to the unit of work.
Also it might resulted in multiple daemon instances starting
in parallel.

This change removes setting `forMode` (it was unnecessary).
Also a logger is used for the fallback message instead of printing it
to stderr. An assertion is added to tests, ensuring that
the fallback does not happen.

    #KT-29394 Fixed
2019-01-28 21:33:22 +03:00